Re: [PATCH] proc: Fix integer overflow of VmLib

From: Richard Weinberger
Date: Thu Jan 05 2017 - 08:20:39 EST


Michal,

Am 05.01.2017 um 12:49 schrieb Michal Hocko:
>> I thought 0 is the better choice since it will not lead to wrong results
>> when userspace tools compute the sum of values reported by /proc/<pid>/status.
>
> Dunno. If somebody translates 0 to statically linked library then it
> could be wrong.

Checking VmLib for 0 is not the correct way to detect a statically linked
program.
Unless I misread the code, VmLib will honour any PROT_EXEC mapping.
So, a statically linked JIT will have VmLib > 0.

Thanks,
//richard