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, 8 May 2018 07:20:23 -0700
From:   Tejun Heo <tj@...nel.org>
To:     Jia-Ju Bai <baijiaju1990@...il.com>
Cc:     linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ata: ata_piix: Fix a possible data race in
 piix_pci_device_resume

Hello,

On Tue, May 08, 2018 at 11:46:13AM +0800, Jia-Ju Bai wrote:
> The write operation to "host->flags" is protected by
> the lock on line 1048, but the read operation to
> this data on line 1046 is not protected by the lock.
> Thus, there may exist a data race for "host->flags".
> 
> To fix this data race, the read operation to "host->flags" 
> should be also protected by the lock.

This isn't necessarily wrong.  It isn't different from atomic bitops -
the modifications are synchronized but what the reads get is
determined by memory ordering or other synchronization.  Here, the
whole suspend / resume paths are always synchronized and the spinlocks
are there just in case there are other writers to the field.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ