Page MenuHomeFreeBSD

riscv: Handle four-level page tables in various pmap traversal routines
ClosedPublic

Authored by markj on Feb 14 2022, 10:31 PM.
Tags
None
Referenced Files
F115913110: D34278.id103336.diff
Wed, Apr 30, 8:17 AM
F115903253: D34278.diff
Wed, Apr 30, 5:33 AM
Unknown Object (File)
Fri, Apr 18, 9:48 AM
Unknown Object (File)
Thu, Apr 17, 6:26 PM
Unknown Object (File)
Thu, Apr 10, 10:16 PM
Unknown Object (File)
Mar 13 2025, 11:35 PM
Unknown Object (File)
Mar 9 2025, 10:57 PM
Unknown Object (File)
Feb 12 2025, 3:28 AM
Subscribers

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 44447
Build 41335: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Feb 15 2022, 12:14 AM

I think pmap_change_attr_locked needs changing otherwise you'll fault rather than return EINVAL for bogus VAs that aren't covered by an L0 entry? The function doesn't currently do anything other than exist for LKPI and do a no-op walk in order to give back the right errors.

I think pmap_change_attr_locked needs changing otherwise you'll fault rather than return EINVAL for bogus VAs that aren't covered by an L0 entry? The function doesn't currently do anything other than exist for LKPI and do a no-op walk in order to give back the right errors.

Hmm, I don't see why we'd fault - pmap_l1() will return NULL in that case (see D34276) and pmap_change_attr_locked() handles that by returning EINVAL.

I think pmap_change_attr_locked needs changing otherwise you'll fault rather than return EINVAL for bogus VAs that aren't covered by an L0 entry? The function doesn't currently do anything other than exist for LKPI and do a no-op walk in order to give back the right errors.

Hmm, I don't see why we'd fault - pmap_l1() will return NULL in that case (see D34276) and pmap_change_attr_locked() handles that by returning EINVAL.

Hm, indeed, misremembered how those work. I guess you only need to do the walk explicitly if you care about distinguishing !V from !RX, i.e. if you expect to have L0 leaves, which we don't.