Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/amd64/conf Add GENERIC_KASLR, only toolchain parts ...
details: https://anonhg.NetBSD.org/src/rev/d4b10bbaa624
branches: trunk
changeset: 356638:d4b10bbaa624
user: maxv <maxv%NetBSD.org@localhost>
date: Sat Oct 07 10:16:47 2017 +0000
description:
Add GENERIC_KASLR, only toolchain parts for now.
diffstat:
sys/arch/amd64/conf/GENERIC_KASLR | 5 +++++
sys/arch/amd64/conf/Makefile.amd64 | 6 +++++-
2 files changed, 10 insertions(+), 1 deletions(-)
diffs (30 lines):
diff -r 9b720ea400b0 -r d4b10bbaa624 sys/arch/amd64/conf/GENERIC_KASLR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/amd64/conf/GENERIC_KASLR Sat Oct 07 10:16:47 2017 +0000
@@ -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
diff -r 9b720ea400b0 -r d4b10bbaa624 sys/arch/amd64/conf/Makefile.amd64
--- a/sys/arch/amd64/conf/Makefile.amd64 Sat Oct 07 00:06:11 2017 +0000
+++ b/sys/arch/amd64/conf/Makefile.amd64 Sat Oct 07 10:16:47 2017 +0000
@@ -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 @@
## (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
Home |
Main Index |
Thread Index |
Old Index