linux_dsm_epyc7002/arch/arm64
Will Deacon 24ebec25fb arm64: hw_breakpoint: Don't invoke overflow handler on uaccess watchpoints
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: 57f4959bad ("arm64: kernel: Add support for User Access Override")
Reported-by: Luis Machado <luis.machado@linaro.org>
Signed-off-by: Will Deacon <will@kernel.org>
2020-06-18 11:10:00 +01:00
..
boot
configs
crypto
include arm64: pgtable: Clear the GP bit for non-executable kernel pages 2020-06-16 17:21:07 +01:00
kernel arm64: hw_breakpoint: Don't invoke overflow handler on uaccess watchpoints 2020-06-18 11:10:00 +01:00
kvm
lib
mm arm64: mm: reserve hugetlb CMA after numa_init 2020-06-18 10:39:15 +01:00
net
xen
Kbuild
Kconfig arm64: bti: Require clang >= 10.0.1 for in-kernel BTI support 2020-06-17 11:18:58 +01:00
Kconfig.debug
Kconfig.platforms
Makefile