Module Name:    src
Committed By:   maxv
Date:           Sat Oct  7 10:16:47 UTC 2017

Modified Files:
        src/sys/arch/amd64/conf: Makefile.amd64
Added Files:
        src/sys/arch/amd64/conf: GENERIC_KASLR

Log Message:
Add GENERIC_KASLR, only toolchain parts for now.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/amd64/conf/GENERIC_KASLR
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/amd64/conf/Makefile.amd64

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/amd64/conf/Makefile.amd64
diff -u src/sys/arch/amd64/conf/Makefile.amd64:1.58 src/sys/arch/amd64/conf/Makefile.amd64:1.59
--- src/sys/arch/amd64/conf/Makefile.amd64:1.58	Wed Aug  9 19:11:13 2017
+++ src/sys/arch/amd64/conf/Makefile.amd64	Sat Oct  7 10:16:47 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.amd64,v 1.58 2017/08/09 19:11:13 maxv Exp $
+#	$NetBSD: Makefile.amd64,v 1.59 2017/10/07 10:16:47 maxv Exp $
 
 # Makefile for NetBSD
 #
@@ -61,7 +61,11 @@ KERN_AS=	library
 ## (5) link settings
 ##
 TEXTADDR?=	0xffffffff80200000
+.if defined(KASLR)
+EXTRA_LINKFLAGS=	-z max-page-size=0x200000 -r -d
+.else
 EXTRA_LINKFLAGS=	-z max-page-size=0x200000
+.endif
 LINKFLAGS_NORMAL=	-X
 KERNLDSCRIPT?= ${AMD64}/conf/kern.ldscript
 

Added files:

Index: src/sys/arch/amd64/conf/GENERIC_KASLR
diff -u /dev/null src/sys/arch/amd64/conf/GENERIC_KASLR:1.1
--- /dev/null	Sat Oct  7 10:16:47 2017
+++ src/sys/arch/amd64/conf/GENERIC_KASLR	Sat Oct  7 10:16:47 2017
@@ -0,0 +1,5 @@
+# $NetBSD: GENERIC_KASLR,v 1.1 2017/10/07 10:16:47 maxv Exp $
+
+include "arch/amd64/conf/GENERIC"
+
+makeoptions 	KASLR=1		# Kernel ASLR

Reply via email to