linux-stable/arch/x86/um
Johannes Berg adf9ae0d15 um: fix stub location calculation
In commit 9f0b4807a4 ("um: rework userspace stubs to not hard-code
stub location") I changed stub_segv_handler() to do a calculation with
a pointer to a stack variable to find the data page that we're using
for the stack and the rest of the data. This same commit was meant to
do it as well for stub_clone_handler(), but the change inadvertently
went into commit 84b2789d61 ("um: separate child and parent errors
in clone stub") instead.

This was reported to not be compiled correctly by gcc 5, causing the
code to crash here. I'm not sure why, perhaps it's UB because the var
isn't initialized? In any case, this trick always seemed bad, so just
create a new inline function that does the calculation in assembly.

Reported-by: subashab@codeaurora.org
Fixes: 9f0b4807a4 ("um: rework userspace stubs to not hard-code stub location")
Fixes: 84b2789d61 ("um: separate child and parent errors in clone stub")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
2021-08-26 22:28:03 +02:00
..
asm um: elf.h: Fix W=1 warning for empty body in 'do' statement 2021-04-15 23:10:50 +02:00
os-Linux um: remove process stub VMA 2021-02-12 21:37:38 +01:00
shared/sysdep um: fix stub location calculation 2021-08-26 22:28:03 +02:00
vdso kbuild: remove cc-option test of -fno-stack-protector 2020-07-07 11:13:10 +09:00
bugs_32.c
bugs_64.c
checksum_32.S
delay.c
elfcore.c
fault.c
Kconfig kbuild: use KBUILD_DEFCONFIG as the fallback for DEFCONFIG_LIST 2020-03-03 20:49:21 +09:00
ldt.c
Makefile um: Add 2 missing libs to fix various build errors 2021-04-15 23:10:40 +02:00
mem_32.c
mem_64.c
ptrace_32.c
ptrace_64.c um: Remove dead usage of TIF_IA32 2020-10-11 23:19:36 +02:00
ptrace_user.c
setjmp_32.S
setjmp_64.S
signal.c
stub_32.S um: rework userspace stubs to not hard-code stub location 2021-02-12 21:35:02 +01:00
stub_64.S um: rework userspace stubs to not hard-code stub location 2021-02-12 21:35:02 +01:00
stub_segv.c um: fix stub location calculation 2021-08-26 22:28:03 +02:00
sys_call_table_32.c x86/uml/syscalls: Remove array index from syscall initializers 2021-05-25 16:59:23 +02:00
sys_call_table_64.c x86/uml/syscalls: Remove array index from syscall initializers 2021-05-25 16:59:23 +02:00
syscalls_32.c
syscalls_64.c
sysrq_32.c
sysrq_64.c
tls_32.c um: Implement copy_thread_tls 2020-01-07 13:31:29 +01:00
tls_64.c um: Implement copy_thread_tls 2020-01-07 13:31:29 +01:00
user-offsets.c um: Some fixes to build UML with musl 2020-10-11 23:13:06 +02:00