lkml.org 
[lkml]   [2016]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: x86: Hardware breakpoints are not always triggered
On 01/28, Andrey Wagin wrote:
>
> We use hardware breakpoints in CRIU and we found that sometimes we set
> a break-point, but a process doesn't stop on it.

reproduced, and this certainly looks like kvm bug to me.

> The reproducer uses a different break-point address if it is executed
> with arguments than when it executed without arguments.

IOW, multiple processes running in parallel use the same debug register db0
but different address. And it seems that set_debugreg(address, 0) sometime
doesn't work in the guest kernel.

I think I verified the following:

- debug registers look always correct as it seen by the guest.
I used get_debugreg() to dump them after the task misses bp.

- do_debug() was not called in this case.

- finally, it seems that the host has the wrong value in db0
set by another process.

I modified your test-case so that child2() calls child() when
it detects the missed bp, and this does trigger do_debug/etc
while it should not.

Oleg.

\
 
 \ /
  Last update: 2016-01-28 22:41    [W:0.094 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site