qsort() and /proc/meminfo
Florian Weimer
fw@deneb.enyo.de
Sat May 6 17:44:00 GMT 2017
* Ian Pilcher:
> I am writing an SELinux policy for a service written in Python, and I've
> discovered that Python calls qsort(), which wants to read /proc/meminfo.
> I'm not enthusiastic about the prospect of granting this access, since
> it will mean allowing read access to almost all of /proc.
>
> What are the potential pitfalls of preventing qsort() from reading
> /proc/meminfo?
You could end up with swapping/thrashing, or the OOM killer might kill
some process. In general, the effect should be rather benign.
Upgrading glibc will get rid of this /proc dependency, but of course
may introduce others (we pretty much assume a mounted /proc these
days).
More information about the Libc-help
mailing list