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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <153FD6B5CE4F97D9+ZuOYDQ-iHIIwJjbh@HX09040029.powercore.com.cn>
Date: Fri, 13 Sep 2024 09:40:29 +0800
From: Luming Yu <luming.yu@...ngroup.cn>
To: Christophe Leroy <christophe.leroy@...roup.eu>
Cc: linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
	mpe@...erman.id.au, npiggin@...il.com, jialong.yang@...ngroup.cn,
	luming.yu@...il.com
Subject: Re: [PATCH 1/2] powerpc/entry: convert to common and generic entry

On Thu, Sep 12, 2024 at 12:23:29PM +0200, Christophe Leroy wrote:
> 
> 
> Le 12/09/2024 à 10:24, Luming Yu a écrit :
> > From: Yu Luming <luming.yu@...il.com>
> > 
> > convert powerpc entry code in syscall and fault to use syscall_work
> > and irqentry_state as well as common calls from 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          | 6 +++++-
> >   arch/powerpc/mm/fault.c                | 5 +++++
> >   7 files changed, 28 insertions(+), 1 deletion(-)
> 
> There is another build problem:
> 
>   CC      kernel/entry/common.o
> kernel/entry/common.c: In function 'irqentry_exit':
> kernel/entry/common.c:335:21: error: implicit declaration of function
> 'regs_irqs_disabled'; did you mean 'raw_irqs_disabled'?
> [-Werror=implicit-function-declaration]
>   335 |         } else if (!regs_irqs_disabled(regs)) {
>       |                     ^~~~~~~~~~~~~~~~~~
>       |                     raw_irqs_disabled
> 
> 
> You have put regs_irqs_disabled() in a section dedicated to PPC64, so it
> fails on PPC32.
> 
> 
> After fixing this problem and providing an empty asm/entry-common.h it is
> now possible to build the kernel. But that's not enough, the board is stuck
> after:
> 
> ...
> [    2.871391] Freeing unused kernel image (initmem) memory: 1228K
> [    2.877990] Run /init as init process

Thanks for these questions. :-)
I haven't gotten chance to run it in ppc32 qemu.
the common syscall trace enter lost this hunk
-       if (!is_32bit_task())
-               audit_syscall_entry(regs->gpr[0], regs->gpr[3], regs->gpr[4],
-                                   regs->gpr[5], regs->gpr[6]);
-       else
-               audit_syscall_entry(regs->gpr[0],
-                                   regs->gpr[3] & 0xffffffff,
-                                   regs->gpr[4] & 0xffffffff,
-                                   regs->gpr[5] & 0xffffffff,
-                                   regs->gpr[6] & 0xffffffff);
which I don't understand whether we need a arch callbacks for it.

Before I sent out the RFC patch set, the very limited compile and boot test goes well with a ppc64 qemu VM. Surely, there will be a lot of test, debug and following up patch set update that is necessary to make it a complete convert.

And the patch set should really be re-named to RFC and v1. 

Cheers  

> 
> 
> Christophe
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ