arm64: compat: Allow single-byte watchpoints on all addresses
Commit d968d2b801
("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>
This commit is contained in:
parent
609488bc97
commit
849adec412
|
@ -536,13 +536,14 @@ int hw_breakpoint_arch_parse(struct perf_event *bp,
|
||||||
/* Aligned */
|
/* Aligned */
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
/* Allow single byte watchpoint. */
|
|
||||||
if (hw->ctrl.len == ARM_BREAKPOINT_LEN_1)
|
|
||||||
break;
|
|
||||||
case 2:
|
case 2:
|
||||||
/* Allow halfword watchpoints and breakpoints. */
|
/* Allow halfword watchpoints and breakpoints. */
|
||||||
if (hw->ctrl.len == ARM_BREAKPOINT_LEN_2)
|
if (hw->ctrl.len == ARM_BREAKPOINT_LEN_2)
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
/* Allow single byte watchpoint. */
|
||||||
|
if (hw->ctrl.len == ARM_BREAKPOINT_LEN_1)
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue