summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/conf
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2022-11-07 01:41:58 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2022-11-07 01:41:58 +0000
commit079941ccc68343241f45e4a554061c5b2b6c689f (patch)
tree85e6631aa7754d69fc2ac16c212913ca961c089b /sys/arch/amd64/conf
parent2f479c799896ce4d1e1e0332be560926bb839429 (diff)
In kpageflttrap(), validate a non-NULL pcb_onfault against an array
of permitted addresses, done via .nofault* sections that end up in the linked kernel's rodata. ok deraadt@ kettenis@
Diffstat (limited to 'sys/arch/amd64/conf')
-rw-r--r--sys/arch/amd64/conf/ld.script6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/amd64/conf/ld.script b/sys/arch/amd64/conf/ld.script
index 18298f8b8c3..c02f60c66cb 100644
--- a/sys/arch/amd64/conf/ld.script
+++ b/sys/arch/amd64/conf/ld.script
@@ -1,4 +1,4 @@
-/* $OpenBSD: ld.script,v 1.18 2022/09/02 09:02:37 mlarkin Exp $ */
+/* $OpenBSD: ld.script,v 1.19 2022/11/07 01:41:57 guenther Exp $ */
/*
* Copyright (c) 2009 Tobias Weingartner <weingart@tepid.org>
@@ -85,6 +85,10 @@ SECTIONS
{
__rodata_start = ABSOLUTE(.);
*(.rodata .rodata.*)
+ . = ALIGN(8);
+ __nofault_start = ABSOLUTE(.);
+ *(.nofault.*) *(.nofault)
+ __nofault_end = ABSOLUTE(.);
*(.codepatch)
*(.codepatchend)
} :rodata =0xcccccccc