>>
>>               /* 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
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();
 

Reply via email to