diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-generic/syscall.h | 2 | ||||
| -rw-r--r-- | include/linux/audit.h | 25 | ||||
| -rw-r--r-- | include/uapi/linux/audit.h | 14 | ||||
| -rw-r--r-- | include/uapi/linux/elf-em.h | 1 |
4 files changed, 18 insertions, 24 deletions
diff --git a/include/asm-generic/syscall.h b/include/asm-generic/syscall.h index d401e5463fb0..0c938a4354f6 100644 --- a/include/asm-generic/syscall.h +++ b/include/asm-generic/syscall.h | |||
| @@ -147,7 +147,7 @@ void syscall_set_arguments(struct task_struct *task, struct pt_regs *regs, | |||
| 147 | * | 147 | * |
| 148 | * Returns the AUDIT_ARCH_* based on the system call convention in use. | 148 | * Returns the AUDIT_ARCH_* based on the system call convention in use. |
| 149 | * | 149 | * |
| 150 | * It's only valid to call this when @task is stopped on entry to a system | 150 | * It's only valid to call this when current is stopped on entry to a system |
| 151 | * call, due to %TIF_SYSCALL_TRACE, %TIF_SYSCALL_AUDIT, or %TIF_SECCOMP. | 151 | * call, due to %TIF_SYSCALL_TRACE, %TIF_SYSCALL_AUDIT, or %TIF_SECCOMP. |
| 152 | * | 152 | * |
| 153 | * Architectures which permit CONFIG_HAVE_ARCH_SECCOMP_FILTER must | 153 | * Architectures which permit CONFIG_HAVE_ARCH_SECCOMP_FILTER must |
diff --git a/include/linux/audit.h b/include/linux/audit.h index 22cfddb75566..36dffeccebdb 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
| @@ -66,12 +66,16 @@ struct audit_krule { | |||
| 66 | 66 | ||
| 67 | struct audit_field { | 67 | struct audit_field { |
| 68 | u32 type; | 68 | u32 type; |
| 69 | u32 val; | 69 | union { |
| 70 | kuid_t uid; | 70 | u32 val; |
| 71 | kgid_t gid; | 71 | kuid_t uid; |
| 72 | kgid_t gid; | ||
| 73 | struct { | ||
| 74 | char *lsm_str; | ||
| 75 | void *lsm_rule; | ||
| 76 | }; | ||
| 77 | }; | ||
| 72 | u32 op; | 78 | u32 op; |
| 73 | char *lsm_str; | ||
| 74 | void *lsm_rule; | ||
| 75 | }; | 79 | }; |
| 76 | 80 | ||
| 77 | extern int is_audit_feature_set(int which); | 81 | extern int is_audit_feature_set(int which); |
| @@ -109,12 +113,13 @@ extern void audit_log_session_info(struct audit_buffer *ab); | |||
| 109 | #endif | 113 | #endif |
| 110 | 114 | ||
| 111 | #ifdef CONFIG_AUDITSYSCALL | 115 | #ifdef CONFIG_AUDITSYSCALL |
| 116 | #include <asm/syscall.h> /* for syscall_get_arch() */ | ||
| 117 | |||
| 112 | /* These are defined in auditsc.c */ | 118 | /* These are defined in auditsc.c */ |
| 113 | /* Public API */ | 119 | /* Public API */ |
| 114 | extern int audit_alloc(struct task_struct *task); | 120 | extern int audit_alloc(struct task_struct *task); |
| 115 | extern void __audit_free(struct task_struct *task); | 121 | extern void __audit_free(struct task_struct *task); |
| 116 | extern void __audit_syscall_entry(int arch, | 122 | extern void __audit_syscall_entry(int major, unsigned long a0, unsigned long a1, |
| 117 | int major, unsigned long a0, unsigned long a1, | ||
| 118 | unsigned long a2, unsigned long a3); | 123 | unsigned long a2, unsigned long a3); |
| 119 | extern void __audit_syscall_exit(int ret_success, long ret_value); | 124 | extern void __audit_syscall_exit(int ret_success, long ret_value); |
| 120 | extern struct filename *__audit_reusename(const __user char *uptr); | 125 | extern struct filename *__audit_reusename(const __user char *uptr); |
| @@ -141,12 +146,12 @@ static inline void audit_free(struct task_struct *task) | |||
| 141 | if (unlikely(task->audit_context)) | 146 | if (unlikely(task->audit_context)) |
| 142 | __audit_free(task); | 147 | __audit_free(task); |
| 143 | } | 148 | } |
| 144 | static inline void audit_syscall_entry(int arch, int major, unsigned long a0, | 149 | static inline void audit_syscall_entry(int major, unsigned long a0, |
| 145 | unsigned long a1, unsigned long a2, | 150 | unsigned long a1, unsigned long a2, |
| 146 | unsigned long a3) | 151 | unsigned long a3) |
| 147 | { | 152 | { |
| 148 | if (unlikely(current->audit_context)) | 153 | if (unlikely(current->audit_context)) |
| 149 | __audit_syscall_entry(arch, major, a0, a1, a2, a3); | 154 | __audit_syscall_entry(major, a0, a1, a2, a3); |
| 150 | } | 155 | } |
| 151 | static inline void audit_syscall_exit(void *pt_regs) | 156 | static inline void audit_syscall_exit(void *pt_regs) |
| 152 | { | 157 | { |
| @@ -322,7 +327,7 @@ static inline int audit_alloc(struct task_struct *task) | |||
| 322 | } | 327 | } |
| 323 | static inline void audit_free(struct task_struct *task) | 328 | static inline void audit_free(struct task_struct *task) |
| 324 | { } | 329 | { } |
| 325 | static inline void audit_syscall_entry(int arch, int major, unsigned long a0, | 330 | static inline void audit_syscall_entry(int major, unsigned long a0, |
| 326 | unsigned long a1, unsigned long a2, | 331 | unsigned long a1, unsigned long a2, |
| 327 | unsigned long a3) | 332 | unsigned long a3) |
| 328 | { } | 333 | { } |
diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h index 3b9ff33e1768..d4dbef14d4df 100644 --- a/include/uapi/linux/audit.h +++ b/include/uapi/linux/audit.h | |||
| @@ -352,6 +352,7 @@ enum { | |||
| 352 | #define AUDIT_ARCH_IA64 (EM_IA_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | 352 | #define AUDIT_ARCH_IA64 (EM_IA_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) |
| 353 | #define AUDIT_ARCH_M32R (EM_M32R) | 353 | #define AUDIT_ARCH_M32R (EM_M32R) |
| 354 | #define AUDIT_ARCH_M68K (EM_68K) | 354 | #define AUDIT_ARCH_M68K (EM_68K) |
| 355 | #define AUDIT_ARCH_MICROBLAZE (EM_MICROBLAZE) | ||
| 355 | #define AUDIT_ARCH_MIPS (EM_MIPS) | 356 | #define AUDIT_ARCH_MIPS (EM_MIPS) |
| 356 | #define AUDIT_ARCH_MIPSEL (EM_MIPS|__AUDIT_ARCH_LE) | 357 | #define AUDIT_ARCH_MIPSEL (EM_MIPS|__AUDIT_ARCH_LE) |
| 357 | #define AUDIT_ARCH_MIPS64 (EM_MIPS|__AUDIT_ARCH_64BIT) | 358 | #define AUDIT_ARCH_MIPS64 (EM_MIPS|__AUDIT_ARCH_64BIT) |
| @@ -445,17 +446,4 @@ struct audit_rule_data { | |||
| 445 | char buf[0]; /* string fields buffer */ | 446 | char buf[0]; /* string fields buffer */ |
| 446 | }; | 447 | }; |
| 447 | 448 | ||
| 448 | /* audit_rule is supported to maintain backward compatibility with | ||
| 449 | * userspace. It supports integer fields only and corresponds to | ||
| 450 | * AUDIT_ADD, AUDIT_DEL and AUDIT_LIST requests. | ||
| 451 | */ | ||
| 452 | struct audit_rule { /* for AUDIT_LIST, AUDIT_ADD, and AUDIT_DEL */ | ||
| 453 | __u32 flags; /* AUDIT_PER_{TASK,CALL}, AUDIT_PREPEND */ | ||
| 454 | __u32 action; /* AUDIT_NEVER, AUDIT_POSSIBLE, AUDIT_ALWAYS */ | ||
| 455 | __u32 field_count; | ||
| 456 | __u32 mask[AUDIT_BITMASK_SIZE]; | ||
| 457 | __u32 fields[AUDIT_MAX_FIELDS]; | ||
| 458 | __u32 values[AUDIT_MAX_FIELDS]; | ||
| 459 | }; | ||
| 460 | |||
| 461 | #endif /* _UAPI_LINUX_AUDIT_H_ */ | 449 | #endif /* _UAPI_LINUX_AUDIT_H_ */ |
diff --git a/include/uapi/linux/elf-em.h b/include/uapi/linux/elf-em.h index 01529bd96438..aa90bc98b6e2 100644 --- a/include/uapi/linux/elf-em.h +++ b/include/uapi/linux/elf-em.h | |||
| @@ -32,6 +32,7 @@ | |||
| 32 | #define EM_V850 87 /* NEC v850 */ | 32 | #define EM_V850 87 /* NEC v850 */ |
| 33 | #define EM_M32R 88 /* Renesas M32R */ | 33 | #define EM_M32R 88 /* Renesas M32R */ |
| 34 | #define EM_MN10300 89 /* Panasonic/MEI MN10300, AM33 */ | 34 | #define EM_MN10300 89 /* Panasonic/MEI MN10300, AM33 */ |
| 35 | #define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */ | ||
| 35 | #define EM_BLACKFIN 106 /* ADI Blackfin Processor */ | 36 | #define EM_BLACKFIN 106 /* ADI Blackfin Processor */ |
| 36 | #define EM_TI_C6000 140 /* TI C6X DSPs */ | 37 | #define EM_TI_C6000 140 /* TI C6X DSPs */ |
| 37 | #define EM_AARCH64 183 /* ARM 64 bit */ | 38 | #define EM_AARCH64 183 /* ARM 64 bit */ |
