Page MenuHomeFreeBSD

vm_map.c: plug several more places which might modify entry->offset
ClosedPublic

Authored by kib on Aug 15 2023, 8:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jan 28, 11:45 PM
Unknown Object (File)
Nov 11 2024, 2:50 AM
Unknown Object (File)
Nov 2 2024, 7:03 AM
Unknown Object (File)
Nov 2 2024, 7:03 AM
Unknown Object (File)
Nov 2 2024, 7:03 AM
Unknown Object (File)
Nov 2 2024, 6:43 AM
Unknown Object (File)
Oct 23 2024, 12:31 PM
Unknown Object (File)
Oct 18 2024, 12:09 PM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Aug 15 2023, 8:52 PM
sys/vm/vm_map.c
1418

Have you tested this change with INVARIANTS set?

It seems that if you don't change root->offset, then you'll have two elements overlap, and that will violate invariants.

sys/vm/vm_map.c
1418

Peter is doing the full test right now. offset is overloaded for stack gap entries, this is the main point of the change.

Are you saying that overloading entry->offset cannot work in principle?

sys/vm/vm_map.c
1418

No, I'm not saying that. I withdraw my question.

Where is the overloading of entry->offset documented?

sys/vm/vm_map.c
1418

The comment above the struct vm_map_entry definition in vm_map.h, and duplicated in vm_map_stack_locked() in the KERN_SUCCESS branch of the last if().

Does the second loop in vm_map_sync() also need a check for stack guards?

Does the second loop in vm_map_sync() also need a check for stack guards?

vm_object_reference()/dereference()/sync() all accept and do nothing if passed obj is NULL.

sys/vm/vm_map.c
1466

Do you need a check here?

sys/vm/vm_map.c
1466

I do not believe so because stack guards are not merge-able. I can add assert.

This revision is now accepted and ready to land.Aug 16 2023, 8:04 PM