Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/modules Not all platforms can do PaX stuff. The list wa...



details:   https://anonhg.NetBSD.org/src/rev/126af3f3d8a6
branches:  trunk
changeset: 747500:126af3f3d8a6
user:      jnemeth <jnemeth%NetBSD.org@localhost>
date:      Thu Sep 17 23:07:12 2009 +0000

description:
Not all platforms can do PaX stuff.  The list was derived in private
conversation with several developers.  The change was tested on
sparc64.

NetBSD ultra.example.ca 5.99.17 NetBSD 5.99.17 (MODULAR) #0: Tue Sep 15 19:08:02 PDT 2009  jnemeth%ultra.example.ca@localhost:/usr/local/current/objdir/sys/arch/sparc64/compile/MODULAR sparc64

NAME            CLASS   SOURCE  REFS    SIZE    REQUIRES
...
exec_elf64      misc    filesys 0       6981    coredump
...

diffstat:

 sys/modules/exec_elf32/Makefile |  14 ++++++++++++--
 sys/modules/exec_elf64/Makefile |   8 ++++++--
 2 files changed, 18 insertions(+), 4 deletions(-)

diffs (46 lines):

diff -r 220aa2b163b8 -r 126af3f3d8a6 sys/modules/exec_elf32/Makefile
--- a/sys/modules/exec_elf32/Makefile   Thu Sep 17 20:21:54 2009 +0000
+++ b/sys/modules/exec_elf32/Makefile   Thu Sep 17 23:07:12 2009 +0000
@@ -1,10 +1,20 @@
-#      $NetBSD: Makefile,v 1.1 2008/11/19 18:36:08 ad Exp $
+#      $NetBSD: Makefile,v 1.2 2009/09/17 23:07:12 jnemeth Exp $
 
 .include "../Makefile.inc"
 
 KMOD=  exec_elf32
 
-CPPFLAGS+=     -DEXEC_ELF32 -DPAX_ASLR -DCOREDUMP
+CPPFLAGS+=     -DEXEC_ELF32 -DCOREDUMP
+.if ${MACHINE_ARCH} != "arm" && \
+    ${MACHINE_ARCH} != "armeb" && \
+    ${MACHINE_ARCH} != "m68000" && \
+    ${MACHINE_ARCH} != "m68k" && \
+    ${MACHINE_ARCH} != "powerpc" && \
+    ${MACHINE_ARCH} != "powerpc64" && \
+    ${MACHINE_ARCH} != "sparc" && \
+    ${MACHINE_ARCH} != "sparc64"
+CPPFLAGS+=     -DPAX_ASLR
+.endif
 
 .PATH: ${S}/kern
 SRCS=  exec_elf32.c core_elf32.c
diff -r 220aa2b163b8 -r 126af3f3d8a6 sys/modules/exec_elf64/Makefile
--- a/sys/modules/exec_elf64/Makefile   Thu Sep 17 20:21:54 2009 +0000
+++ b/sys/modules/exec_elf64/Makefile   Thu Sep 17 23:07:12 2009 +0000
@@ -1,10 +1,14 @@
-#      $NetBSD: Makefile,v 1.1 2008/11/19 18:36:08 ad Exp $
+#      $NetBSD: Makefile,v 1.2 2009/09/17 23:07:12 jnemeth Exp $
 
 .include "../Makefile.inc"
 
 KMOD=  exec_elf64
 
-CPPFLAGS+=     -DEXEC_ELF64 -DPAX_ASLR -DCOREDUMP
+CPPFLAGS+=     -DEXEC_ELF64 -DCOREDUMP
+.if ${MACHINE_ARCH} != "powerpc64" && \
+    ${MACHINE_ARCH} != "sparc64"
+CPPFLAGS+=     -DPAX_ASLR
+.endif
 
 .PATH: ${S}/kern
 SRCS=  exec_elf64.c core_elf64.c



Home | Main Index | Thread Index | Old Index