HomeFreeBSD

Factor out resource limit enforcement code in the ELF loader.

Description

Factor out resource limit enforcement code in the ELF loader.
It makes the code slightly easier to follow, and might make
it easier to fix the resouce accounting to also account for
the interpreter.

The PROC_UNLOCK() is moved earlier - I don't see anything
it should protect; the lim_max() is a wrapper around lim_rlimit(),
and that, differently from lim_rlimit_proc(), doesn't require
the proc lock to be held.

Reviewed by: kib
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D19689

Details

Provenance
traszAuthored on
Reviewer
kib
Differential Revision
D19689: Factor out resource limit enforcement code in the ELF loader.
Parents
rS345546: MFC r342961:
Branches
Unknown
Tags
Unknown