diff options
| -rw-r--r-- | include/linux/sched.h | 21 | ||||
| -rwxr-xr-x | scripts/tags.sh | 6 |
2 files changed, 18 insertions, 9 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 45577650f629..5630763956d9 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -1959,15 +1959,18 @@ static inline void memalloc_noio_restore(unsigned int flags) | |||
| 1959 | /* Per-process atomic flags. */ | 1959 | /* Per-process atomic flags. */ |
| 1960 | #define PFA_NO_NEW_PRIVS 0 /* May not gain new privileges. */ | 1960 | #define PFA_NO_NEW_PRIVS 0 /* May not gain new privileges. */ |
| 1961 | 1961 | ||
| 1962 | static inline bool task_no_new_privs(struct task_struct *p) | 1962 | #define TASK_PFA_TEST(name, func) \ |
| 1963 | { | 1963 | static inline bool task_##func(struct task_struct *p) \ |
| 1964 | return test_bit(PFA_NO_NEW_PRIVS, &p->atomic_flags); | 1964 | { return test_bit(PFA_##name, &p->atomic_flags); } |
| 1965 | } | 1965 | #define TASK_PFA_SET(name, func) \ |
| 1966 | 1966 | static inline void task_set_##func(struct task_struct *p) \ | |
| 1967 | static inline void task_set_no_new_privs(struct task_struct *p) | 1967 | { set_bit(PFA_##name, &p->atomic_flags); } |
| 1968 | { | 1968 | #define TASK_PFA_CLEAR(name, func) \ |
| 1969 | set_bit(PFA_NO_NEW_PRIVS, &p->atomic_flags); | 1969 | static inline void task_clear_##func(struct task_struct *p) \ |
| 1970 | } | 1970 | { clear_bit(PFA_##name, &p->atomic_flags); } |
| 1971 | |||
| 1972 | TASK_PFA_TEST(NO_NEW_PRIVS, no_new_privs) | ||
| 1973 | TASK_PFA_SET(NO_NEW_PRIVS, no_new_privs) | ||
| 1971 | 1974 | ||
| 1972 | /* | 1975 | /* |
| 1973 | * task->jobctl flags | 1976 | * task->jobctl flags |
diff --git a/scripts/tags.sh b/scripts/tags.sh index cbfd269a6011..293828bfd4ac 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh | |||
| @@ -197,6 +197,9 @@ exuberant() | |||
| 197 | --regex-c++='/SETPCGFLAG\(([^,)]*).*/SetPageCgroup\1/' \ | 197 | --regex-c++='/SETPCGFLAG\(([^,)]*).*/SetPageCgroup\1/' \ |
| 198 | --regex-c++='/CLEARPCGFLAG\(([^,)]*).*/ClearPageCgroup\1/' \ | 198 | --regex-c++='/CLEARPCGFLAG\(([^,)]*).*/ClearPageCgroup\1/' \ |
| 199 | --regex-c++='/TESTCLEARPCGFLAG\(([^,)]*).*/TestClearPageCgroup\1/' \ | 199 | --regex-c++='/TESTCLEARPCGFLAG\(([^,)]*).*/TestClearPageCgroup\1/' \ |
| 200 | --regex-c++='/TASK_PFA_TEST\([^,]*,\s*([^)]*)\)/task_\1/' \ | ||
| 201 | --regex-c++='/TASK_PFA_SET\([^,]*,\s*([^)]*)\)/task_set_\1/' \ | ||
| 202 | --regex-c++='/TASK_PFA_CLEAR\([^,]*,\s*([^)]*)\)/task_clear_\1/'\ | ||
| 200 | --regex-c='/PCI_OP_READ\((\w*).*[1-4]\)/pci_bus_read_config_\1/' \ | 203 | --regex-c='/PCI_OP_READ\((\w*).*[1-4]\)/pci_bus_read_config_\1/' \ |
| 201 | --regex-c='/PCI_OP_WRITE\((\w*).*[1-4]\)/pci_bus_write_config_\1/' \ | 204 | --regex-c='/PCI_OP_WRITE\((\w*).*[1-4]\)/pci_bus_write_config_\1/' \ |
| 202 | --regex-c='/DEFINE_(MUTEX|SEMAPHORE|SPINLOCK)\((\w*)/\2/v/' \ | 205 | --regex-c='/DEFINE_(MUTEX|SEMAPHORE|SPINLOCK)\((\w*)/\2/v/' \ |
| @@ -260,6 +263,9 @@ emacs() | |||
| 260 | --regex='/SETPCGFLAG\(([^,)]*).*/SetPageCgroup\1/' \ | 263 | --regex='/SETPCGFLAG\(([^,)]*).*/SetPageCgroup\1/' \ |
| 261 | --regex='/CLEARPCGFLAG\(([^,)]*).*/ClearPageCgroup\1/' \ | 264 | --regex='/CLEARPCGFLAG\(([^,)]*).*/ClearPageCgroup\1/' \ |
| 262 | --regex='/TESTCLEARPCGFLAG\(([^,)]*).*/TestClearPageCgroup\1/' \ | 265 | --regex='/TESTCLEARPCGFLAG\(([^,)]*).*/TestClearPageCgroup\1/' \ |
| 266 | --regex='/TASK_PFA_TEST\([^,]*,\s*([^)]*)\)/task_\1/' \ | ||
| 267 | --regex='/TASK_PFA_SET\([^,]*,\s*([^)]*)\)/task_set_\1/' \ | ||
| 268 | --regex='/TASK_PFA_CLEAR\([^,]*,\s*([^)]*)\)/task_clear_\1/' \ | ||
| 263 | --regex='/_PE(\([^,)]*\).*/PEVENT_ERRNO__\1/' \ | 269 | --regex='/_PE(\([^,)]*\).*/PEVENT_ERRNO__\1/' \ |
| 264 | --regex='/PCI_OP_READ(\([a-z]*[a-z]\).*[1-4])/pci_bus_read_config_\1/' \ | 270 | --regex='/PCI_OP_READ(\([a-z]*[a-z]\).*[1-4])/pci_bus_read_config_\1/' \ |
| 265 | --regex='/PCI_OP_WRITE(\([a-z]*[a-z]\).*[1-4])/pci_bus_write_config_\1/'\ | 271 | --regex='/PCI_OP_WRITE(\([a-z]*[a-z]\).*[1-4])/pci_bus_write_config_\1/'\ |
