lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87o73b37pw.fsf@mail.lhotse>
Date: Wed, 23 Oct 2024 12:53:47 +1100
From: Michael Ellerman <mpe@...erman.id.au>
To: 虞陆铭 <luming.yu@...ngroup.cn>, Christophe Leroy
 <christophe.leroy@...roup.eu>, linuxppc-dev
 <linuxppc-dev@...ts.ozlabs.org>, linux-kernel
 <linux-kernel@...r.kernel.org>, npiggin <npiggin@...il.com>,
 "jialong.yang" <jialong.yang@...ngroup.cn>, "luming.yu"
 <luming.yu@...il.com>
Subject: Re: [PATCH 1/7] powerpc/entry: convert to common and generic entry

"虞陆铭" <luming.yu@...ngroup.cn> writes:
>>Le 12/10/2024 à 05:56, Luming Yu a écrit :
>>> convert powerpc entry code in syscall and fault to use syscall_work
>>> and irqentry_state as well as common calls implemented in generic
>>> entry infrastructure.
>>> 
>>> Signed-off-by: Luming Yu <luming.yu@...ngroup.cn>
>>> ---
>>>   arch/powerpc/Kconfig                   | 1 +
>>>   arch/powerpc/include/asm/hw_irq.h      | 5 +++++
>>>   arch/powerpc/include/asm/processor.h   | 6 ++++++
>>>   arch/powerpc/include/asm/syscall.h     | 5 +++++
>>>   arch/powerpc/include/asm/thread_info.h | 1 +
>>>   arch/powerpc/kernel/syscall.c          | 5 ++++-
>>>   arch/powerpc/mm/fault.c                | 3 +++
>>>   7 files changed, 25 insertions(+), 1 deletion(-)
>>> 
>>
>>...
>>
>>> diff --git a/arch/powerpc/kernel/syscall.c b/arch/powerpc/kernel/syscall.c
>>> index 77fedb190c93..e0338bd8d383 100644
>>> --- a/arch/powerpc/kernel/syscall.c
>>> +++ b/arch/powerpc/kernel/syscall.c
>>> @@ -3,6 +3,7 @@
>>>   #include <linux/compat.h>
>>>   #include <linux/context_tracking.h>
>>>   #include <linux/randomize_kstack.h>
>>> +#include <linux/entry-common.h>
>>>   
>>>   #include <asm/interrupt.h>
>>>   #include <asm/kup.h>
>>> @@ -131,7 +132,7 @@ notrace long system_call_exception(struct pt_regs *regs, unsigned long r0)
>>>   		 * and the test against NR_syscalls will fail and the return
>>>   		 * value to be used is in regs->gpr[3].
>>>   		 */
>>> -		r0 = do_syscall_trace_enter(regs);
>>> +		r0 = syscall_enter_from_user_mode(regs, r0);
>>
>>Can you provide details on how this works ?
> I assume the common entry would take over th details.
> So I just made the switch from the high level call.
>
> As you said as the subtle ABI requirement about regs->r3 needs to
> be restored, I'm wondering which test can capture the lost
> ABI feature. As simple Boot test is insufficient, what is the test set
> that can capture it?

The seccomp selftest did exercise it back when I originally wrote that
code. I don't know for sure that it still does, but that would be a good
start.

It's in tools/testing/selftests/seccomp/

cheers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ