Page MenuHomeFreeBSD

Do not access pv_table array for fictitious pages ...
ClosedPublic

Authored by kib on Jun 4 2016, 5:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Sep 7, 7:01 PM
Unknown Object (File)
Sat, Sep 7, 6:12 PM
Unknown Object (File)
Sat, Sep 7, 6:02 PM
Unknown Object (File)
Sat, Sep 7, 4:08 AM
Unknown Object (File)
Mon, Aug 26, 12:07 AM
Unknown Object (File)
Sun, Aug 25, 2:09 AM
Unknown Object (File)
Sat, Aug 24, 5:59 PM
Unknown Object (File)
Mon, Aug 19, 3:18 AM
Subscribers

Details

Reviewers
alc
Summary

... since the array does not cover the dynamically registered ficititious ranges.

Reported and tested by: Michael Butler <imb@protected-networks.net>

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kib retitled this revision from to Do not access pv_table array for fictitious pages ....
kib updated this object.
kib edited the test plan for this revision. (Show Details)
kib added a reviewer: alc.
kib set the repository for this revision to rS FreeBSD src repository - subversion.

I have one suggestion about the implementation. Instead of adding new conditionals, create a global, dummy "struct md_page" and conditionally initialize pvh to point to this dummy struct rather than pa_to_pvh(...) before acquiring the pv list lock.

kib edited edge metadata.

Use dummy struct md_page for checking generation number of the (nonexistent) superpage pv list for fictitious managed pages.

sys/amd64/amd64/pmap.c
3928–3929

If we statically initialize pv_dummy's pv_list field to an empty state, then this "if" statement can be eliminated.

5749–5750

Same here.

5881–5882

Here I think that the "(m->flags & PG_FICTITIOUS) != 0" can be deleted, but the rest should remain.

6198–6199

Same here as the first and second cases.

Utilize empty pv_list of the md_dummy placeholder to avoid more conditionals.

alc edited edge metadata.
This revision is now accepted and ready to land.Jun 11 2016, 4:49 AM