summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Young <dyoung@redhat.com>2012-12-10 11:07:32 +0800
committerSimon Horman <horms@verge.net.au>2012-12-13 09:14:35 +0900
commit8908ee4b164abe6f038b74d2067e6271346422ac (patch)
tree44d95862cb59ad019b014b75921c12977d5a8946
parent1e91e0a30f2236e070b5d1fb01b2b437993d001d (diff)
downloadkexec-tools-8908ee4b164abe6f038b74d2067e6271346422ac.tar.gz
ppc: exec stack fix
execstack shows ppc kexec has an executable stack, this leaves it vulnerable to buffer overflows. Fix it by adding ASFLAGS --noexecstack Tested on PowerMac G4 Macmini: Without the patch: dave@darkstar:~/kexec-tools$ execstack build/sbin/kexec X build/sbin/kexec With the patch: dave@darkstar:~/kexec-tools$ execstack build/sbin/kexec - build/sbin/kexec Signed-off-by: Dave Young <dyoung@redhat.com> Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--kexec/arch/ppc/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/kexec/arch/ppc/Makefile b/kexec/arch/ppc/Makefile
index 5225a8f7..312c2b9a 100644
--- a/kexec/arch/ppc/Makefile
+++ b/kexec/arch/ppc/Makefile
@@ -24,6 +24,8 @@ CPPFLAGS+=-I$(srcdir)/kexec/libfdt
ppc_KEXEC_SRCS += $(libfdt_SRCS) $(ppc_libfdt_SRCS)
+ASFLAGS += -Wa,--noexecstack
+
dist += kexec/arch/ppc/Makefile $(ppc_KEXEC_SRCS) \
kexec/arch/ppc/crashdump-powerpc.h kexec/arch/ppc/fixup_dtb.h \
kexec/arch/ppc/kexec-ppc.h kexec/arch/ppc/ops.h \