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: <Z-sN51vNmepkwPc8@mini-arch>
Date: Mon, 31 Mar 2025 14:49:27 -0700
From: Stanislav Fomichev <stfomichev@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Stanislav Fomichev <sdf@...ichev.me>, netdev@...r.kernel.org,
	davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com
Subject: Re: [PATCH net v4 07/11] docs: net: document netdev notifier
 expectations

On 03/31, Jakub Kicinski wrote:
> On Mon, 31 Mar 2025 08:05:59 -0700 Stanislav Fomichev wrote:
> > +The following notifiers are running without the lock (so the ops-locked
> > +devices need to manually grab the lock if needed):
> 
> Not sure about the text in the parenthesis, "the devices" don't "grab
> the lock". I mean - drivers don't generally register for notifications
> about their own devices. It's whoever registered the notifier that needs
> to make sure they take appropriate locks. I think we're fine without
> that sentence.

Good point, I was mostly referring to dev_ vs netif_ calls for managing
lower devices, will drop the sentence.

> > +* ``NETDEV_UNREGISTER``
> > +
> > +There are no clear expectations for the remaining notifiers. Notifiers not on
> > +the list may run with or without the instance lock, potentially even invoking
> > +the same notifier type with and without the lock from different code paths.
> > +The goal is to eventually ensure that all (or most, with a few documented
> > +exceptions) notifiers run under the instance lock.
> 
> Should we add a sentence here along the lines of "Please extend this
> documentation whenever you make explicit assumption about lock being
> held from a notifier." or is that obvious?

Yes, that was the assumption, but let's explicitly state that, shouldn't
hurt.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ