public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [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
@ 2024-01-04  2:35 bugzilla-daemon
  2024-01-04 16:54 ` Sean Christopherson
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: bugzilla-daemon @ 2024-01-04  2:35 UTC (permalink / raw)
  To: kvm

https://bugzilla.kernel.org/show_bug.cgi?id=218339

            Bug ID: 218339
           Summary: kernel goes unresponsive if single-stepping over an
                    instruction which writes to an address for which a
                    hardware read/write watchpoint has been set
           Product: Virtualization
           Version: unspecified
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: kvm
          Assignee: virtualization_kvm@kernel-bugs.osdl.org
          Reporter: anthony.louis.eden@gmail.com
        Regression: No

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


Looking with `journalctl`, I cannot find anything printed to dmesg.

The kernel of the guest inside the virtual machine is Debian 6.1.0-15-amd64.
The kernel of the host running qemu-system-x86_64 is Archlinux 6.6.7-arch1-1.
gdb is version 13.1.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-03-05 20:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox