diff options
author | Will Deacon <will@kernel.org> | 2019-07-29 11:06:17 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-08-06 19:06:55 +0200 |
commit | 2bddc985656a9ccddf2d4b9399e587f14df3cd20 (patch) | |
tree | f3a0cb60b5b51818ce870b12d0dc630aad9cc6b3 /arch/arm64 | |
parent | c385cda0e70a565f7b3d93e2f665ea7b691ec937 (diff) | |
download | linux-stable-2bddc985656a9ccddf2d4b9399e587f14df3cd20.tar.gz linux-stable-2bddc985656a9ccddf2d4b9399e587f14df3cd20.tar.bz2 linux-stable-2bddc985656a9ccddf2d4b9399e587f14df3cd20.zip |
arm64: compat: Allow single-byte watchpoints on all addresses
commit 849adec41203ac5837c40c2d7e08490ffdef3c2c upstream.
Commit d968d2b801d8 ("ARM: 7497/1: hw_breakpoint: allow single-byte
watchpoints on all addresses") changed the validation requirements for
hardware watchpoints on arch/arm/. Update our compat layer to implement
the same relaxation.
Cc: <stable@vger.kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/kernel/hw_breakpoint.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm64/kernel/hw_breakpoint.c b/arch/arm64/kernel/hw_breakpoint.c index 8c9644376326..7c0611f5d2ce 100644 --- a/arch/arm64/kernel/hw_breakpoint.c +++ b/arch/arm64/kernel/hw_breakpoint.c @@ -547,13 +547,14 @@ int hw_breakpoint_arch_parse(struct perf_event *bp, /* Aligned */ break; case 1: - /* Allow single byte watchpoint. */ - if (hw->ctrl.len == ARM_BREAKPOINT_LEN_1) - break; case 2: /* Allow halfword watchpoints and breakpoints. */ if (hw->ctrl.len == ARM_BREAKPOINT_LEN_2) break; + case 3: + /* Allow single byte watchpoint. */ + if (hw->ctrl.len == ARM_BREAKPOINT_LEN_1) + break; default: return -EINVAL; } |