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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250602050126.GB21716@lst.de>
Date: Mon, 2 Jun 2025 07:01:26 +0200
From: Christoph Hellwig <hch@....de>
To: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
	David Hildenbrand <david@...hat.com>, lorenzo.stoakes@...cle.com,
	Liam.Howlett@...cle.com, vbabka@...e.cz, rppt@...nel.org,
	surenb@...gle.com, mhocko@...e.com, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org,
	Hongyu Ning <hongyu.ning@...ux.intel.com>, stable@...r.kernel.org,
	Christoph Hellwig <hch@....de>, Hannes Reinecke <hare@...e.de>,
	Johannes Thumshirn <johannes.thumshirn@....com>,
	Jens Axboe <axboe@...nel.dk>
Subject: Re: [PATCH] mm: Fix vmstat after removing NR_BOUNCE

On Thu, May 29, 2025 at 01:38:32PM +0300, Kirill A. Shutemov wrote:
> Hongyu noticed that the nr_unaccepted counter kept growing even in the
> absence of unaccepted memory on the machine.
> 
> This happens due to a commit that removed NR_BOUNCE: it removed the
> counter from the enum zone_stat_item, but left it in the vmstat_text
> array.
> 
> As a result, all counters below nr_bounce in /proc/vmstat are
> shifted by one line, causing the numa_hit counter to be labeled as
> nr_unaccepted.
> 
> To fix this issue, remove nr_bounce from the vmstat_text array.

Ooops, yes:

Reviewed-by: Christoph Hellwig <hch@....de>

> diff --git a/mm/vmstat.c b/mm/vmstat.c
> index 4c268ce39ff2..ae9882063d89 100644
> --- a/mm/vmstat.c
> +++ b/mm/vmstat.c
> @@ -1201,7 +1201,6 @@ const char * const vmstat_text[] = {
>  	"nr_zone_unevictable",
>  	"nr_zone_write_pending",
>  	"nr_mlock",
> -	"nr_bounce",
>  #if IS_ENABLED(CONFIG_ZSMALLOC)
>  	"nr_zspages",
>  #endif

It would be really useful if such pretty printing arrays used
named initializers, as that would make it obvious that an entry
needs removal.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ