]> Git Repo - linux.git/commit
um: allocate a guard page to helper threads
authorJohannes Berg <[email protected]>
Sat, 5 Dec 2020 20:50:18 +0000 (21:50 +0100)
committerRichard Weinberger <[email protected]>
Sun, 13 Dec 2020 21:38:06 +0000 (22:38 +0100)
commitef4459a6da0955b533ebfc97a7d756ac090f50c9
tree5c1153080467c99b2f60942757f644d38338319b
parent963285b0b47a1b8e1dfa5481717855a7057ccec6
um: allocate a guard page to helper threads

We've been running into stack overflows in helper threads
corrupting memory (e.g. because somebody put printf() or
os_info() there), so to avoid those causing hard-to-debug
issues later on, allocate a guard page for helper thread
stacks and mark it read-only.

Unfortunately, the crash dump at that point is useless as
the stack tracer will try to backtrace the *kernel* thread,
not the helper thread, but at least we don't survive to a
random issue caused by corruption.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Richard Weinberger <[email protected]>
arch/um/drivers/ubd_kern.c
arch/um/include/shared/kern_util.h
arch/um/kernel/process.c
arch/um/os-Linux/helper.c
This page took 0.062359 seconds and 4 git commands to generate.