diff options
-rw-r--r-- | arch/sparc/kernel/audit.c | 8 | ||||
-rw-r--r-- | arch/sparc/kernel/compat_audit.c | 1 | ||||
-rw-r--r-- | arch/sparc/kernel/kernel.h | 7 |
3 files changed, 10 insertions, 6 deletions
diff --git a/arch/sparc/kernel/audit.c b/arch/sparc/kernel/audit.c index 8fff0ac63d56..24361b494a93 100644 --- a/arch/sparc/kernel/audit.c +++ b/arch/sparc/kernel/audit.c | |||
@@ -3,6 +3,8 @@ | |||
3 | #include <linux/audit.h> | 3 | #include <linux/audit.h> |
4 | #include <asm/unistd.h> | 4 | #include <asm/unistd.h> |
5 | 5 | ||
6 | #include "kernel.h" | ||
7 | |||
6 | static unsigned dir_class[] = { | 8 | static unsigned dir_class[] = { |
7 | #include <asm-generic/audit_dir_write.h> | 9 | #include <asm-generic/audit_dir_write.h> |
8 | ~0U | 10 | ~0U |
@@ -40,7 +42,6 @@ int audit_classify_arch(int arch) | |||
40 | int audit_classify_syscall(int abi, unsigned syscall) | 42 | int audit_classify_syscall(int abi, unsigned syscall) |
41 | { | 43 | { |
42 | #ifdef CONFIG_COMPAT | 44 | #ifdef CONFIG_COMPAT |
43 | extern int sparc32_classify_syscall(unsigned); | ||
44 | if (abi == AUDIT_ARCH_SPARC) | 45 | if (abi == AUDIT_ARCH_SPARC) |
45 | return sparc32_classify_syscall(syscall); | 46 | return sparc32_classify_syscall(syscall); |
46 | #endif | 47 | #endif |
@@ -61,11 +62,6 @@ int audit_classify_syscall(int abi, unsigned syscall) | |||
61 | static int __init audit_classes_init(void) | 62 | static int __init audit_classes_init(void) |
62 | { | 63 | { |
63 | #ifdef CONFIG_COMPAT | 64 | #ifdef CONFIG_COMPAT |
64 | extern __u32 sparc32_dir_class[]; | ||
65 | extern __u32 sparc32_write_class[]; | ||
66 | extern __u32 sparc32_read_class[]; | ||
67 | extern __u32 sparc32_chattr_class[]; | ||
68 | extern __u32 sparc32_signal_class[]; | ||
69 | audit_register_class(AUDIT_CLASS_WRITE_32, sparc32_write_class); | 65 | audit_register_class(AUDIT_CLASS_WRITE_32, sparc32_write_class); |
70 | audit_register_class(AUDIT_CLASS_READ_32, sparc32_read_class); | 66 | audit_register_class(AUDIT_CLASS_READ_32, sparc32_read_class); |
71 | audit_register_class(AUDIT_CLASS_DIR_WRITE_32, sparc32_dir_class); | 67 | audit_register_class(AUDIT_CLASS_DIR_WRITE_32, sparc32_dir_class); |
diff --git a/arch/sparc/kernel/compat_audit.c b/arch/sparc/kernel/compat_audit.c index d865575b25bf..7062263d09c1 100644 --- a/arch/sparc/kernel/compat_audit.c +++ b/arch/sparc/kernel/compat_audit.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #define __32bit_syscall_numbers__ | 1 | #define __32bit_syscall_numbers__ |
2 | #include <asm/unistd.h> | 2 | #include <asm/unistd.h> |
3 | #include "kernel.h" | ||
3 | 4 | ||
4 | unsigned sparc32_dir_class[] = { | 5 | unsigned sparc32_dir_class[] = { |
5 | #include <asm-generic/audit_dir_write.h> | 6 | #include <asm-generic/audit_dir_write.h> |
diff --git a/arch/sparc/kernel/kernel.h b/arch/sparc/kernel/kernel.h index 980e21d47a82..802137266b02 100644 --- a/arch/sparc/kernel/kernel.h +++ b/arch/sparc/kernel/kernel.h | |||
@@ -50,6 +50,13 @@ asmlinkage void do_rt_sigreturn32(struct pt_regs *regs); | |||
50 | void do_signal32(struct pt_regs * regs); | 50 | void do_signal32(struct pt_regs * regs); |
51 | asmlinkage int do_sys32_sigstack(u32 u_ssptr, u32 u_ossptr, unsigned long sp); | 51 | asmlinkage int do_sys32_sigstack(u32 u_ssptr, u32 u_ossptr, unsigned long sp); |
52 | 52 | ||
53 | /* compat_audit.c */ | ||
54 | extern unsigned sparc32_dir_class[]; | ||
55 | extern unsigned sparc32_chattr_class[]; | ||
56 | extern unsigned sparc32_write_class[]; | ||
57 | extern unsigned sparc32_read_class[]; | ||
58 | extern unsigned sparc32_signal_class[]; | ||
59 | int sparc32_classify_syscall(unsigned syscall); | ||
53 | #endif | 60 | #endif |
54 | 61 | ||
55 | #ifdef CONFIG_SPARC32 | 62 | #ifdef CONFIG_SPARC32 |