Thread (19 messages) flat view 19 messages, 4 authors, 2022-03-15

Re: [PATCH 5/6] audit: Declare ppc32_classify_syscall()

From: Cédric Le Goater <clg@kaod.org>
Date: 2021-08-23 08:35:39

On 8/23/21 10:28 AM, Christophe Leroy wrote:

Le 19/08/2021 à 16:56, Christophe Leroy a écrit :
quoted

Le 19/08/2021 à 14:56, Cédric Le Goater a écrit :
quoted
This fixes a compile error with W=1.

Cc: Christophe Leroy <redacted>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---

  I don't think this is correct. Which file could we use ?
I think you can completely remove ppc32_classify_syscall(), and instead add the following in the default case in audit_classify_syscall():

      default:
+        if (IS_ENABLED(CONFIG_PPC64) && abi == AUDIT_ARCH_PPC)
+            return 1;
          return 0;
Forget that comment, it was crazy, because PPC32 and PPC64 use different syscall numbers.

By the way, I have submitted a patch to completely remove this stuff, see https://patchwork.ozlabs.org/project/linuxppc-dev/patch/dc14509a28a993738b1325211f412be72a4f9b1e.1629701132.git.christophe.leroy@csgroup.eu/
Nice ! Let's merge that instead.

Thanks,

C. 

quoted
quoted
  arch/powerpc/include/asm/unistd.h | 3 +++
  arch/powerpc/kernel/audit.c       | 1 -
  2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h
index b541c690a31c..d9025a7e973c 100644
--- a/arch/powerpc/include/asm/unistd.h
+++ b/arch/powerpc/include/asm/unistd.h
@@ -47,6 +47,9 @@
  #define __ARCH_WANT_SYS_UTIME
  #define __ARCH_WANT_SYS_NEWFSTATAT
  #define __ARCH_WANT_COMPAT_SYS_SENDFILE
+#ifdef CONFIG_AUDIT
+extern int ppc32_classify_syscall(unsigned int syscall);
+#endif
  #endif
  #define __ARCH_WANT_SYS_FORK
  #define __ARCH_WANT_SYS_VFORK
diff --git a/arch/powerpc/kernel/audit.c b/arch/powerpc/kernel/audit.c
index a2dddd7f3d09..c3c6c6a1069b 100644
--- a/arch/powerpc/kernel/audit.c
+++ b/arch/powerpc/kernel/audit.c
@@ -41,7 +41,6 @@ int audit_classify_arch(int arch)
  int audit_classify_syscall(int abi, unsigned syscall)
  {
  #ifdef CONFIG_PPC64
-    extern int ppc32_classify_syscall(unsigned);
      if (abi == AUDIT_ARCH_PPC)
          return ppc32_classify_syscall(syscall);
  #endif
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help