summaryrefslogtreecommitdiff
path: root/sys/arch/arm
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2016-05-23 20:11:50 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2016-05-23 20:11:50 +0000
commit752aff3e3eb2f7df5d3721d7b719f21604e3d2a5 (patch)
tree6631b65cbe40db911dc30d6281e982dc4e925456 /sys/arch/arm
parentf374e960d0262f2b918a1fbee13f24da17c6cdc5 (diff)
Place a cpu-dependent trap/illegal instruction over the remainder of the
sigtramp page, so that it will generate a nice kernel fault if touched. While here, move most of the sigtramps to the .rodata segment, because they are not executed in the kernel. Also some preparation for sliding the actual sigtramp forward (will need some gdb changes) ok mlarkin kettenis
Diffstat (limited to 'sys/arch/arm')
-rw-r--r--sys/arch/arm/arm/sigcode.S20
1 files changed, 18 insertions, 2 deletions
diff --git a/sys/arch/arm/arm/sigcode.S b/sys/arch/arm/arm/sigcode.S
index dc38068e482..2e0cfef9aa7 100644
--- a/sys/arch/arm/arm/sigcode.S
+++ b/sys/arch/arm/arm/sigcode.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: sigcode.S,v 1.3 2016/05/10 18:39:43 deraadt Exp $ */
+/* $OpenBSD: sigcode.S,v 1.4 2016/05/23 20:11:49 deraadt Exp $ */
/* $NetBSD: sigcode.S,v 1.6 2003/10/05 19:44:58 matt Exp $ */
/*
@@ -41,7 +41,11 @@
* Signal trampoline;
*/
-ENTRY_NP(sigcode)
+ .section .rodata
+ .align 0
+ .globl sigcode
+ .type x,_ASM_TYPE_FUNCTION
+sigcode:
/*
* The kernel arranges for the handler to be invoked directly. This
* trampoline is used only to return from the signal.
@@ -63,3 +67,15 @@ _C_LABEL(sigcoderet):
.align 0
.global _C_LABEL(esigcode)
_C_LABEL(esigcode):
+
+ .globl sigfill
+sigfill:
+ .word 0xa000f7f0 /* illegal on all cpus? */
+esigfill:
+
+ .data
+ .globl sigfillsiz
+sigfillsiz:
+ .word esigfill - sigfill
+
+ .text