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: <a288e9e5-e6d7-b732-980c-38c6d971abe9@suse.com>
Date:   Fri, 28 May 2021 18:06:07 +0200
From:   Varad Gautam <varad.gautam@...e.com>
To:     "Ahmed S. Darwish" <a.darwish@...utronix.de>
CC:     linux-kernel@...r.kernel.org,
        linux-rt-users <linux-rt-users@...r.kernel.org>,
        netdev@...r.kernel.org, stable@...r.kernel.org,
        Steffen Klassert <steffen.klassert@...unet.com>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Florian Westphal <fw@...len.de>
Subject: Re: [PATCH] xfrm: policy: Read seqcount outside of rcu-read side in
 xfrm_policy_lookup_bytype

On 5/28/21 5:11 PM, Ahmed S. Darwish wrote:
> On Fri, May 28, 2021, Varad Gautam wrote:
> ...
>>
>> Thead 1 (xfrm_hash_resize)	Thread 2 (xfrm_policy_lookup_bytype)
>>
>> 				rcu_read_lock();
>> mutex_lock(&hash_resize_mutex);
>> 				read_seqcount_begin(&xfrm_policy_hash_generation);
>> 				mutex_lock(&hash_resize_mutex); // block
>> xfrm_bydst_resize();
>> synchronize_rcu(); // block
>> 		<RCU stalls in xfrm_policy_lookup_bytype>
>>
> ...
>> Fixes: a7c44247f70 ("xfrm: policy: make xfrm_policy_lookup_bytype lockless")
> 
> Minor note: the 'Fixes' commit should be 77cc278f7b20 ("xfrm: policy:
> Use sequence counters with associated lock") instead.
> 
> The reason read_seqcount_begin() is emitting a mutex_lock() on
> PREEMPT_RT is because of the s/seqcount_t/seqcount_mutex_t/ change.
> 

Thanks, corrected it in v2.

> Kind regards,
> 
> --
> Ahmed S. Darwish
> Linutronix GmbH
> 

-- 
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5
90409 Nürnberg
Germany

HRB 36809, AG Nürnberg
Geschäftsführer: Felix Imendörffer

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ