tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: ulimits and memfd(2)
On 2023-08-11 03:00, Taylor R Campbell wrote:
> So is there a way to limit the memory use of memfd?
You are correct, currently the only limits are via F_SEAL_*.
> Maybe the memfd
> should contribute toward RLIMIT_AS somehow, or something like that?
It could contribute directly to RLIMIT_AS (in the same way that mmap
does it), but then the memory would be double counted when you mmap the
memfd(?), which seems undesirable.
Maybe memfd should respect RLIMIT_FSIZE, since memfds are supposed to
behave like regular files as much as possible. Also, I think this is
much simpler to add (just an extra check when truncating?).
Theo(dore)
Home |
Main Index |
Thread Index |
Old Index