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: <1096134d-df6f-185d-240f-8a774d66f98f@google.com>
Date: Sun, 28 Apr 2024 01:10:39 -0700 (PDT)
From: David Rientjes <rientjes@...gle.com>
To: linke li <lilinke99@...com>
cc: xujianhao01@...il.com, Christoph Lameter <cl@...ux.com>, 
    Pekka Enberg <penberg@...nel.org>, Joonsoo Kim <iamjoonsoo.kim@....com>, 
    Andrew Morton <akpm@...ux-foundation.org>, 
    Vlastimil Babka <vbabka@...e.cz>, 
    Roman Gushchin <roman.gushchin@...ux.dev>, 
    Hyeonggon Yoo <42.hyeyoo@...il.com>, linux-mm@...ck.org, 
    linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/slub: mark racy access on slab->freelist

On Sat, 27 Apr 2024, linke li wrote:

> In deactivate_slab(), slab->freelist can be changed concurrently. Mark
> data race on slab->freelist as benign using READ_ONCE.
> 
> This patch is aimed at reducing the number of benign races reported by
> KCSAN in order to focus future debugging effort on harmful races.
> 

Thanks!  Do you have a data race report to copy+paste into the commit 
description so people can search for it if they stumble across the same 
thing?

> Signed-off-by: linke li <lilinke99@...com>
> ---
>  mm/slub.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/slub.c b/mm/slub.c
> index 0d700f6ca547..bb0e05a321e9 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -2813,7 +2813,7 @@ static void deactivate_slab(struct kmem_cache *s, struct slab *slab,
>  	struct slab new;
>  	struct slab old;
>  
> -	if (slab->freelist) {
> +	if (READ_ONCE(slab->freelist)) {
>  		stat(s, DEACTIVATE_REMOTE_FREES);
>  		tail = DEACTIVATE_TO_TAIL;
>  	}
> -- 
> 2.39.3 (Apple Git-146)
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ