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
Unknown Object (File)
Mon, Apr 14, 11:37 AM
Unknown Object (File)
Mon, Apr 14, 3:59 AM
Unknown Object (File)
Mon, Apr 14, 12:38 AM
Unknown Object (File)
Mon, Apr 14, 12:32 AM
Unknown Object (File)
Feb 20 2025, 2:35 PM
Unknown Object (File)
Jan 27 2025, 5:14 AM
Unknown Object (File)
Jan 25 2025, 3:20 PM
Unknown Object (File)
Jan 10 2025, 10:31 PM
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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 30562
Build 28307: arc lint + arc unit

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.