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)
Fri, Jun 12, 10:41 PM
Unknown Object (File)
Mon, Jun 8, 8:55 AM
Unknown Object (File)
Wed, Jun 3, 5:14 AM
Unknown Object (File)
Sat, May 30, 11:38 AM
Unknown Object (File)
Thu, May 28, 1:12 PM
Unknown Object (File)
Wed, May 27, 9:07 AM
Unknown Object (File)
Tue, May 26, 2:35 AM
Unknown Object (File)
Mon, May 25, 10:05 PM

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