Subject: | Wrong unshared memory values when using /proc/self/statm |
Date: | Thu, 05 Jan 2012 02:09:10 +0100 |
To: | bug-Apache-SizeLimit [...] rt.cpan.org |
From: | Christian Ruppert <idl0r [...] qasl.de> |
Hi everybody,
Using Linux::Smaps is not always possible, for example when using Grsecurity
patches for the Linux kernel.
This ends up in using /proc/self/statm instead of smaps, see attachment for a
test case.
<snip>
% perl test.pl
Legacy check: SIZE=20844, SHARE=1720, UNSHARED=19124
Smaps check: SIZE=20848, SHARE=1776, UNSHARED=928
</snip>
So assuming unshared is $size - $share seems to be totally wrong, note the
huge difference between unshared with smaps and with statm.
--
Regards,
Christian Ruppert
Message body is not shown because sender requested not to inline it.
Message body not shown because it is not plain text.