From: bugzilla-daemon@kernel.org
To: kvm@vger.kernel.org
Subject: [Bug 218339] kernel goes unresponsive if single-stepping over an instruction which writes to an address for which a hardware read/write watchpoint has been set
Date: Tue, 05 Mar 2024 20:24:56 +0000 [thread overview]
Message-ID: <bug-218339-28872-DEbvHtj9rU@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-218339-28872@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=218339
Kishen Maloor (kishen.maloor@intel.com) changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kishen.maloor@intel.com
--- Comment #6 from Kishen Maloor (kishen.maloor@intel.com) ---
(In reply to Anthony L. Eden from comment #0)
> In a debian QEMU/KVM virtual machine, run `gdb` on any executable (e.g.
> `/usr/bin/ls`). Run the program by typing `starti`. Proceed to `_dl_start`
> (i.e. `break _dl_start`, `continue`). When you get there disassemble the
> function (i.e. `disas`). Find an instruction that's going to be executed for
> which you can compute the address in memory it will write to. Run the
> program to that instruction (i.e. `break *0xINSN`, `continue`). When you're
> on that instruction, set a read/write watchpoint on the address it will
> write to, then single-step (i.e. `stepi`) and the kernel will go
> unresponsive.
>
>
> >(gdb) x/1i $pc
> >=> 0x7ffff7fe6510 <_dl_start+48>: mov %rdi,-0x88(%rbp)
> >(gdb) x/1wx $rbp-0x88
> >0x7fffffffec28: 0x00000000
> >(gdb) awatch *0x7fffffffec28
> >Hardware access (read/write) watchpoint 2: *0x7fffffffec28
> >(gdb) stepi
>
I can reproduce the behavior you describe. But it seems that you're not
invoking KVM at all, because when I add '-accel kvm' or '-enable-kvm' to your
qemu command line the problem goes away.
There may be an issue specifically in the handling of hardware watchpoints
on the qemu emulation. If I disable hardware watchpoints in gdb using 'set
can-use-hw-watchpoints 0' and then use 'watch *<ADDR>', that works.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
prev parent reply other threads:[~2024-03-05 20:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-04 2:35 [Bug 218339] New: kernel goes unresponsive if single-stepping over an instruction which writes to an address for which a hardware read/write watchpoint has been set bugzilla-daemon
2024-01-04 16:54 ` Sean Christopherson
2024-01-04 16:54 ` [Bug 218339] " bugzilla-daemon
2024-01-04 23:21 ` bugzilla-daemon
2024-01-10 12:38 ` bugzilla-daemon
2024-01-10 20:21 ` bugzilla-daemon
2024-01-10 21:07 ` bugzilla-daemon
2024-03-05 20:24 ` bugzilla-daemon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-218339-28872-DEbvHtj9rU@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@kernel.org \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox