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: <CACRpkdZhU=+ZaCw2rmuN2=tCDXWppRtNsfLjfjD505aFJ_Xo2A@mail.gmail.com>
Date: Wed, 15 May 2024 21:33:27 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Geert Uytterhoeven <geert+renesas@...der.be>
Cc: Russell King <linux@...linux.org.uk>, Catalin Marinas <catalin.marinas@....com>, 
	Kees Cook <keescook@...omium.org>, Russell King <rmk+kernel@...linux.org.uk>, 
	Florian Fainelli <florian.fainelli@...adcom.com>, Ard Biesheuvel <ardb@...nel.org>, 
	Arnd Bergmann <arnd@...db.de>, Stefan Wahren <wahrenst@....net>, linux-arm-kernel@...ts.infradead.org, 
	linux-renesas-soc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ARM: Fix userspace enter on LPAE with CC_OPTIMIZE_FOR_SIZE=y

On Wed, May 15, 2024 at 4:02 PM Geert Uytterhoeven
<geert+renesas@...der.be> wrote:

> Booting an LPAE-enabled kernel built with CONFIG_CC_OPTIMIZE_FOR_SIZE=y
> fails when starting userspace:
>
>     Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
>     CPU: 1 PID: 1 Comm: init Tainted: G        W        N 6.9.0-rc1-koelsch-00004-g7af5b901e847 #1930
>     Hardware name: Generic R-Car Gen2 (Flattened Device Tree)
>     Call trace:
>      unwind_backtrace from show_stack+0x10/0x14
>      show_stack from dump_stack_lvl+0x78/0xa8
>      dump_stack_lvl from panic+0x118/0x398
>      panic from do_exit+0x1ec/0x938
>      do_exit from sys_exit_group+0x0/0x10
>     ---[ end Kernel panic - not syncing: Attempted to kill init!  exitcode=0x00000004 ]---
>
> Add the missing memory clobber to cpu_set_ttbcr(), as suggested by
> Russell King.
>
> Force inlining of uaccess_save_and_enable(), as suggested by Ard
> Biesheuvel.
>
> The latter fixes booting on Koelsch.
>
> Fixes: 7af5b901e84743c6 ("ARM: 9358/2: Implement PAN for LPAE by TTBR0 page table walks disablement")
> Closes: https://lore.kernel.org/r/CAMuHMdWTAJcZ9BReWNhpmsgkOzQxLNb5OhNYxzxv6D5TSh2fwQ@mail.gmail.com/
> Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>

Reviewed-by: Linus Walleij <linus.walleij@...aro.org>

Thanks for digging into this, both you and Ard! And we found the root
cause it seems.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ