aboutsummaryrefslogtreecommitdiffstats
path: root/src/mutex/pthreads
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-07-25 12:23:14 +0000
committerlloyd <[email protected]>2009-07-25 12:23:14 +0000
commitc9f92c0c07634c3a2aa73a8f3d3660ba39d76fde (patch)
tree68783b8fa53c3c89360f7fd430e19d9c71748680 /src/mutex/pthreads
parent26fa799af0d362a37a80e1c666e738d3674fc25e (diff)
Two changes to proc_walk:
Don't read any file that is not world-readable. This avoids trouble when running as root, since on Linux various special files can cause odd interactions and/or blocking behavior when read (for instance /proc/kmsg). ssumption is that no such files are world-readable. This also avoids any issue of reading data that is potentially sensitive. Instead of reading the first 1 KB of each file, only read the first 128 bytes. This prevents large files (like /proc/config.gz or /proc/kallsyms) from swamping the input buffer; these inputs are pretty static and shouldn't count for much. Reducing to 128 bytes causes a poll to read about 400 different files, rather than ~30.
Diffstat (limited to 'src/mutex/pthreads')
0 files changed, 0 insertions, 0 deletions