mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 02:44:41 +01:00
The unwinder code in libgcc has a long standing bug which causes it to
fail to pick up the signal frame CFI flag. This is a generic bug
across all platforms.
It affects the __kernel_sigreturn and __kernel_rt_sigreturn vdso entry
points on i386. The x86-64 kernel doesn't provide a sigreturn stub,
and so there is no kernel-provided code that is affected on x86-64.
libgcc does have a legacy fallback path which happens to work as long
as the bytes immediately before each of the sigreturn functions fall
outside any function. This patch adds a nop before the ALIGN to each
of the sigreturn stubs to ensure that this is, indeed, the case.
The rest of the patch is just a comment which documents the invariants
that need to be maintained for this legacy path to work correctly.
This is a manifest bug: in the current vdso, __kernel_vsyscall is a
multiple of 16 bytes long and thus __kernel_sigreturn does not have
any padding in front of it.
Closes: https://lore.kernel.org/lkml/f3412cc3e8f66d1853cc9d572c0f2fab076872b1.camel@xry111.site
Fixes:
|
||
|---|---|---|
| .. | ||
| syscalls | ||
| vdso | ||
| vsyscall | ||
| calling.h | ||
| entry.S | ||
| entry_32.S | ||
| entry_64.S | ||
| entry_64_compat.S | ||
| entry_64_fred.S | ||
| entry_fred.c | ||
| Makefile | ||
| syscall_32.c | ||
| syscall_64.c | ||
| thunk.S | ||