Page MenuHomeFreeBSD

limits: Further RLIMIT_VMM cleanup
ClosedPublic

Authored by des on Sat, May 16, 4:38 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.Sat, May 16, 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.Sun, May 17, 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.Sun, May 17, 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.Sun, May 17, 4:21 PM
This revision was automatically updated to reflect the committed changes.