diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-07-29 20:38:46 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-07-29 20:38:46 -0400 |
| commit | 7a1e8b80fb1e8ead4cec15d1fc494ed290e4d2e9 (patch) | |
| tree | 55a36d4256f1ae793b5c8e88c0f158737447193f /include/linux | |
| parent | a867d7349e94b6409b08629886a819f802377e91 (diff) | |
| parent | 7616ac70d1bb4f2e9d25c1a82d283f3368a7b632 (diff) | |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull security subsystem updates from James Morris:
"Highlights:
- TPM core and driver updates/fixes
- IPv6 security labeling (CALIPSO)
- Lots of Apparmor fixes
- Seccomp: remove 2-phase API, close hole where ptrace can change
syscall #"
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (156 commits)
apparmor: fix SECURITY_APPARMOR_HASH_DEFAULT parameter handling
tpm: Add TPM 2.0 support to the Nuvoton i2c driver (NPCT6xx family)
tpm: Factor out common startup code
tpm: use devm_add_action_or_reset
tpm2_i2c_nuvoton: add irq validity check
tpm: read burstcount from TPM_STS in one 32-bit transaction
tpm: fix byte-order for the value read by tpm2_get_tpm_pt
tpm_tis_core: convert max timeouts from msec to jiffies
apparmor: fix arg_size computation for when setprocattr is null terminated
apparmor: fix oops, validate buffer size in apparmor_setprocattr()
apparmor: do not expose kernel stack
apparmor: fix module parameters can be changed after policy is locked
apparmor: fix oops in profile_unpack() when policy_db is not present
apparmor: don't check for vmalloc_addr if kvzalloc() failed
apparmor: add missing id bounds check on dfa verification
apparmor: allow SYS_CAP_RESOURCE to be sufficient to prlimit another task
apparmor: use list_next_entry instead of list_entry_next
apparmor: fix refcount race when finding a child profile
apparmor: fix ref count leak when profile sha1 hash is read
apparmor: check that xindex is in trans_table bounds
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/capability.h | 5 | ||||
| -rw-r--r-- | include/linux/platform_data/st33zp24.h | 2 | ||||
| -rw-r--r-- | include/linux/seccomp.h | 14 | ||||
| -rw-r--r-- | include/linux/tpm.h | 5 |
4 files changed, 15 insertions, 11 deletions
diff --git a/include/linux/capability.h b/include/linux/capability.h index 00690ff92edf..5f3c63dde2d5 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
| @@ -206,6 +206,7 @@ extern bool has_ns_capability_noaudit(struct task_struct *t, | |||
| 206 | struct user_namespace *ns, int cap); | 206 | struct user_namespace *ns, int cap); |
| 207 | extern bool capable(int cap); | 207 | extern bool capable(int cap); |
| 208 | extern bool ns_capable(struct user_namespace *ns, int cap); | 208 | extern bool ns_capable(struct user_namespace *ns, int cap); |
| 209 | extern bool ns_capable_noaudit(struct user_namespace *ns, int cap); | ||
| 209 | #else | 210 | #else |
| 210 | static inline bool has_capability(struct task_struct *t, int cap) | 211 | static inline bool has_capability(struct task_struct *t, int cap) |
| 211 | { | 212 | { |
| @@ -233,6 +234,10 @@ static inline bool ns_capable(struct user_namespace *ns, int cap) | |||
| 233 | { | 234 | { |
| 234 | return true; | 235 | return true; |
| 235 | } | 236 | } |
| 237 | static inline bool ns_capable_noaudit(struct user_namespace *ns, int cap) | ||
| 238 | { | ||
| 239 | return true; | ||
| 240 | } | ||
| 236 | #endif /* CONFIG_MULTIUSER */ | 241 | #endif /* CONFIG_MULTIUSER */ |
| 237 | extern bool capable_wrt_inode_uidgid(const struct inode *inode, int cap); | 242 | extern bool capable_wrt_inode_uidgid(const struct inode *inode, int cap); |
| 238 | extern bool file_ns_capable(const struct file *file, struct user_namespace *ns, int cap); | 243 | extern bool file_ns_capable(const struct file *file, struct user_namespace *ns, int cap); |
diff --git a/include/linux/platform_data/st33zp24.h b/include/linux/platform_data/st33zp24.h index 817dfdb37885..6f0fb6ebd7db 100644 --- a/include/linux/platform_data/st33zp24.h +++ b/include/linux/platform_data/st33zp24.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * STMicroelectronics TPM Linux driver for TPM 1.2 ST33ZP24 | 2 | * STMicroelectronics TPM Linux driver for TPM 1.2 ST33ZP24 |
| 3 | * Copyright (C) 2009 - 2015 STMicroelectronics | 3 | * Copyright (C) 2009 - 2016 STMicroelectronics |
| 4 | * | 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
diff --git a/include/linux/seccomp.h b/include/linux/seccomp.h index 2296e6b2f690..ecc296c137cd 100644 --- a/include/linux/seccomp.h +++ b/include/linux/seccomp.h | |||
| @@ -28,19 +28,13 @@ struct seccomp { | |||
| 28 | }; | 28 | }; |
| 29 | 29 | ||
| 30 | #ifdef CONFIG_HAVE_ARCH_SECCOMP_FILTER | 30 | #ifdef CONFIG_HAVE_ARCH_SECCOMP_FILTER |
| 31 | extern int __secure_computing(void); | 31 | extern int __secure_computing(const struct seccomp_data *sd); |
| 32 | static inline int secure_computing(void) | 32 | static inline int secure_computing(const struct seccomp_data *sd) |
| 33 | { | 33 | { |
| 34 | if (unlikely(test_thread_flag(TIF_SECCOMP))) | 34 | if (unlikely(test_thread_flag(TIF_SECCOMP))) |
| 35 | return __secure_computing(); | 35 | return __secure_computing(sd); |
| 36 | return 0; | 36 | return 0; |
| 37 | } | 37 | } |
| 38 | |||
| 39 | #define SECCOMP_PHASE1_OK 0 | ||
| 40 | #define SECCOMP_PHASE1_SKIP 1 | ||
| 41 | |||
| 42 | extern u32 seccomp_phase1(struct seccomp_data *sd); | ||
| 43 | int seccomp_phase2(u32 phase1_result); | ||
| 44 | #else | 38 | #else |
| 45 | extern void secure_computing_strict(int this_syscall); | 39 | extern void secure_computing_strict(int this_syscall); |
| 46 | #endif | 40 | #endif |
| @@ -61,7 +55,7 @@ struct seccomp { }; | |||
| 61 | struct seccomp_filter { }; | 55 | struct seccomp_filter { }; |
| 62 | 56 | ||
| 63 | #ifdef CONFIG_HAVE_ARCH_SECCOMP_FILTER | 57 | #ifdef CONFIG_HAVE_ARCH_SECCOMP_FILTER |
| 64 | static inline int secure_computing(void) { return 0; } | 58 | static inline int secure_computing(struct seccomp_data *sd) { return 0; } |
| 65 | #else | 59 | #else |
| 66 | static inline void secure_computing_strict(int this_syscall) { return; } | 60 | static inline void secure_computing_strict(int this_syscall) { return; } |
| 67 | #endif | 61 | #endif |
diff --git a/include/linux/tpm.h b/include/linux/tpm.h index 706e63eea080..da158f06e0b2 100644 --- a/include/linux/tpm.h +++ b/include/linux/tpm.h | |||
| @@ -33,7 +33,12 @@ struct tpm_chip; | |||
| 33 | struct trusted_key_payload; | 33 | struct trusted_key_payload; |
| 34 | struct trusted_key_options; | 34 | struct trusted_key_options; |
| 35 | 35 | ||
| 36 | enum TPM_OPS_FLAGS { | ||
| 37 | TPM_OPS_AUTO_STARTUP = BIT(0), | ||
| 38 | }; | ||
| 39 | |||
| 36 | struct tpm_class_ops { | 40 | struct tpm_class_ops { |
| 41 | unsigned int flags; | ||
| 37 | const u8 req_complete_mask; | 42 | const u8 req_complete_mask; |
| 38 | const u8 req_complete_val; | 43 | const u8 req_complete_val; |
| 39 | bool (*req_canceled)(struct tpm_chip *chip, u8 status); | 44 | bool (*req_canceled)(struct tpm_chip *chip, u8 status); |
