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]
Message-ID: <20240726073721.042b4d88@kernel.org>
Date: Fri, 26 Jul 2024 07:37:21 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
Cc: Tony Nguyen <anthony.l.nguyen@...el.com>, <davem@...emloft.net>,
 <pabeni@...hat.com>, <edumazet@...gle.com>, <netdev@...r.kernel.org>,
 <magnus.karlsson@...el.com>, <aleksander.lobakin@...el.com>,
 <ast@...nel.org>, <daniel@...earbox.net>, <hawk@...nel.org>,
 <john.fastabend@...il.com>, <bpf@...r.kernel.org>, Shannon Nelson
 <shannon.nelson@....com>, Chandan Kumar Rout <chandanx.rout@...el.com>
Subject: Re: [PATCH net 6/8] ice: improve updating ice_{t,
 r}x_ring::xsk_pool

On Fri, 26 Jul 2024 15:43:20 +0200 Maciej Fijalkowski wrote:
> > The _ONCE() helpers basically give you the ability to store the pointer
> > to a variable on the stack, and that variable won't change behind your
> > back. But the only reason to READ_ONCE(ptr->thing) something multiple
> > times is to tell KCSAN that "I know what I'm doing", it just silences
> > potential warnings :S  
> 
> I feel like you keep on referring to _ONCE (*) being used multiple times
> which might be counter-intuitive whereas I was trying from the beginning
> to explain my point that xsk pool from driver POV should get the very same
> treatment as xdp prog has currently. So, either mark it as __rcu variable
> and use rcu helpers or use _ONCE variants plus some sync.
> 
> (*) Ok, if you meant from the very beginning that two READ_ONCE against
> pool per single critical section is suspicious then I didn't get that,
> sorry. With diff below I would have single READ_ONCE and work on that
> variable for rest of the napi. Patch was actually trying to limit xsk_pool
> accesses from ring struct by working on stack variable.
> 
> Would you be okay with that?

Yup! That diff makes sense, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ