diff options
| author | Piotr Kubaj <pkubaj@FreeBSD.org> | 2026-09-27 18:22:36 +0000 |
|---|---|---|
| committer | Piotr Kubaj <pkubaj@FreeBSD.org> | 2026-12-02 08:58:27 +0000 |
| commit | 2ab5877e45d86037350774f8dfba4ef263b48758 (patch) | |
| tree | 2351077638f26c346e3a306df1cc32f17c008efe /sys/dev/usb2/controller/usb2_controller.c | |
| parent | 99f361f2bf40aba06ab3423ad5bf0ff223f6bfd9 (diff) | |
PT_SETVRREGS and PT_SETVSRREGS set PCB_VEC and PCB_VSX, which say the
thread owns the unit, instead of PCB_VECREGS and PCB_FPREGS, which say
the saved registers are valid. Ownership should only come from the
unavailable trap or cpu_switchin(), and the trap asserts it isn't set
yet, so setting the VSX registers of a traced child that hasn't used
the FPU panics an INVARIANTS kernel on the child's first VSX
instruction. Tracing your own child is enough, no privilege needed.
The getters had the matching problem: they returned the saved
registers only while the thread owned the unit, so a thread stopped
with valid but unloaded registers showed the debugger zeroes.
The thread is stopped, so the PCB is what counts. Set and test the
validity flags instead.
Reviewed by: jhibbits
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D62035
Diffstat (limited to 'sys/dev/usb2/controller/usb2_controller.c')
0 files changed, 0 insertions, 0 deletions
