Page MenuHomeFreeBSD

ksyms: Lock the object while setting NOSPLIT.
ClosedPublic

Authored by markj on Sun, Nov 3, 4:19 PM.

Details

Summary

Alan pointed out that the object resides in the global object list, so
formally we should lock it to synchronize with a scan of the list.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

markj created this revision.Sun, Nov 3, 4:19 PM
markj added reviewers: alc, kib.Sun, Nov 3, 4:19 PM
alc accepted this revision.Sun, Nov 3, 5:20 PM

I think that we should consider adding a vm_object_allocate_flags().

This revision is now accepted and ready to land.Sun, Nov 3, 5:20 PM
kib accepted this revision.Sun, Nov 3, 5:25 PM

Although unlocked manipulations of the flags were removed AFAIR.

markj added a comment.Sun, Nov 3, 7:25 PM

I realized after submitting this that really we should be using OBJT_PHYS here. The object's contents are not pageable.

markj updated this revision to Diff 63911.Sun, Nov 3, 7:30 PM

Convert to OBJT_PHYS and stop setting NOSPLIT entirely.

This revision now requires review to proceed.Sun, Nov 3, 7:30 PM
alc added inline comments.Sun, Nov 3, 9:21 PM
sys/dev/ksyms/ksyms.c
44 ↗(On Diff #63911)

Is this still needed?

markj updated this revision to Diff 63926.Mon, Nov 4, 3:46 PM

Remove unneeded include.

alc added a comment.Mon, Nov 4, 3:51 PM
In D22229#485773, @kib wrote:

Although unlocked manipulations of the flags were removed AFAIR.

Yes, I believe so. However, in recent weeks, I recall seeing at least two attempts to reintroduce unlocked manipulations, counting this as one of them. I think that a vm_object_allocate_flags() would eliminate the temptation to do so.

alc accepted this revision.Mon, Nov 4, 3:51 PM
This revision is now accepted and ready to land.Mon, Nov 4, 3:51 PM
kib accepted this revision.Mon, Nov 4, 5:00 PM
This revision was automatically updated to reflect the committed changes.