Page MenuHomeFreeBSD

pt: Switch to swi(9)
ClosedPublic

Authored by bnovkov on Sep 11 2025, 5:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 20, 4:28 AM
Unknown Object (File)
Tue, Nov 18, 1:20 PM
Unknown Object (File)
Sun, Nov 9, 3:07 AM
Unknown Object (File)
Wed, Nov 5, 9:42 AM
Unknown Object (File)
Tue, Nov 4, 8:18 PM
Unknown Object (File)
Sat, Nov 1, 2:16 PM
Unknown Object (File)
Thu, Oct 30, 2:34 PM
Unknown Object (File)
Oct 24 2025, 1:38 AM
Subscribers

Details

Summary

The pt hwt(4) backend uses NMIs to receive updates about the latest t
racing buffer offsets from the tracing hardware. However, it uses
taskqueue(9) to schedule the bottom-half handler. This can lead to
a panic since the taskqueue(9) code isn't aware it's being called
from an NMI context and uses the regular scheduling interfaces.

Fix this by scheduling the bottom-half handler using swi(9) and the
SWI_FROMNMI flag.

Fixes: 310162ea218a

Test Plan

Tested by tracing a full buildkernel run on an Intel i3-7100 CPU.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 66975
Build 63858: arc lint + arc unit