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]
Date:   Tue, 14 Sep 2021 21:10:27 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Liu Shixin <liushixin2@...wei.com>
Cc:     "Paul E . McKenney" <paulmck@...nel.org>, <linux-mm@...ck.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm/vmstat: annotate data race for
 zone->free_area[order].nr_free

On Wed, 8 Sep 2021 09:56:06 +0800 Liu Shixin <liushixin2@...wei.com> wrote:

> KCSAN reports a data-race on v5.10 which also exists on mainline:
> 
> ==================================================================
> BUG: KCSAN: data-race in extfrag_for_order+0x33/0x2d0
> 
> race at unknown origin, with read to 0xffff9ee9bfffab48 of 8 bytes by task 34 on cpu 1:
>  extfrag_for_order+0x33/0x2d0
>  kcompactd+0x5f0/0xce0
>  kthread+0x1f9/0x220
>  ret_from_fork+0x22/0x30
> 
> Reported by Kernel Concurrency Sanitizer on:
> CPU: 1 PID: 34 Comm: kcompactd0 Not tainted 5.10.0+ #2
> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014
> ==================================================================
> 
> Access to zone->free_area[order].nr_free in extfrag_for_order()/frag_show_print()
> is lockless. That's intentional and the stats are a rough estimate anyway.
> Annotate them with data_race().

checkpatch helpfully says

WARNING: data_race without comment
#40: FILE: mm/vmstat.c:1074:
+               blocks = data_race(zone->free_area[order].nr_free);


can we please add a comment ;)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ