rlimit: avoid performing the test and setting limit if its infinite#2032
rlimit: avoid performing the test and setting limit if its infinite#2032RonFed wants to merge 1 commit into
Conversation
Signed-off-by: Ron Federman <ron@odigos.io>
d6d33b8 to
f8894bb
Compare
|
@RonFed What problem does this solve? This defeats the purpose of the probe. Rlimit being set to infinity doesn't mean the kernel has memcg accounting. |
The main motivation is to avoid |
|
Okay, but your proposed fix still disables the probe, which is not what you'd want under any circumstance. There's also no guarantee that code running in between the probe and the first BPF() syscall doesn't lower rlimit. The import side effect of package Your program should tolerate errors from |
If the current
rlimitis infinity, raising it will be a no-op, so we can skip the init test and the later potentialrlimitsyscall to raise it to infinity.