diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-06 11:06:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-06 11:06:39 -0400 |
commit | bb2cbf5e9367d8598fecd0c48dead69560750223 (patch) | |
tree | fb2c620451b90f41a31726bdd82077813f941e39 /include/linux/sched.h | |
parent | e7fda6c4c3c1a7d6996dd75fd84670fa0b5d448f (diff) | |
parent | 478d085524c57cf4283699f529d5a4c22188ea69 (diff) |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull security subsystem updates from James Morris:
"In this release:
- PKCS#7 parser for the key management subsystem from David Howells
- appoint Kees Cook as seccomp maintainer
- bugfixes and general maintenance across the subsystem"
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (94 commits)
X.509: Need to export x509_request_asymmetric_key()
netlabel: shorter names for the NetLabel catmap funcs/structs
netlabel: fix the catmap walking functions
netlabel: fix the horribly broken catmap functions
netlabel: fix a problem when setting bits below the previously lowest bit
PKCS#7: X.509 certificate issuer and subject are mandatory fields in the ASN.1
tpm: simplify code by using %*phN specifier
tpm: Provide a generic means to override the chip returned timeouts
tpm: missing tpm_chip_put in tpm_get_random()
tpm: Properly clean sysfs entries in error path
tpm: Add missing tpm_do_selftest to ST33 I2C driver
PKCS#7: Use x509_request_asymmetric_key()
Revert "selinux: fix the default socket labeling in sock_graft()"
X.509: x509_request_asymmetric_keys() doesn't need string length arguments
PKCS#7: fix sparse non static symbol warning
KEYS: revert encrypted key change
ima: add support for measuring and appraising firmware
firmware_class: perform new LSM checks
security: introduce kernel_fw_from_file hook
PKCS#7: Missing inclusion of linux/err.h
...
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 66124d63371a..7c19d552dc3f 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1304,13 +1304,12 @@ struct task_struct { | |||
1304 | * execve */ | 1304 | * execve */ |
1305 | unsigned in_iowait:1; | 1305 | unsigned in_iowait:1; |
1306 | 1306 | ||
1307 | /* task may not gain privileges */ | ||
1308 | unsigned no_new_privs:1; | ||
1309 | |||
1310 | /* Revert to default priority/policy when forking */ | 1307 | /* Revert to default priority/policy when forking */ |
1311 | unsigned sched_reset_on_fork:1; | 1308 | unsigned sched_reset_on_fork:1; |
1312 | unsigned sched_contributes_to_load:1; | 1309 | unsigned sched_contributes_to_load:1; |
1313 | 1310 | ||
1311 | unsigned long atomic_flags; /* Flags needing atomic access. */ | ||
1312 | |||
1314 | pid_t pid; | 1313 | pid_t pid; |
1315 | pid_t tgid; | 1314 | pid_t tgid; |
1316 | 1315 | ||
@@ -1962,6 +1961,19 @@ static inline void memalloc_noio_restore(unsigned int flags) | |||
1962 | current->flags = (current->flags & ~PF_MEMALLOC_NOIO) | flags; | 1961 | current->flags = (current->flags & ~PF_MEMALLOC_NOIO) | flags; |
1963 | } | 1962 | } |
1964 | 1963 | ||
1964 | /* Per-process atomic flags. */ | ||
1965 | #define PFA_NO_NEW_PRIVS 0x00000001 /* May not gain new privileges. */ | ||
1966 | |||
1967 | static inline bool task_no_new_privs(struct task_struct *p) | ||
1968 | { | ||
1969 | return test_bit(PFA_NO_NEW_PRIVS, &p->atomic_flags); | ||
1970 | } | ||
1971 | |||
1972 | static inline void task_set_no_new_privs(struct task_struct *p) | ||
1973 | { | ||
1974 | set_bit(PFA_NO_NEW_PRIVS, &p->atomic_flags); | ||
1975 | } | ||
1976 | |||
1965 | /* | 1977 | /* |
1966 | * task->jobctl flags | 1978 | * task->jobctl flags |
1967 | */ | 1979 | */ |