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]
Date:   Wed, 11 Dec 2019 12:42:00 +0800
From:   Ying Xue <ying.xue@...driver.com>
To:     Tuong Lien Tong <tuong.t.lien@...tech.com.au>, <paulmck@...nel.org>
CC:     <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <mingo@...nel.org>, <tipc-discussion@...ts.sourceforge.net>,
        <kernel-team@...com>, <torvalds@...ux-foundation.org>,
        <davem@...emloft.net>
Subject: Re: [tipc-discussion] [PATCH net/tipc] Replace rcu_swap_protected()
 with rcu_replace_pointer()

On 12/11/19 10:00 AM, Tuong Lien Tong wrote:
>>  
>>  	/* Move passive key if any */
>>  	if (key.passive) {
>> -		tipc_aead_rcu_swap(rx->aead[key.passive], tmp2, &rx->lock);
>> +		tmp2 = rcu_replace_pointer(rx->aead[key.passive], tmp2,
> &rx->lock);
> The 3rd parameter should be the lockdep condition checking instead of the
> spinlock's pointer i.e. "lockdep_is_held(&rx->lock)"?
> That's why I'd prefer to use the 'tipc_aead_rcu_swap ()' macro, which is
> clear & concise at least for the context here. It might be re-used later as
> well...
> 

Right. The 3rd parameter of rcu_replace_pointer() should be
"lockdep_is_held(&rx->lock)" instead of "&rx->lock".

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ