HomeFreeBSD

dtrace: Add compiler barriers around updates to per-CPU flags

Description

dtrace: Add compiler barriers around updates to per-CPU flags

Otherwise there's nothing preventing reordering of memory accesses with
respect to these flags being set or cleared. Since their most common
use is to create a section in dtrace probe context where memory faults
are intercepted by dtrace_trap(), such reordering can turn dtrace errors
into fatal exceptions.

MFC after: 2 weeks
Sponsored by: Innovate UK

(cherry picked from commit 0440b3d2cbf83afb55209a9938b31a48912f222c)

Details

Provenance
markjAuthored on May 28 2025, 8:45 PM
Parents
rGf3ac4f027b26: dtrace/profile: Stop storing the probe name in struct profile_probe
Branches
Unknown
Tags
Unknown