Page MenuHomeFreeBSD

kern_resource.c: Track per-UID resource limits in 'struct uidinfo'
Needs ReviewPublic

Authored by bnovkov on Sun, Feb 1, 5:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Feb 2, 6:10 AM
Unknown Object (File)
Mon, Feb 2, 6:09 AM
Unknown Object (File)
Mon, Feb 2, 3:40 AM
Unknown Object (File)
Mon, Feb 2, 12:27 AM
Unknown Object (File)
Mon, Feb 2, 12:26 AM
Unknown Object (File)
Mon, Feb 2, 12:00 AM
Subscribers

Details

Reviewers
markj
olce
Summary

Certain getrlimit(2) resource limits are meant to limit resource
consumption on a per-UID basis and use the 'uidinfo' structure
to track the total resource consumption for a given UID.
However, the limits themselves are still stored in 'struct proc'
which makes it impossible to propagate a newly modified limit value to
all processes owned by the UID whose limit we wish to change.

This change addresses this issue by adding a new 'struct plimit'
member to 'struct uidinfo' and uses it to store resource limit values
for per-UID limits. The 'lim_rlimit' function will now distinguish
between per-process and per-UID limits and return the limit value
from the appropriate location.

Diff Detail

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