This is the mail archive of the
mailing list for the glibc project.
Re: qsort() and /proc/meminfo
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: Ian Pilcher <arequipeno at gmail dot com>
- Cc: libc-help at sourceware dot org
- Date: Sat, 06 May 2017 19:44:41 +0200
- Subject: Re: qsort() and /proc/meminfo
- Authentication-results: sourceware.org; auth=none
- References: <firstname.lastname@example.org>
* 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
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