All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: "Cédric Le Goater" <clg@kaod.org>, linuxppc-dev@lists.ozlabs.org
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Subject: Re: [PATCH 5/6] audit: Declare ppc32_classify_syscall()
Date: Thu, 19 Aug 2021 20:36:07 +0200	[thread overview]
Message-ID: <54d4ac4b-022b-6e8c-e07f-15de90935ff9@csgroup.eu> (raw)
In-Reply-To: <d268f141-4ec3-eb1d-a6c1-4cd5f535ea49@csgroup.eu>



Le 19/08/2021 à 16:56, Christophe Leroy a écrit :
> 
> 
> Le 19/08/2021 à 14:56, Cédric Le Goater a écrit :
>> This fixes a compile error with W=1.
>>
>> Cc: Christophe Leroy <christophe.leroy@c-s.fr>
>> 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;
> 

After looking more in details, in fact I think we should convert powerpc to 
CONFIG_AUDIT_ARCH_COMPAT_GENERIC

> 
>>
>>   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
>>

  reply	other threads:[~2021-08-19 18:36 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-19 12:56 [PATCH 0/6] W=1 fixes Cédric Le Goater
2021-08-19 12:56 ` [PATCH 1/6] powerpc/prom: Introduce early_reserve_mem_old() Cédric Le Goater
2021-08-19 14:42   ` Christophe Leroy
2021-08-20 12:22     ` Michael Ellerman
2021-08-23  8:20     ` Cédric Le Goater
2021-08-19 12:56 ` [PATCH 2/6] powerpc/pseries/vas: Declare pseries_vas_fault_thread_fn() as static Cédric Le Goater
2021-08-19 12:56 ` [PATCH 3/6] KVM: PPC: Book3S PR: Declare kvmppc_handle_exit_pr() Cédric Le Goater
2021-08-19 14:44   ` Christophe Leroy
2021-08-20 12:22     ` Michael Ellerman
2021-08-19 12:56 ` [PATCH 4/6] KVM: PPC: Book3S PR: Remove unused variable Cédric Le Goater
2021-08-19 12:56 ` [PATCH 5/6] audit: Declare ppc32_classify_syscall() Cédric Le Goater
2021-08-19 14:56   ` Christophe Leroy
2021-08-19 18:36     ` Christophe Leroy [this message]
2021-08-23  8:28     ` Christophe Leroy
2021-08-23  8:35       ` Cédric Le Goater
2021-08-19 12:56 ` [PATCH 6/6] powerpc/compat_sys: Declare syscalls Cédric Le Goater
2021-08-20 12:25   ` Michael Ellerman
2022-03-15 11:45   ` Christophe Leroy
2021-08-27 13:15 ` [PATCH 0/6] W=1 fixes Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54d4ac4b-022b-6e8c-e07f-15de90935ff9@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=christophe.leroy@c-s.fr \
    --cc=clg@kaod.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.