parisc: Fold 32-bit compat code into audit_classify_syscall()
authorHelge Deller <deller@gmx.de>
Fri, 30 Jun 2023 10:18:45 +0000 (12:18 +0200)
committerHelge Deller <deller@gmx.de>
Fri, 30 Jun 2023 15:14:14 +0000 (17:14 +0200)
No need to keep an extra 32-bit audit_classify_syscall() function.

Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/kernel/audit.c
arch/parisc/kernel/compat_audit.c

index f420b55521402b4ffee9c08949c68903d553b814..375cd73b52814ccd0df23d70b3697e792c9727d0 100644 (file)
@@ -40,11 +40,6 @@ int audit_classify_arch(int arch)
 
 int audit_classify_syscall(int abi, unsigned syscall)
 {
-#ifdef CONFIG_COMPAT
-       extern int parisc32_classify_syscall(unsigned);
-       if (abi == AUDIT_ARCH_PARISC)
-               return parisc32_classify_syscall(syscall);
-#endif
        switch (syscall) {
        case __NR_open:
                return AUDITSC_OPEN;
@@ -55,6 +50,10 @@ int audit_classify_syscall(int abi, unsigned syscall)
        case __NR_openat2:
                return AUDITSC_OPENAT2;
        default:
+#ifdef CONFIG_COMPAT
+               if (abi == AUDIT_ARCH_PARISC)
+                       return AUDITSC_COMPAT;
+#endif
                return AUDITSC_NATIVE;
        }
 }
index 539b16891bdf4609d019949436f11a45be270624..3ac53f1ab8609ab688c4698aa7ec4b55ab2cf357 100644 (file)
@@ -26,19 +26,3 @@ unsigned int parisc32_signal_class[] = {
 #include <asm-generic/audit_signal.h>
 ~0U
 };
-
-int parisc32_classify_syscall(unsigned syscall)
-{
-       switch (syscall) {
-       case __NR_open:
-               return AUDITSC_OPEN;
-       case __NR_openat:
-               return AUDITSC_OPENAT;
-       case __NR_execve:
-               return AUDITSC_EXECVE;
-       case __NR_openat2:
-               return AUDITSC_OPENAT2;
-       default:
-               return AUDITSC_COMPAT;
-       }
-}