diff options
author | Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> | 2006-05-01 15:16:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-05-01 21:17:45 -0400 |
commit | 275e6e1ee2bafde77e9390b27e876fa83f24cb60 (patch) | |
tree | fca0c0a7e3bdabe82bc75a0dad5c765f3b6edaf0 /arch/um/sys-x86_64 | |
parent | cb8aa3d29b562e4c16fdfa4ecc8170ddc55397f4 (diff) |
[PATCH] uml: fix compilation and execution with hardened GCC
To make some half-assembly stubs compile, disable various "hardened" GCC
features:
*) we can't make it build PIC code as we need %ebx to do syscalls and GCC
wants it free for PIC
*) we can't leave stack protection as the stub is moved (not relocated!) in
memory so the RIP-relative access to the canary tries reading from an
unmapped address and causes a segfault, since we move the stub of various
megabytes (the exact amount will be decided at runtime) away from the
link-time address.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/sys-x86_64')
-rw-r--r-- | arch/um/sys-x86_64/Makefile | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/um/sys-x86_64/Makefile b/arch/um/sys-x86_64/Makefile index f739bea35195..6d3b29c74533 100644 --- a/arch/um/sys-x86_64/Makefile +++ b/arch/um/sys-x86_64/Makefile | |||
@@ -21,6 +21,8 @@ USER_OBJS := ptrace_user.o sigcontext.o stub_segv.o | |||
21 | USER_OBJS += user-offsets.s | 21 | USER_OBJS += user-offsets.s |
22 | extra-y += user-offsets.s | 22 | extra-y += user-offsets.s |
23 | 23 | ||
24 | CFLAGS_stub_segv.o := $(CFLAGS_NO_HARDENING) | ||
25 | |||
24 | extra-$(CONFIG_MODE_TT) += unmap.o | 26 | extra-$(CONFIG_MODE_TT) += unmap.o |
25 | 27 | ||
26 | include arch/um/scripts/Makefile.rules | 28 | include arch/um/scripts/Makefile.rules |