From 5d1646d90e1f2cceb9f0828f4b28318cd0ec7744 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 12:05:51 +0200 Subject: Adding upstream version 5.10.209. Signed-off-by: Daniel Baumann --- arch/sparc/kernel/compat_audit.c | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 arch/sparc/kernel/compat_audit.c (limited to 'arch/sparc/kernel/compat_audit.c') diff --git a/arch/sparc/kernel/compat_audit.c b/arch/sparc/kernel/compat_audit.c new file mode 100644 index 000000000..10eeb4f15 --- /dev/null +++ b/arch/sparc/kernel/compat_audit.c @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: GPL-2.0 +#define __32bit_syscall_numbers__ +#include +#include "kernel.h" + +unsigned int sparc32_dir_class[] = { +#include +~0U +}; + +unsigned int sparc32_chattr_class[] = { +#include +~0U +}; + +unsigned int sparc32_write_class[] = { +#include +~0U +}; + +unsigned int sparc32_read_class[] = { +#include +~0U +}; + +unsigned int sparc32_signal_class[] = { +#include +~0U +}; + +int sparc32_classify_syscall(unsigned int syscall) +{ + switch(syscall) { + case __NR_open: + return 2; + case __NR_openat: + return 3; + case __NR_socketcall: + return 4; + case __NR_execve: + return 5; + default: + return 1; + } +} -- cgit v1.2.3