diff options
author | 2024-06-10 07:32:35 +0100 | |
---|---|---|
committer | 2024-06-20 17:40:54 +0000 | |
commit | 7a928b32f1de67760e39d22d00fef99dca69fbd9 (patch) | |
tree | fb52223888fd541d574c50c1af93cbe04915e387 /arch/arm64/kernel/debug-monitors.c | |
parent | KVM: arm64: VHE: Mark __hyp_call_panic __noreturn (diff) | |
download | wireguard-linux-7a928b32f1de67760e39d22d00fef99dca69fbd9.tar.xz wireguard-linux-7a928b32f1de67760e39d22d00fef99dca69fbd9.zip |
arm64: Introduce esr_brk_comment, esr_is_cfi_brk
As it is already used in two places, move esr_comment() to a header for
re-use, with a clearer name.
Introduce esr_is_cfi_brk() to detect kCFI BRK syndromes, currently used
by early_brk64() but soon to also be used by hypervisor code.
Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20240610063244.2828978-7-ptosi@google.com
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'arch/arm64/kernel/debug-monitors.c')
-rw-r--r-- | arch/arm64/kernel/debug-monitors.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c index 64f2ecbdfe5c..024a7b245056 100644 --- a/arch/arm64/kernel/debug-monitors.c +++ b/arch/arm64/kernel/debug-monitors.c @@ -312,9 +312,7 @@ static int call_break_hook(struct pt_regs *regs, unsigned long esr) * entirely not preemptible, and we can use rcu list safely here. */ list_for_each_entry_rcu(hook, list, node) { - unsigned long comment = esr & ESR_ELx_BRK64_ISS_COMMENT_MASK; - - if ((comment & ~hook->mask) == hook->imm) + if ((esr_brk_comment(esr) & ~hook->mask) == hook->imm) fn = hook->fn; } |