Page MenuHomeFreeBSD

Add vm_mmap2(), vm_mprotect(), vm_msync(), vm_munlock(), vm_munmap(), and vm_madvise().
ClosedPublic

Authored by trasz on Jan 30 2017, 11:38 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 25, 5:10 AM
Unknown Object (File)
Mon, Nov 25, 12:50 AM
Unknown Object (File)
Sun, Nov 24, 7:08 AM
Unknown Object (File)
Sun, Nov 24, 12:25 AM
Unknown Object (File)
Sat, Nov 23, 10:02 AM
Unknown Object (File)
Tue, Nov 19, 9:39 AM
Unknown Object (File)
Fri, Nov 15, 12:46 AM
Unknown Object (File)
Sat, Nov 9, 3:31 PM
Subscribers

Details

Summary

Add vm_mmap2(), vm_mprotect(), vm_msync(), vm_munlock(), vm_munmap(),
and vm_madvise(), and use them in various compats instead of their
sys_*() counterparts.

Diff Detail

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

Event Timeline

trasz retitled this revision from to Add vm_mmap2(), vm_mprotect(), vm_msync(), vm_munlock(), vm_munmap(), and vm_madvise()..
trasz updated this object.
trasz edited the test plan for this revision. (Show Details)

Ed, Dmitry, could you test it? Thanks!

I think this is a right change to do. But I suggest to follow the naming conventions of all other syscall subroutines and utilize the kern_ prefix. In other words, for instance vm_munlock() should be named kern_vm_munlock(). I do not think that we ever pretend that our VM is still Mach VM.

trasz edited edge metadata.

Rename by adding the kern_ prefix.

sys/vm/vm_extern.h
74 ↗(On Diff #24558)

Wouldn't it make more sense to just call them kern_mmap(), etc. and place these prototypes in sys/sysproto.h?

sys/vm/vm_extern.h
74 ↗(On Diff #24558)

This would require either contaminating sys/sysproto.h with all the vm_offset_t, vm_size_t etc, or changing the types which is error prone. So I think the current way is safer, and the "kern_vm_" provides a hint to the reader that those are declared somewhere else.

ed edited edge metadata.
This revision is now accepted and ready to land.Feb 1 2017, 9:38 AM
trasz edited edge metadata.

Fix build.

This revision now requires review to proceed.Feb 1 2017, 11:27 PM

Dmitry, could you test it? Thanks!

dchagin edited edge metadata.

NPTL test pass

This revision is now accepted and ready to land.Feb 5 2017, 12:46 PM
kib edited edge metadata.
This revision was automatically updated to reflect the committed changes.