lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1009160940330.24798@tigran.mtv.corp.google.com>
Date:	Thu, 16 Sep 2010 09:50:24 -0700 (PDT)
From:	Hugh Dickins <hughd@...gle.com>
To:	Nikanth Karthikesan <knikanth@...e.de>
cc:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Matt Mackall <mpm@...enic.com>,
	Richard Guenther <rguenther@...e.de>,
	Balbir Singh <balbir@...ux.vnet.ibm.com>, linux-mm@...ck.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Michael Matz <matz@...ell.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Document the new Anonymous field in smaps.

On Thu, 16 Sep 2010, Nikanth Karthikesan wrote:

> Sorry, I missed to add documentation, when I sent the patch. This depends on
> the patch titled, "[PATCH] Export amount of anonymous memory in a mapping via
> smaps".
> 
> Thanks
> Nikanth
> 
> 
> Document the new Anonymous field in smaps.
> 
> Signed-off-by: Nikanth Karthikesan <knikanth@...e.de>

Thanks for adding this, but...

> 
> ---
> 
> diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
> index a6aca87..75c7368 100644
> --- a/Documentation/filesystems/proc.txt
> +++ b/Documentation/filesystems/proc.txt
> @@ -370,6 +370,7 @@ Shared_Dirty:          0 kB
>  Private_Clean:         0 kB
>  Private_Dirty:         0 kB
>  Referenced:          892 kB
> +Anonymous:             0 kB
>  Swap:                  0 kB
>  KernelPageSize:        4 kB
>  MMUPageSize:           4 kB
> @@ -380,7 +381,10 @@ the amount of the mapping that is currently resident in RAM, the "proportional
>  set size” (divide each shared page by the number of processes sharing it), the
>  number of clean and dirty shared pages in the mapping, and the number of clean
>  and dirty private pages in the mapping.  The "Referenced" indicates the amount
> -of memory currently marked as referenced or accessed.
> +of memory currently marked as referenced or accessed. The "Anonymous" shows
> +the amount of mapping that is not associated with a file. Even the private
> +pages in a mapping associated with a file, would become anonymous, when they
> +are modified.

... unfortunately it needs rewording, because you're describing it well
with respect to MAP_SHARED versus MAP_PRIVATE, but /proc/pid/smaps has a
different definition of whether pages are shared or private, just depending
on their mapcount at the instant.

Indeed, adding a comment on that would be helpful too, if you've time.

>  
>  This file is only present if the CONFIG_MMU kernel configuration option is
>  enabled.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ