Page MenuHomeFreeBSD

limits: Further RLIMIT_VMM cleanup
ClosedPublic

Authored by des on May 16 2026, 4:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jun 10, 5:28 PM
Unknown Object (File)
Tue, Jun 9, 11:24 AM
Unknown Object (File)
Thu, Jun 4, 3:01 PM
Unknown Object (File)
Thu, Jun 4, 5:11 AM
Unknown Object (File)
Thu, Jun 4, 5:07 AM
Unknown Object (File)
Thu, Jun 4, 4:24 AM
Unknown Object (File)
Thu, Jun 4, 4:19 AM
Unknown Object (File)
Wed, Jun 3, 5:44 PM

Details

Summary

Teach limits(1), sh(1), and setclassresources(3) about RLIMIT_VMM.

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

Diff Detail

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

Event Timeline

des requested review of this revision.May 16 2026, 4:38 PM

It feels a little weird to clutter up ulimit -a and limits with a limit for this pretty exotic feature.

lib/libutil/login_class.c
69

Does the keyword vmm need to be documented somewhere, especially because limits calls it vms instead?

des marked an inline comment as done.May 17 2026, 2:51 PM
des added inline comments.
lib/libutil/login_class.c
69

That's a typo, it should be vms in both cases. It is intended to be descriptive.

des marked an inline comment as done.May 17 2026, 2:52 PM

It feels a little weird to clutter up ulimit -a and limits with a limit for this pretty exotic feature.

Virtual machines are hardly an exotic feature, and ever since af099eaa5ec3 landed unprivileged users are able to create virtual machines.
This limit is meant to prevent unprivileged users from exhausting kernel memory by repeatedly creating new virtual machines.

Looks good to me, thank you for working on this. I'll follow up on this with a patch that fully incorporates the uses of RLIMIT_VMM into the setrlimit(2) machinery tomorrow.

This revision is now accepted and ready to land.May 17 2026, 4:21 PM
This revision was automatically updated to reflect the committed changes.