Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2bddc985 authored by Will Deacon's avatar Will Deacon Committed by Greg Kroah-Hartman
Browse files

arm64: compat: Allow single-byte watchpoints on all addresses



commit 849adec41203ac5837c40c2d7e08490ffdef3c2c upstream.

Commit d968d2b8 ("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: default avatarWill Deacon <will@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c385cda0
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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;
		}