Page MenuHomeFreeBSD

Weaken assertions in pmap_l1_to_l2() and pmap_l2_to_l3().

Authored by markj on Sep 21 2020, 3:05 PM.



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 OK
No Unit 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.