summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMike Larkin <mlarkin@cvs.openbsd.org>2016-05-16 01:48:29 +0000
committerMike Larkin <mlarkin@cvs.openbsd.org>2016-05-16 01:48:29 +0000
commit6968d4be376947ee3a06056ed434b9edaff38043 (patch)
tree8b242a16e91213e7279213628c57da80e8535eea /sys/arch
parentedf8efab5fa26c4bc105d8c6e9805a7b7156e014 (diff)
Pad end of code in the MP trampoline with int3 instead of 0x0 as it is
certain we don't want an intentional sled here either. ok deraadt@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/amd64/machdep.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c
index d0a145ab3ee..71f626252b4 100644
--- a/sys/arch/amd64/amd64/machdep.c
+++ b/sys/arch/amd64/amd64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.219 2016/05/10 18:39:42 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.220 2016/05/16 01:48:28 mlarkin Exp $ */
/* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */
/*-
@@ -1233,6 +1233,9 @@ map_tramps(void)
pmap_kenter_pa(MP_TRAMP_DATA, MP_TRAMP_DATA,
PROT_READ | PROT_WRITE);
+ memset((caddr_t)MP_TRAMPOLINE, 0xcc, PAGE_SIZE);
+ memset((caddr_t)MP_TRAMP_DATA, 0xcc, PAGE_SIZE);
+
memcpy((caddr_t)MP_TRAMPOLINE,
cpu_spinup_trampoline,
cpu_spinup_trampoline_end-cpu_spinup_trampoline);