Page MenuHomeFreeBSD

Handle trashed queue pointers in vm_page_acquire_unlocked().
ClosedPublic

Authored by markj on Apr 17 2020, 5:15 PM.
Tags
None
Referenced Files
F171561681: D24472.id70805.diff
Fri, Sep 11, 6:46 PM
F171556442: D24472.diff
Fri, Sep 11, 6:05 PM
F171516534: D24472.id70805.diff
Fri, Sep 11, 1:37 PM
Unknown Object (File)
Fri, Sep 11, 1:52 AM
Unknown Object (File)
Thu, Sep 10, 3:04 PM
Unknown Object (File)
Wed, Sep 9, 7:36 AM
Unknown Object (File)
Thu, Sep 3, 9:46 PM
Unknown Object (File)
Thu, Sep 3, 8:22 AM
Subscribers

Details

Summary

vm_page_acquire_unlocked() relies heavily on type-stability of vm_page
structures, and assumes that the listq linkage pointers always point to
a vm_page or are NULL. QUEUE_MACRO_DEBUG_TRASH breaks that assumption.

Reported by: pho

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj added reviewers: kib, alc, jeff.

Isn't it too fragile still ? What if prev->q reused for something yet again ?

This revision is now accepted and ready to land.Apr 17 2020, 11:49 PM
In D24472#538433, @kib wrote:

Isn't it too fragile still ? What if prev->q reused for something yet again ?

That is handled by the subsequent checks, if I understood your question correctly.

In D24472#538433, @kib wrote:

Isn't it too fragile still ? What if prev->q reused for something yet again ?

That is handled by the subsequent checks, if I understood your question correctly.

I mean that there were attempts to reuse m->q for pages not in the object queue, and there probably would be more. I believe it is somewhat mitigated by the requirement that prev is either busy or wired, this is why I agreed with the proposed patch.