Skip to content

Commit

Permalink
x86/audit: Fix a -Wmissing-prototypes warning for ia32_classify_sysca…
Browse files Browse the repository at this point in the history
…ll()

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
  • Loading branch information
Benjamin Thiel authored and suryasaimadhu committed May 19, 2020
1 parent 6255c16 commit 0e5e3d4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions arch/x86/ia32/audit.c
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
7 changes: 7 additions & 0 deletions arch/x86/include/asm/audit.h
Original file line number Diff line number Diff line change
@@ -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 */
2 changes: 1 addition & 1 deletion arch/x86/kernel/audit_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0e5e3d4

Please sign in to comment.