From: Michal Hocko <mhocko@kernel.org>
To: Richard Weinberger <richard@nod.at>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
vbabka@suse.cz, kirill.shutemov@linux.intel.com,
jmarchan@redhat.com, gerald.schaefer@de.ibm.com,
hannes@cmpxchg.org, luto@kernel.org
Subject: Re: [PATCH] proc: Fix integer overflow of VmLib
Date: Thu, 5 Jan 2017 14:49:03 +0100 [thread overview]
Message-ID: <20170105134903.GS21618@dhcp22.suse.cz> (raw)
In-Reply-To: <d5b1ed3c-85d4-a3f1-759f-ad6296ab30bf@nod.at>
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/<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.
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
> Unless I misread the code, VmLib will honour any PROT_EXEC mapping.
> So, a statically linked JIT will have VmLib > 0.
yes the code behaves differently and that's why I've said that the
reported number is not correct no matter how.
Anyway, as I've said I do not see any solution without risk of
regression while the current code is clearly wrong. If the general
consensus is that 0 is better than explicitly documenting VmLib as the
size of executable code and report it that way then I have no objections
and won't stay in the way. I am not sure which poison is worse.
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2017-01-05 13:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-04 23:29 Richard Weinberger
2017-01-05 8:38 ` Vlastimil Babka
2017-01-05 10:53 ` Michal Hocko
2017-01-05 11:03 ` Richard Weinberger
2017-01-05 11:49 ` Michal Hocko
2017-01-05 13:20 ` Richard Weinberger
2017-01-05 13:49 ` Michal Hocko [this message]
2017-01-06 0:11 ` Richard Weinberger
2017-01-05 12:01 ` Jerome Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170105134903.GS21618@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=gerald.schaefer@de.ibm.com \
--cc=hannes@cmpxchg.org \
--cc=jmarchan@redhat.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=richard@nod.at \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®