Page MenuHomeFreeBSD

Weaken assertions in pmap_l1_to_l2() and pmap_l2_to_l3().
ClosedPublic

Authored by markj on Sep 21 2020, 3:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 12, 12:05 AM
Unknown Object (File)
Sat, Oct 4, 4:18 AM
Unknown Object (File)
Fri, Oct 3, 4:37 AM
Unknown Object (File)
Mon, Sep 22, 10:03 PM
Unknown Object (File)
Sun, Sep 14, 1:30 AM
Unknown Object (File)
Sep 13 2025, 9:32 AM
Unknown Object (File)
Sep 11 2025, 7:26 AM
Unknown Object (File)
Sep 11 2025, 7:25 AM
Subscribers

Details

Summary

Avoid looking at the valid bit in the PTE when asserting that we are not
traversing through a superpage. These traversal functions are used by
pmap_kextract(), which locklessly looks up an address, and
pmap_update_entry() will clear an L2 entry's valid bit when promoting or
demoting. L<n>_TABLE includes ATTR_DESCR_VALID, so the assertion could
incorrectly fire when looking up a kernel address involved in concurrent
L2 promotion.

Reported by: mmel
MFC with: r365879

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 33706
Build 30941: arc lint + arc unit

Event Timeline

markj requested review of this revision.Sep 21 2020, 3:05 PM

tested on a problematic boards - everything works

This revision is now accepted and ready to land.Sep 21 2020, 3:25 PM

So could you only weaken it for va >= KVA start ?

I'd suggest that you add a comment explaining why the assertion has to be written this way.

This revision now requires review to proceed.Sep 21 2020, 9:12 PM

Assert that ATTR_DESCR_VALID is set if va < VM_MAX_USER_ADDRESS.

This revision is now accepted and ready to land.Sep 21 2020, 9:34 PM

Committed in r365976, I omitted the phabricator link by accident.