[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160128205327.GA19931@redhat.com>
Date: Thu, 28 Jan 2016 21:53:27 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Andrey Wagin <avagin@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Andy Lutomirski <luto@...capital.net>,
Cyrill Gorcunov <gorcunov@...nvz.org>,
"criu@...nvz.org" <criu@...nvz.org>, kvm@...r.kernel.org
Subject: Re: 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.
Powered by blists - more mailing lists