On Wed, Apr 02, 2025 at 04:26:50PM +0800, Kang Wenlin wrote:
From: Wenlin Kang wenlin.kang@windriver.com
The selftest tpdir2 terminated with a 'Segmentation fault' during loading.
root@localhost:~# cd linux-kenel/tools/testing/selftests/arm64/abi && make root@localhost:~/linux-kernel/tools/testing/selftests/arm64/abi# ./tpidr2 Segmentation fault
The cause of this is the __arch_clear_user() failure.
load_elf_binary() [fs/binfmt_elf.c] -> if (likely(elf_bss != elf_brk) && unlikely(padzero(elf_bes))) -> padzero() -> clear_user() [arch/arm64/include/asm/uaccess.h] -> __arch_clear_user() [arch/arm64/lib/clear_user.S]
For more details, please see: https://lore.kernel.org/lkml/1d0342f3-0474-482b-b6db-81ca7820a462@t-8ch.de/T...
This is just a userspace issue (i.e. don't do that, and if you do want to do that, use a new kernel!)
Why do these changes need to be backported, do you have real users that are crashing in this way to require these changes?
thanks,
greg k-h