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] [day] [month] [year] [list]
Message-ID: <7c41eaf6-d0d1-495c-865d-21cbdceb23b7@suse.cz>
Date: Fri, 26 Sep 2025 11:46:39 +0200
From: Vlastimil Babka <vbabka@...e.cz>
To: Lance Yang <lance.yang@...ux.dev>, akpm@...ux-foundation.org
Cc: elver@...gle.com, Liam.Howlett@...cle.com, david@...hat.com,
 harry.yoo@...cle.com, jannh@...gle.com, linux-kernel@...r.kernel.org,
 linux-mm@...ck.org, lorenzo.stoakes@...cle.com, riel@...riel.com,
 syzkaller-bugs@...glegroups.com,
 syzbot+60192c8877d0bc92a92b@...kaller.appspotmail.com
Subject: Re: [PATCH 1/1] mm: silence data-race in update_hiwater_rss

On 9/26/25 11:24, Lance Yang wrote:
> From: Lance Yang <lance.yang@...ux.dev>
> 
> KCSAN reports a data race on mm_cluster.hiwater_rss, which can be accessed
> concurrently from various paths like page migration and memory unmapping
> without synchronization.
> 
> Since hiwater_rss is a statistical field for accounting purposes, this data
> race is benign. Annotate both the read and write accesses with data_race()
> to make KCSAN happy.
> 
> Reported-by: syzbot+60192c8877d0bc92a92b@...kaller.appspotmail.com
> Closes: https://lore.kernel.org/linux-mm/68d6364e.050a0220.3390a8.000d.GAE@google.com
> Signed-off-by: Lance Yang <lance.yang@...ux.dev>

Acked-by: Vlastimil Babka <vbabka@...e.cz>

> ---
>  include/linux/mm.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 6b6c6980f46c..dd93335e3a13 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -2757,7 +2757,7 @@ static inline void update_hiwater_rss(struct mm_struct *mm)
>  	unsigned long _rss = get_mm_rss(mm);
>  
>  	if (data_race(mm->hiwater_rss) < _rss)
> -		(mm)->hiwater_rss = _rss;
> +		data_race(mm->hiwater_rss = _rss);
>  }
>  
>  static inline void update_hiwater_vm(struct mm_struct *mm)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ