artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
80f80a8
)
Properly handle userland branch target traps.
author
kettenis
<kettenis@openbsd.org>
Wed, 26 Apr 2023 12:30:24 +0000
(12:30 +0000)
committer
kettenis
<kettenis@openbsd.org>
Wed, 26 Apr 2023 12:30:24 +0000
(12:30 +0000)
ok deraadt@, patrick@
sys/arch/arm64/arm64/trap.c
patch
|
blob
|
history
diff --git
a/sys/arch/arm64/arm64/trap.c
b/sys/arch/arm64/arm64/trap.c
index
7f4f37e
..
78d1857
100644
(file)
--- a/
sys/arch/arm64/arm64/trap.c
+++ b/
sys/arch/arm64/arm64/trap.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: trap.c,v 1.4
3 2023/03/27 19:02:47
kettenis Exp $ */
+/* $OpenBSD: trap.c,v 1.4
4 2023/04/26 12:30:24
kettenis Exp $ */
/*-
* Copyright (c) 2014 Andrew Turner
* All rights reserved.
@@
-281,6
+281,11
@@
do_el0_sync(struct trapframe *frame)
case EXCP_TRAP_FP:
fpu_load(p);
break;
+ case EXCP_BRANCH_TGT:
+ curcpu()->ci_flush_bp();
+ sv.sival_ptr = (void *)frame->tf_elr;
+ trapsignal(p, SIGILL, 0, ILL_ILLOPC, sv);
+ break;
case EXCP_SVC:
svc_handler(frame);
break;