ARM: 8997/2: hw_breakpoint: Handle inexact watchpoint addresses
authorDouglas Anderson <dianders@chromium.org>
Thu, 6 Aug 2020 22:24:35 +0000 (23:24 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Tue, 15 Sep 2020 13:35:24 +0000 (14:35 +0100)
commit22c9e58299e5f18274788ce54c03d4fb761e3c5d
treeeb1dfe94f252af7e42a232c650d48c75da5bd9f3
parentf75aef392f869018f78cfedf3c320a6b3fcfda6b
ARM: 8997/2: hw_breakpoint: Handle inexact watchpoint addresses

This is commit fdfeff0f9e3d ("arm64: hw_breakpoint: Handle inexact
watchpoint addresses") but ported to arm32, which has the same
problem.

This problem was found by Android CTS tests, notably the
"watchpoint_imprecise" test [1].  I tested locally against a copycat
(simplified) version of the test though.

[1] https://android.googlesource.com/platform/bionic/+/master/tests/sys_ptrace_test.cpp

Link: https://lkml.kernel.org/r/20191019111216.1.I82eae759ca6dc28a245b043f485ca490e3015321@changeid
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
arch/arm/kernel/hw_breakpoint.c