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)
Sat, Apr 6, 9:01 AM
Unknown Object (File)
Sat, Apr 6, 3:07 AM
Unknown Object (File)
Dec 23 2023, 6:21 PM
Unknown Object (File)
Dec 22 2023, 11:17 PM
Unknown Object (File)
Jul 27 2023, 11:59 PM
Unknown Object (File)
Mar 4 2023, 9:02 PM
Unknown Object (File)
Feb 14 2023, 1: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 33705
Build 30940: 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.