Skip to content

sys_setrlimit: make sure ->rlim_max never grows

Oleg Nesterov lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1sys_setrlimit: make sure ->rlim_max never growskernel/sys.c+8 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/1] sys_setrlimit: make sure ->rlim_max never grows
Quoted 7 lines · Jiri Slaby
Quoted 5 lines · Oleg Nesterov
Quoted 3 lines · Jiri Slaby

I can't think of anything else than doing all the checks and updates under alloc_lock, introducing coarse grained static mutex in setrlimit to protect it,

Quoted 7 lines
Quoted 5 lines

Oh, please don't ;)

Or I missed your point?

But if you mean this series, then yes, I agree.

Yes, I meant those. But I don't know what do you agree with :).

Not sure what I agree with, but I am glad we seem to agree with each other ;)

Quoted 7 lines
Quoted 3 lines

We should try to do something
to ensure that at least rlim_max can be always lowered when admin writes to /proc/pid/limits.

Yes, that's what I asked about when I wrote the three options which I was able to think of above. So any other ideas about how to elegantly protect against sys_setrlimit vs. admin+/proc/*/limits race?

Perhaps we should start these change with this patch (see the next email) ?

Perhaps, before your changes, we should "fix" sys_setrlimit() first ? Well, the patch (the next email) is not tested... What do you think?

Oleg.