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: <20211207202114.5ce27b2b@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Tue, 7 Dec 2021 20:21:14 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Leon Romanovsky <leon@...nel.org>
Cc:     "David S . Miller" <davem@...emloft.net>,
        Ido Schimmel <idosch@...dia.com>, Jiri Pirko <jiri@...dia.com>,
        linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 0/6] Allow parallel devlink execution

On Tue, 7 Dec 2021 09:29:03 +0200 Leon Romanovsky wrote:
> On Mon, Dec 06, 2021 at 06:00:27PM -0800, Jakub Kicinski wrote:
> > On Sun,  5 Dec 2021 10:22:00 +0200 Leon Romanovsky wrote:  
> > > This is final piece of devlink locking puzzle, where I remove global
> > > mutex lock (devlink_mutex), so we can run devlink commands in parallel.
> > > 
> > > The series starts with addition of port_list_lock, which is needed to
> > > prevent locking dependency between netdevsim sysfs and devlink. It
> > > follows by the patch that adds context aware locking primitives. Such
> > > primitives allow us to make sure that devlink instance is locked and
> > > stays locked even during reload operation. The last patches opens
> > > devlink to parallel commands.  
> > 
> > I'm not okay with assuming that all sub-objects are added when devlink
> > is not registered.  
> 
> But none of the patches in this series assume that.
> 
> In devlink_nested_lock() patch [1], I added new marker just to make sure
> that we don't lock if this specific command is called in locked context.
> 
> +#define DEVLINK_NESTED_LOCK XA_MARK_2
> 
> [1] https://lore.kernel.org/all/2b64a2a81995b56fec0231751ff6075020058584.1638690564.git.leonro@nvidia.com/

You skip locking if the marker is set. So a register operation can race
with a user space operation, right?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ