From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756626AbdJJWZH (ORCPT ); Tue, 10 Oct 2017 18:25:07 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:37150 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751858AbdJJWZF (ORCPT ); Tue, 10 Oct 2017 18:25:05 -0400 Date: Tue, 10 Oct 2017 15:25:04 -0700 From: Andrew Morton To: Konstantin Khlebnikov Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] proc: do not show VmExe bigger than total executable virtual memory Message-Id: <20171010152504.c0b84899a95e0bcd79b73290@linux-foundation.org> In-Reply-To: <150728955451.743749.11276392315459539583.stgit@buzz> References: <150728955451.743749.11276392315459539583.stgit@buzz> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 06 Oct 2017 14:32:34 +0300 Konstantin Khlebnikov wrote: > If start_code / end_code pointers are screwed then "VmExe" could be bigger > than total executable virtual memory and "VmLib" becomes negative: > > VmExe: 294320 kB > VmLib: 18446744073709327564 kB > > VmExe and VmLib documented as text segment and shared library code size. > > Now their sum will be always equal to mm->exec_vm which sums size of > executable and not writable and not stack areas. When does this happen? What causes start_code/end_code to get "screwed"? When these pointers are screwed, the result of end_code-start_code can still be wrong while not necessarily being negative, yes? In which case we'll still display incorrect output?