summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2013-12-28 17:57:15 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2013-12-28 17:57:15 +0000
commit4a75b1afc24240f0320911070f95ddf644b8cac7 (patch)
tree89acef99219ffe3bab5c712444c86461dae34f1b
parent1fc192bf733af0c23488cd1d8c4a9e2d4ffde102 (diff)
Require an explicit PT_OPENBSD_RANDOMIZE program header in the kernel linker
script (note that the amd64 linker script is currently not used). Discussed with deraadt@
-rw-r--r--sys/arch/amd64/conf/kern.ldscript3
-rw-r--r--sys/arch/sparc64/conf/ld.script3
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/amd64/conf/kern.ldscript b/sys/arch/amd64/conf/kern.ldscript
index 4258dbf5d10..2b2b658d73b 100644
--- a/sys/arch/amd64/conf/kern.ldscript
+++ b/sys/arch/amd64/conf/kern.ldscript
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern.ldscript,v 1.2 2013/03/21 15:50:28 deraadt Exp $ */
+/* $OpenBSD: kern.ldscript,v 1.3 2013/12/28 17:57:14 miod Exp $ */
/*
* Copyright (c) 2009 Tobias Weingartner <weingart@tepid.org>
@@ -26,6 +26,7 @@ PHDRS
rodata PT_LOAD;
data PT_LOAD;
bss PT_LOAD;
+ openbsd_randomize 0x65a3dbe6; /* PT_OPENBSD_RANDOMIZE */
}
/*
diff --git a/sys/arch/sparc64/conf/ld.script b/sys/arch/sparc64/conf/ld.script
index 897810c6765..f0180228907 100644
--- a/sys/arch/sparc64/conf/ld.script
+++ b/sys/arch/sparc64/conf/ld.script
@@ -1,4 +1,4 @@
-/* $OpenBSD: ld.script,v 1.1 2013/08/16 19:52:08 kettenis Exp $ */
+/* $OpenBSD: ld.script,v 1.2 2013/12/28 17:57:14 miod Exp $ */
/*
* Copyright (c) 2013 Mark Kettenis <kettenis@openbsd.org>
@@ -24,6 +24,7 @@ PHDRS
{
text PT_LOAD;
data PT_LOAD;
+ openbsd_randomize 0x65a3dbe6; /* PT_OPENBSD_RANDOMIZE */
}
SECTIONS