diff options
| author | Ada Couprie Diaz <ada.coupriediaz@arm.com> | 2026-09-07 17:31:01 +0100 |
|---|---|---|
| committer | Catalin Marinas <catalin.marinas@arm.com> | 2026-10-15 19:07:20 +0100 |
| commit | c889894af7770be60a21b5f292bd9d097a7104ea (patch) | |
| tree | 954cbe026d97553f99a5af42a84a8b3ab5fb0bb1 /tools/perf/scripts/python/bin | |
| parent | 7fa0d9b2ec070d9555801fecc5d30953a256122c (diff) | |
arm64/debug: mask debug exceptions when called from common code
We can currently take debug exceptions while manipulating the hardware
breakpoint registers and perf slots when called from generic kernel code.
This can lead to errors and unsound behaviours in some pathological
(and self-inflicted) edge cases[0].
Save and restore the DAIF mask around those manipulations.
This is to avoid a superfluous save/restore when calling
`toggle_bp_registers()` and `hw_breakpoint_control()` from our arch code,
as debug exceptions will already be masked in all cases.
It should also allow some clean ups by batching ISBs when we update
multiple registers, rather than doing one for each register write.
Clarify some comments and specify a few functions which should be called
with debug exceptions masked (even though that is true for most of them).
[0]: https://lore.kernel.org/linux-arm-kernel/adeE4MD0RgapI8aL@J2N7QTR9R3/
Signed-off-by: Ada Couprie Diaz <ada.coupriediaz@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
