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: <20160126133024.07f372dbf8935e03a3035269@linux-foundation.org>
Date:	Tue, 26 Jan 2016 13:30:24 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Johannes Weiner <hannes@...xchg.org>
Cc:	Vladimir Davydov <vdavydov@...tuozzo.com>,
	Michal Hocko <mhocko@...e.cz>, linux-mm@...ck.org,
	cgroups@...r.kernel.org, linux-kernel@...r.kernel.org,
	kernel-team@...com
Subject: Re: [PATCH] mm: memcontrol: drop superfluous entry in the per-memcg
 stats array

On Tue, 26 Jan 2016 15:55:29 -0500 Johannes Weiner <hannes@...xchg.org> wrote:

> MEM_CGROUP_STAT_NSTATS is just a delimiter for cgroup1 statistics, not
> an actual array entry. Reuse it for the first cgroup2 stat entry, like
> in the event array.
> 
> ...
>
> --- a/include/linux/memcontrol.h
> +++ b/include/linux/memcontrol.h
> @@ -51,7 +51,7 @@ enum mem_cgroup_stat_index {
>  	MEM_CGROUP_STAT_SWAP,		/* # of pages, swapped out */
>  	MEM_CGROUP_STAT_NSTATS,
>  	/* default hierarchy stats */
> -	MEMCG_SOCK,
> +	MEMCG_SOCK = MEM_CGROUP_STAT_NSTATS,
>  	MEMCG_NR_STAT,
>  };

The code looks a bit odd.  How come mem_cgroup_stat_names[] ends with
"swap"?  Should MEMCG_SOCK be in there at all?

And the naming is a bit sad.  "MEM_CGROUP_STAT_FILE_MAPPED" maps to
"mapped_file", not "file_mapped".

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ