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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4af4e665-ef0a-aebc-a9d6-3e3601635bc2@intel.com>
Date:   Tue, 24 Nov 2020 09:47:17 +0100
From:   Björn Töpel <bjorn.topel@...el.com>
To:     Jakub Kicinski <kuba@...nel.org>,
        Björn Töpel <bjorn.topel@...il.com>
Cc:     netdev@...r.kernel.org, bpf@...r.kernel.org,
        magnus.karlsson@...el.com, ast@...nel.org, daniel@...earbox.net,
        maciej.fijalkowski@...el.com, sridhar.samudrala@...el.com,
        jesse.brandeburg@...el.com, qi.z.zhang@...el.com,
        edumazet@...gle.com, jonathan.lemon@...il.com, maximmi@...dia.com
Subject: Re: [PATCH bpf-next v3 01/10] net: introduce preferred busy-polling


On 2020-11-24 01:11, Jakub Kicinski wrote:
> On Thu, 19 Nov 2020 09:30:15 +0100 Björn Töpel wrote:
>> @@ -105,7 +105,8 @@ static inline void sk_busy_loop(struct sock *sk, int nonblock)
>>   	unsigned int napi_id = READ_ONCE(sk->sk_napi_id);
>>   
>>   	if (napi_id >= MIN_NAPI_ID)
>> -		napi_busy_loop(napi_id, nonblock ? NULL : sk_busy_loop_end, sk);
>> +		napi_busy_loop(napi_id, nonblock ? NULL : sk_busy_loop_end, sk,
>> +			       READ_ONCE(sk->sk_prefer_busy_poll));
> 
> Perhaps a noob question, but aren't all accesses to the new sk members
> under the socket lock? Do we really need the READ_ONCE() / WRITE_ONCE()?
> 

No, only when setting them via sock_setsockopt. Reading is done outside
the lock.


Björn

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ