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)
Wed, Aug 5, 6:04 AM
Unknown Object (File)
Mon, Aug 3, 7:02 PM
Unknown Object (File)
Thu, Jul 30, 12:42 PM
Unknown Object (File)
Tue, Jul 28, 10:24 PM
Unknown Object (File)
Mon, Jul 20, 2:36 AM
Unknown Object (File)
Sat, Jul 18, 1:14 PM
Unknown Object (File)
Jul 6 2026, 10:17 PM
Unknown Object (File)
Jun 28 2026, 12:54 AM

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