Skip to content

Commit d968d2b

Browse files
wildea01Russell King
authored andcommitted
ARM: 7497/1: hw_breakpoint: allow single-byte watchpoints on all addresses
Breakpoint validation currently fails for single-byte watchpoints on addresses ending in 11b. There is no reason to forbid such a watchpoint, so extend the validation code to allow it. Cc: Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1 parent bf88011 commit d968d2b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

arch/arm/kernel/hw_breakpoint.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -610,13 +610,14 @@ int arch_validate_hwbkpt_settings(struct perf_event *bp)
610610
/* Aligned */
611611
break;
612612
case 1:
613-
/* Allow single byte watchpoint. */
614-
if (info->ctrl.len == ARM_BREAKPOINT_LEN_1)
615-
break;
616613
case 2:
617614
/* Allow halfword watchpoints and breakpoints. */
618615
if (info->ctrl.len == ARM_BREAKPOINT_LEN_2)
619616
break;
617+
case 3:
618+
/* Allow single byte watchpoint. */
619+
if (info->ctrl.len == ARM_BREAKPOINT_LEN_1)
620+
break;
620621
default:
621622
ret = -EINVAL;
622623
goto out;

0 commit comments

Comments
 (0)