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: <20231010111605.2d520efc@kernel.org>
Date: Tue, 10 Oct 2023 11:16:05 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Jiri Pirko <jiri@...nulli.us>
Cc: netdev@...r.kernel.org, pabeni@...hat.com, davem@...emloft.net,
 edumazet@...gle.com, gal@...dia.com
Subject: Re: [patch net-next] devlink: don't take instance lock for nested
 handle put

On Tue, 10 Oct 2023 17:56:36 +0200 Jiri Pirko wrote:
> >You understand what I'm saying tho, right?
> >
> >If we can depend on the parent not disappearing before the child,
> >and the hierarchy is a DAG - the locking is much easier, because
> >parent can lock the child.  
> 
> It won't help with the locking though. During GET, the devlink lock
> is taken and within it, you need to access the nested devlink attributes.
> 
> And during reload->notify, we still need work so the lock are taken in
> proper order.

If parent is guaranteed to exist the read only fields can be accessed
freely and the read-write fields can be cached on children.
Parent has a list of children, it can store/cache a netns pointer on all
of them. When reload happens lock them and update that pointer.
At which point children do not have to lock the parent.

> It would only make the rel infrastructure a bit similer. I will look
> into that. But it's parallel to this patchset really.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ