1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * include/linux/sched/qos_auth.h
4 *
5 * Copyright (c) 2022 Huawei Device Co., Ltd.
6 */
7
8#ifndef _QOS_AUTH_H
9#define _QOS_AUTH_H
10
11#include <linux/sched.h>
12#include <linux/sched/auth_ctrl.h>
13
14/*
15 * QOS authority flags for SYSTEM or ROOT
16 *
17 * keep sync with qos_ctrl_cmdid
18 * when add a new cmd to qos_ctrl_cmdid
19 * keep new_flag = (old_flag << 1) + 1
20 * up to now, next flag value is 0x0007
21 */
22#define AF_QOS_ALL		0x0003
23
24/*
25 * delegated authority for normal uid
26 * trim access range for QOS
27 */
28#define AF_QOS_DELEGATED	0x0001
29
30bool check_authorized(unsigned int func_id, unsigned int type);
31
32#endif /* _QOS_AUTH_H */
33
34