Page MenuHomeFreeBSD

arm64: Disable kernel superpage promotion when KMSAN is configured
ClosedPublic

Authored by markj on Dec 21 2023, 6:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Sep 8, 3:02 PM
Unknown Object (File)
Sun, Sep 6, 4:59 PM
Unknown Object (File)
Sat, Sep 5, 7:29 PM
Unknown Object (File)
Thu, Sep 3, 8:09 AM
Unknown Object (File)
Tue, Sep 1, 7:43 AM
Unknown Object (File)
Sun, Aug 30, 5:38 AM
Unknown Object (File)
Sat, Aug 29, 4:57 PM
Unknown Object (File)
Aug 22 2026, 3:12 PM

Details

Summary

The break-before-make operation required to promote or demote a
superpage leaves a window where the KMSAN runtime can trigger a fatal
data abort. More specifically, the code in pmap_update_entry() which
executes after ATTR_DESCR_VALID is cleared may implicitly attempt to
access KMSAN context via curthread, but we may be promoting or demoting
a 2MB page containing the curthread structure.

Sponsored by: Klara, Inc.
Sponsored by: Juniper Networks, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable