diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-12-24 10:32:26 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-12-24 10:32:26 +0000 |
commit | 75a517b8ab31b919370b5794bf1be903b6b5c692 (patch) | |
tree | e112ea487dea1a2593285f7c378aa9c58d1a91ac /sys/arch/arm64 | |
parent | 85897e0782809755faae5d8c69e55df962e384e6 (diff) |
Generate SIGBUS/BUS_ADRALN when we see a SP Alignment Exception from userland.
ok jsg@
Diffstat (limited to 'sys/arch/arm64')
-rw-r--r-- | sys/arch/arm64/arm64/trap.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/arch/arm64/arm64/trap.c b/sys/arch/arm64/arm64/trap.c index dfe631791f0..01c3c92114f 100644 --- a/sys/arch/arm64/arm64/trap.c +++ b/sys/arch/arm64/arm64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.12 2017/12/18 20:03:48 kettenis Exp $ */ +/* $OpenBSD: trap.c,v 1.13 2017/12/24 10:32:25 kettenis Exp $ */ /*- * Copyright (c) 2014 Andrew Turner * All rights reserved. @@ -312,6 +312,11 @@ do_el0_sync(struct trapframe *frame) sv.sival_ptr = (void *)frame->tf_elr; trapsignal(p, SIGBUS, 0, BUS_ADRALN, sv); break; + case EXCP_SP_ALIGN: + vfp_save(); + sv.sival_ptr = (void *)frame->tf_sp; + trapsignal(p, SIGBUS, 0, BUS_ADRALN, sv); + break; case EXCP_DATA_ABORT_L: vfp_save(); data_abort(frame, esr, 1, 0); |