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

2017-01-05 Thread Richard Weinberger
Michal, Am 05.01.2017 um 14:49 schrieb Michal Hocko: > If you just read the documentation: > VmLib size of shared library code > > then 0 might suggest there are no shared libraries used and the code is > statically linked Which is IMHO not correct. So, the documentation ne

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

2017-01-05 Thread Michal Hocko
On Thu 05-01-17 14:20:22, Richard Weinberger wrote: > 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//status. > > > > Dunno. If someb

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

2017-01-05 Thread Richard Weinberger
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//status. > > Dunno. If somebody translates 0 to statically linked library then it > could be wro

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

2017-01-05 Thread Jerome Marchand
On 01/05/2017 12:29 AM, Richard Weinberger wrote: > /proc//status can report extremely high VmLib values which > will confuse monitoring tools. > VmLib is mm->exec_vm minus text size, where exec_vm is the number of > bytes backed by an executable memory mapping and text size is > mm->end_code - mm-

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

2017-01-05 Thread Michal Hocko
On Thu 05-01-17 12:03:47, Richard Weinberger wrote: > Michal, > > Am 05.01.2017 um 11:53 schrieb Michal Hocko: > > I guess you meant s@overflow@underflow@ right? > > Yep, of course. > > > On Thu 05-01-17 00:29:18, Richard Weinberger wrote: > >> /proc//status can report extremely high VmLib value

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

2017-01-05 Thread Richard Weinberger
Michal, Am 05.01.2017 um 11:53 schrieb Michal Hocko: > I guess you meant s@overflow@underflow@ right? Yep, of course. > On Thu 05-01-17 00:29:18, Richard Weinberger wrote: >> /proc//status can report extremely high VmLib values which >> will confuse monitoring tools. >> VmLib is mm->exec_vm minu

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

2017-01-05 Thread Michal Hocko
I guess you meant s@overflow@underflow@ right? On Thu 05-01-17 00:29:18, Richard Weinberger wrote: > /proc//status can report extremely high VmLib values which > will confuse monitoring tools. > VmLib is mm->exec_vm minus text size, where exec_vm is the number of > bytes backed by an executable me

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

2017-01-05 Thread Vlastimil Babka
On 01/05/2017 12:29 AM, Richard Weinberger wrote: > /proc//status can report extremely high VmLib values which > will confuse monitoring tools. > VmLib is mm->exec_vm minus text size, where exec_vm is the number of > bytes backed by an executable memory mapping and text size is > mm->end_code - mm-

[PATCH] proc: Fix integer overflow of VmLib

2017-01-04 Thread Richard Weinberger
/proc//status can report extremely high VmLib values which will confuse monitoring tools. VmLib is mm->exec_vm minus text size, where exec_vm is the number of bytes backed by an executable memory mapping and text size is mm->end_code - mm->start_code as set up by binfmt. For the vast majority of a