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] [day] [month] [year] [list]
Message-ID: <CAJF2gTTXtkCnv4vHXS1H=L=gbbVd1wyijteq7WjgC4KiSPuHfw@mail.gmail.com>
Date:   Thu, 19 Jan 2023 13:46:20 +0800
From:   Guo Ren <guoren@...nel.org>
To:     Conor Dooley <conor.dooley@...rochip.com>
Cc:     arnd@...db.de, palmer@...osinc.com, tglx@...utronix.de,
        peterz@...radead.org, luto@...nel.org, heiko@...ech.de,
        jszhang@...nel.org, lazyparser@...il.com, falcon@...ylab.org,
        chenhuacai@...nel.org, apatel@...tanamicro.com,
        atishp@...shpatra.org, mark.rutland@....com, ben@...adent.org.uk,
        bjorn@...nel.org, linux-arch@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-riscv@...ts.infradead.org,
        Guo Ren <guoren@...ux.alibaba.com>,
        Björn Töpel <bjorn@...osinc.com>,
        Yipeng Zou <zouyipeng@...wei.com>
Subject: Re: [PATCH -next V14 4/7] riscv: entry: Convert to generic entry

Thx, I got that:

  LD      vmlinux
riscv64-unknown-linux-gnu-ld: arch/riscv/kernel/traps.o: in function
`do_trap_ecall_u':
/home/guoren/source/kernel/linux/arch/riscv/kernel/traps.c:245:
undefined reference to `handle_page_fault'
make[2]: *** [/home/guoren/source/kernel/linux/scripts/Makefile.vmlinux:34:
vmlinux] Error 1
make[1]: *** [/home/guoren/source/kernel/linux/Makefile:1252: vmlinux] Error 2
make[1]: Leaving directory '/home/guoren/source/kernel/build-nommu'
make: *** [Makefile:242: __sub-make] Error 2

Sorry.

And here is the fixup:

diff --git a/arch/riscv/kernel/traps.c b/arch/riscv/kernel/traps.c
index 0b764071de8c..69d619ddbcd5 100644
--- a/arch/riscv/kernel/traps.c
+++ b/arch/riscv/kernel/traps.c
@@ -268,6 +268,7 @@ asmlinkage __visible __trap_section void
do_trap_ecall_u(struct pt_regs *regs)

 }

+#ifdef CONFIG_MMU
 asmlinkage __visible noinstr void do_page_fault(struct pt_regs *regs)
 {
        irqentry_state_t state = irqentry_enter(regs);
@@ -278,6 +279,7 @@ asmlinkage __visible noinstr void
do_page_fault(struct pt_regs *regs)

        irqentry_exit(regs, state);
 }
+#endif

 asmlinkage __visible noinstr void do_irq(struct pt_regs *regs)
 {

On Fri, Jan 13, 2023 at 5:23 PM Conor Dooley <conor.dooley@...rochip.com> wrote:
>
> Hey Guo Ren,
>
> On Thu, Jan 12, 2023 at 04:58:45AM -0500, guoren@...nel.org wrote:
> > From: Guo Ren <guoren@...ux.alibaba.com>
> >
> > This patch converts riscv to use the generic entry infrastructure from
> > kernel/entry/*. The generic entry makes maintainers' work easier and
> > codes more elegant. Here are the changes:
> >
> >  - More clear entry.S with handle_exception and ret_from_exception
> >  - Get rid of complex custom signal implementation
> >  - Move syscall procedure from assembly to C, which is much more
> >    readable.
> >  - Connect ret_from_fork & ret_from_kernel_thread to generic entry.
> >  - Wrap with irqentry_enter/exit and syscall_enter/exit_from_user_mode
> >  - Use the standard preemption code instead of custom
> >
> > Suggested-by: Huacai Chen <chenhuacai@...nel.org>
> > Reviewed-by: Björn Töpel <bjorn@...osinc.com>
> > Tested-by: Yipeng Zou <zouyipeng@...wei.com>
> > Tested-by: Jisheng Zhang <jszhang@...nel.org>
> > Signed-off-by: Guo Ren <guoren@...ux.alibaba.com>
> > Signed-off-by: Guo Ren <guoren@...nel.org>
> > Cc: Ben Hutchings <ben@...adent.org.uk>
>
> Unfortunately from this patch onwards, the !MMU build is broken.
> Should be able to reproduce it with nommu_virt_defconfig.
>
> Thanks,
> Conor.
>


-- 
Best Regards
 Guo Ren

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ