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: <2a531e60a0ea8187f1781d4075f127b01970321a.camel@redhat.com>
Date: Mon, 24 Jul 2023 18:23:03 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com, 
 mkubecek@...e.cz, lorenzo@...nel.org, Herbert Xu
 <herbert@...dor.apana.org.au>,  Neil Brown <neilb@...e.de>
Subject: Re: [PATCH net-next 1/2] net: store netdevs in an xarray

On Mon, 2023-07-24 at 08:41 -0700, Jakub Kicinski wrote:
> On Mon, 24 Jul 2023 10:18:04 +0200 Paolo Abeni wrote:
> > A possibly dumb question: why using an xarray over a plain list?
> 
> We need to drop the lock during the walk. 

I should have looked more closely to patch 2/2.

> So for a list we'd need 
> to either 
>  - add explicit iteration "cursor" or 

Would a cursor require acquiring a netdev reference? If so it looks
problematic (an evil/buggy userspace could keep such reference held for
an unbounded amount of time).

I agree xarray looks a better solution.

I still have some minor doubts WRT the 'missed device' scenario you
described in the commit message. What if the user-space is doing
'create the new one before deleting the old one' with the assumption
that at least one of old/new is always reported in dumps? Is that a too
bold assumption?

> I was measuring it to find out if we can delete the hash table without
> anyone noticing, but it's not really the motivation.

Understood. I though about rhashtable with the opposite assumption :)
So no need to discuss such option further, I guess.

Cheers,

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ