linux/arch
Will Deacon 2fdddd5914 ARM: 8986/1: hw_breakpoint: Don't invoke overflow handler on uaccess watchpoints
commit eec13b42d4 upstream.

Unprivileged memory accesses generated by the so-called "translated"
instructions (e.g. LDRT) in kernel mode can cause user watchpoints to fire
unexpectedly. 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.

Cc: <stable@vger.kernel.org>
Fixes: f81ef4a920 ("ARM: 6356/1: hw-breakpoint: add ARM backend for the hw-breakpoint framework")
Reported-by: Luis Machado <luis.machado@linaro.org>
Tested-by: Luis Machado <luis.machado@linaro.org>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-05 10:06:01 +02:00
..
alpha scsi: sr: remove references to BLK_DEV_SR_VENDOR, leave it enabled 2020-07-22 09:32:04 +02:00
arc ARC: elf: use right ELF_ARCH 2020-07-16 08:17:27 +02:00
arm ARM: 8986/1: hw_breakpoint: Don't invoke overflow handler on uaccess watchpoints 2020-08-05 10:06:01 +02:00
arm64 arm64: Use test_tsk_thread_flag() for checking TIF_SINGLESTEP 2020-07-29 10:16:54 +02:00
c6x kbuild: rename LDFLAGS to KBUILD_LDFLAGS 2018-08-24 08:22:08 +09:00
h8300 h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux- 2019-04-05 22:32:55 +02:00
hexagon hexagon: define ioremap_uc 2020-05-10 10:30:11 +02:00
ia64 scsi: sr: remove references to BLK_DEV_SR_VENDOR, leave it enabled 2020-07-22 09:32:04 +02:00
m68k scsi: sr: remove references to BLK_DEV_SR_VENDOR, leave it enabled 2020-07-22 09:32:04 +02:00
microblaze microblaze: Prevent the overflow of the start 2020-02-24 08:34:53 +01:00
mips MIPS: Fix build for LTS kernel caused by backporting lpj adjustment 2020-07-22 09:32:11 +02:00
nds32 nds32: Fix the items of hwcap_str ordering issue. 2019-12-13 08:51:35 +01:00
nios2 nios2: ksyms: Add missing symbol exports 2020-01-27 14:50:30 +01:00
openrisc openrisc: Fix issue with argument clobbering for clone/fork 2020-06-25 15:33:01 +02:00
parisc parisc: Add atomic64_set_release() define to avoid CPU soft lockups 2020-07-29 10:16:58 +02:00
powerpc powerpc/book3s64/pkeys: Fix pkey_access_permitted() for execute disable pkey 2020-07-22 09:32:11 +02:00
riscv RISC-V: Upgrade smp_mb__after_spinlock() to iorw,iorw 2020-07-29 10:16:54 +02:00
s390 s390/mm: fix huge pte soft dirty copying 2020-07-16 08:17:28 +02:00
sh scsi: sr: remove references to BLK_DEV_SR_VENDOR, leave it enabled 2020-07-22 09:32:04 +02:00
sparc scsi: sr: remove references to BLK_DEV_SR_VENDOR, leave it enabled 2020-07-22 09:32:04 +02:00
um um: ubd: Prevent buffer overrun on command completion 2020-04-23 10:30:19 +02:00
unicore32 mm: convert return type of handle_mm_fault() caller to vm_fault_t 2018-08-17 16:20:28 -07:00
x86 x86, vmlinux.lds: Page-align end of ..page_aligned sections 2020-07-29 10:16:58 +02:00
xtensa xtensa: update *pos in cpuinfo_op.next 2020-07-29 10:16:45 +02:00
.gitignore
Kconfig jump_label: move 'asm goto' support test to Kconfig 2019-06-04 08:02:34 +02:00