Page MenuHomeFreeBSD

vmm: Fully adopt the getrlimit(2) machinery for limiting the number of VMM instances
Needs ReviewPublic

Authored by bnovkov on Mon, May 18, 3:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 21, 4:01 PM
Unknown Object (File)
Thu, May 21, 12:40 PM
Unknown Object (File)
Thu, May 21, 9:43 AM
Unknown Object (File)
Wed, May 20, 9:00 PM
Unknown Object (File)
Wed, May 20, 7:32 AM
Unknown Object (File)
Tue, May 19, 12:47 PM
Unknown Object (File)
Tue, May 19, 4:26 AM

Details

Reviewers
markj
des
Group Reviewers
bhyve
Summary

The vmm module currently combines parts of the kernelspace
getrlimit(2) machinery and a sysctl value to limit the number
of VMM instances per-UID. The original rationale for this
approach was to sidestep the convoluted way in which per-UID
getrlimit(2) limit values are currently propagated.

However, this approach deviates from the expected workflow when dealing
getrlimit(2) limits.

Fix this by teaching login(1) about RLIMIT_VMM and changing
vmmdev_create to use lim_cur. While we're here, document the limit
in the getrlimit(2) manpage.

Fixes: 1092ec8b3375 ("kern: Introduce RLIMIT_VMM")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 73194
Build 70077: arc lint + arc unit