diff mbox

[V2,3/5] arm64: hw_breakpoint: Handle inexact watchpoint addresses

Message ID CAJt8pk9tH5nm5sUsKx-dAvW4uzKP+EoRumhYV1mXsU_mk6dRDg@mail.gmail.com
State New
Headers show

Commit Message

Pavel Labath Nov. 8, 2016, 11:58 a.m. UTC
>>

>>               /* Do we need to handle the stepping? */

>>               if (is_default_overflow_handler(wp))

>>                       step = 1;

>> -

>> -unlock:

>> -             rcu_read_unlock();

>>       }

>> +     if (min_dist > 0 && min_dist != -1) {

>> +             /* No exact match found. */

>> +             wp = slots[closest_match];

>> +             info = counter_arch_bp(wp);

>> +             info->trigger = addr;

>> +             perf_bp_event(wp, regs);

>> +     }

>

> Why don't we need to bother with the stepping in the case of a non-exact

> match?


Good catch. I think we do. I must have dropped that part somehow.

Pratyush, could you include the attached fixup in the next batch?

regards,
pavel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
diff mbox

Patch

diff --git a/arch/arm64/kernel/hw_breakpoint.c b/arch/arm64/kernel/hw_breakpoint.c
index 4125c21..852c753 100644
--- a/arch/arm64/kernel/hw_breakpoint.c
+++ b/arch/arm64/kernel/hw_breakpoint.c
@@ -793,6 +793,10 @@  static int watchpoint_handler(unsigned long addr, unsigned int esr,
 		info = counter_arch_bp(wp);
 		info->trigger = addr;
 		perf_bp_event(wp, regs);
+
+		/* Do we need to handle the stepping? */
+		if (is_default_overflow_handler(wp))
+			step = 1;
 	}
 	rcu_read_unlock();