x86/audit: Fix a -Wmissing-prototypes warning for ia32_classify_syscall()
authorBenjamin Thiel <b.thiel@posteo.de>
Sat, 16 May 2020 12:38:16 +0000 (14:38 +0200)
committerBorislav Petkov <bp@suse.de>
Tue, 19 May 2020 16:03:07 +0000 (18:03 +0200)
Lift the prototype of ia32_classify_syscall() into its own header.

Signed-off-by: Benjamin Thiel <b.thiel@posteo.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20200516123816.2680-1-b.thiel@posteo.de
arch/x86/ia32/audit.c
arch/x86/include/asm/audit.h [new file with mode: 0644]
arch/x86/kernel/audit_64.c

index 3d21eab7aaedf305683754d37faa46e6a263674c..6efe6cb3768ae8c3040daf34325867ec15a58a87 100644 (file)
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <asm/unistd_32.h>
+#include <asm/audit.h>
 
 unsigned ia32_dir_class[] = {
 #include <asm-generic/audit_dir_write.h>
diff --git a/arch/x86/include/asm/audit.h b/arch/x86/include/asm/audit.h
new file mode 100644 (file)
index 0000000..36aec57
--- /dev/null
@@ -0,0 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _ASM_X86_AUDIT_H
+#define _ASM_X86_AUDIT_H
+
+int ia32_classify_syscall(unsigned int syscall);
+
+#endif /* _ASM_X86_AUDIT_H */
index e1efe44ebefc7ba2a18ff1ca1fa913d09259a7c5..83d9cad4e68bd33e06dd61d0db49319cd11ece79 100644 (file)
@@ -3,6 +3,7 @@
 #include <linux/types.h>
 #include <linux/audit.h>
 #include <asm/unistd.h>
+#include <asm/audit.h>
 
 static unsigned dir_class[] = {
 #include <asm-generic/audit_dir_write.h>
@@ -41,7 +42,6 @@ int audit_classify_arch(int arch)
 int audit_classify_syscall(int abi, unsigned syscall)
 {
 #ifdef CONFIG_IA32_EMULATION
-       extern int ia32_classify_syscall(unsigned);
        if (abi == AUDIT_ARCH_I386)
                return ia32_classify_syscall(syscall);
 #endif