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, Apr 22, 3:33 AM
Unknown Object (File)
Sat, Apr 19, 7:28 AM
Unknown Object (File)
Sat, Apr 12, 5:59 PM
Unknown Object (File)
Mar 31 2025, 5:27 PM
Unknown Object (File)
Mar 5 2025, 9:29 PM
Unknown Object (File)
Feb 27 2025, 3:41 AM
Unknown Object (File)
Jan 25 2025, 5:56 AM
Unknown Object (File)
Jan 24 2025, 8:23 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