aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/sched.h21
1 files changed, 12 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
1962static 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) \
1967static 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
1972TASK_PFA_TEST(NO_NEW_PRIVS, no_new_privs)
1973TASK_PFA_SET(NO_NEW_PRIVS, no_new_privs)
1971 1974
1972/* 1975/*
1973 * task->jobctl flags 1976 * task->jobctl flags