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]
Date:   Fri, 22 Jul 2022 11:23:48 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Jiri Pirko <jiri@...nulli.us>
Cc:     netdev@...r.kernel.org, davem@...emloft.net, idosch@...dia.com,
        petrm@...dia.com, pabeni@...hat.com, edumazet@...gle.com,
        mlxsw@...dia.com, saeedm@...dia.com, snelson@...sando.io
Subject: Re: [patch net-next v3 01/11] net: devlink: make sure that
 devlink_try_get() works with valid pointer during xarray iteration

On Fri, 22 Jul 2022 17:50:17 +0200 Jiri Pirko wrote:
> >Plus we need to be more careful about the unregistering order, I
> >believe the correct ordering is:
> >
> >	clear_unmark()
> >	put()
> >	wait()
> >	notify()
> >
> >but I believe we'll run afoul of Leon's notification suppression.
> >So I guess notify() has to go before clear_unmark(), but we should
> >unmark before we wait otherwise we could live lock (once the mutex 
> >is really gone, I mean).  
> 
> Kuba, could you elaborate a bit more about the live lock problem here?

Once the devlink_mutex lock is gone - (unprivileged) user space dumping
devlink objects could prevent any de-registration from happening
because it can keep the reference of the instance up. So we should mark
the instance as not REGISTERED first, then go to wait.

Pretty theoretical, I guess, but I wanted to mention it in case you can
figure out a solution along the way :S I don't think it's a blocker
right now since we still have the mutex.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ