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