Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kbuild: add '-fno-stack-check' to kernel build options
It appears that hardened gentoo enables "-fstack-check" by default for gcc. That doesn't work _at_all_ for the kernel, because the kernel stack doesn't act like a user stack at all: it's much smaller, and it doesn't auto-expand on use. So the extra "probe one page below the stack" code generated by -fstack-check just breaks the kernel in horrible ways, causing infinite double faults etc. [ I have to say, that the particular code gcc generates looks very stupid even for user space where it works, but that's a separate issue. ] Reported-and-tested-by: Alexander Tsoy <[email protected]> Reported-and-tested-by: Toralf Förster <[email protected]> Cc: [email protected] Cc: Dave Hansen <[email protected]> Cc: Jiri Kosina <[email protected]> Cc: Andy Lutomirski <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information