aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorWill Deacon <will@kernel.org>2020-05-29 14:12:18 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-06-25 15:41:59 +0200
commit125de1ce27a04609be11d1ec9c3ee4b9a1ef633a (patch)
tree1b797cded06f8aa4edf8af0aa6e5efd4a509acac /include
parenta43abf15844c9e5de016957b8e612f447b7fb077 (diff)
arm64: hw_breakpoint: Don't invoke overflow handler on uaccess watchpoints
[ Upstream commit 24ebec25fb270100e252b19c288e21bd7d8cc7f7 ] Unprivileged memory accesses generated by the so-called "translated" instructions (e.g. STTR) at EL1 can cause EL0 watchpoints to fire unexpectedly if kernel debugging is enabled. In such cases, the hw_breakpoint logic will invoke the user overflow handler which will typically raise a SIGTRAP back to the current task. This is futile when returning back to the kernel because (a) the signal won't have been delivered and (b) userspace can't handle the thing anyway. Avoid invoking the user overflow handler for watchpoints triggered by kernel uaccess routines, and instead single-step over the faulting instruction as we would if no overflow handler had been installed. (Fixes tag identifies the introduction of unprivileged memory accesses, which exposed this latent bug in the hw_breakpoint code) Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: James Morse <james.morse@arm.com> Fixes: 57f4959bad0a ("arm64: kernel: Add support for User Access Override") Reported-by: Luis Machado <luis.machado@linaro.org> Signed-off-by: Will Deacon <will@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions