From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033857AbdAENUf (ORCPT ); Thu, 5 Jan 2017 08:20:35 -0500 Received: from b.ns.miles-group.at ([95.130.255.144]:44723 "EHLO radon.swed.at" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1033837AbdAENU0 (ORCPT ); Thu, 5 Jan 2017 08:20:26 -0500 Subject: Re: [PATCH] proc: Fix integer overflow of VmLib To: Michal Hocko References: <20170104232918.25598-1-richard@nod.at> <20170105105329.GK21618@dhcp22.suse.cz> <20170105114949.GM21618@dhcp22.suse.cz> 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 From: Richard Weinberger Message-ID: Date: Thu, 5 Jan 2017 14:20:22 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170105114949.GM21618@dhcp22.suse.cz> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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