diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2023-04-16 10:15:00 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2023-04-16 10:15:00 +0000 |
commit | 050b76eae02f1a86b57b8b6117e01e92768697bf (patch) | |
tree | b6ce4f8f6ae13c2b6d854d716c034f9d4da98f3f /sys/arch/arm64/include | |
parent | acd709483f4c26f14ae85742ee68deba9386f84e (diff) |
Clear BTYPE bits when setting up a signal handler and when handling a
PT_CONTINUE ptrace(2) request. Otherwise we would trap if userland was
interrupted at a point where it is doing an indirect branch that has set
the bits but before it has executed the BTI instruction at the branch
target.
The PT_SETREGS request may need similar treatment, at least when the
PC is changed. But Linux doesn't do this and debuggers might want full
control over the BTYPE bits. So leave this alone for now.
ok guenther@
Diffstat (limited to 'sys/arch/arm64/include')
-rw-r--r-- | sys/arch/arm64/include/armreg.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/arm64/include/armreg.h b/sys/arch/arm64/include/armreg.h index bffe8cccacf..7c5be0c6da9 100644 --- a/sys/arch/arm64/include/armreg.h +++ b/sys/arch/arm64/include/armreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: armreg.h,v 1.27 2023/03/27 19:02:48 kettenis Exp $ */ +/* $OpenBSD: armreg.h,v 1.28 2023/04/16 10:14:59 kettenis Exp $ */ /*- * Copyright (c) 2013, 2014 Andrew Turner * Copyright (c) 2015 The FreeBSD Foundation @@ -673,6 +673,7 @@ #define PSR_I 0x00000080 #define PSR_A 0x00000100 #define PSR_D 0x00000200 +#define PSR_BTYPE 0x00000c00 #define PSR_SSBS 0x00001000 #define PSR_IL 0x00100000 #define PSR_SS 0x00200000 |