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: <cdcc4cf2-543a-4301-a445-5ced6a2d981b@web.de>
Date: Thu, 27 Jun 2024 15:52:24 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Christian Marangi <ansuelsmth@...il.com>, netdev@...r.kernel.org,
 Andrew Lunn <andrew@...n.ch>, "David S. Miller" <davem@...emloft.net>,
 Eric Dumazet <edumazet@...gle.com>, Florian Fainelli <f.fainelli@...il.com>,
 Heiner Kallweit <hkallweit1@...il.com>, Jakub Kicinski <kuba@...nel.org>,
 Jiasheng Jiang <jiasheng@...as.ac.cn>, Justin Stitt
 <justinstitt@...gle.com>, Marek Behún <kabel@...nel.org>,
 Paolo Abeni <pabeni@...hat.com>, Russell King <linux@...linux.org.uk>,
 Vladimir Oltean <olteanv@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>, Peter Zijlstra <peterz@...radead.org>
Subject: Re: [net-next RFC PATCH 1/2] net: mdio: implement mdio_mutex_nested
 guard() variant

> Implement mdio_mutex_nested guard() variant.

I find the idea generally helpful.
The concrete implementation needs further clarifications.


> guard() compes from the cleanup.h API that define handy class to

          comes?                             defines?


> define the lifecycle of a critical section.

  handle?


> Many driver makes use of the mutex_lock_nested()/mutex_unlock() hence it

  Several drivers use?                                            function call pair.

Would you like to clarify any application statistics another bit?
https://elixir.bootlin.com/linux/v6.10-rc5/A/ident/mutex_lock_nested


> might be sensible to provide a variant of the generic guard(mutex),

  Hence it is?                                                      :


> guard(mdio_mutex_nested) to also support drivers that use
> mutex_lock_nested with MDIO_MUTEX_NESTED.

Another wording suggestion:
  guard(mdio_mutex_nested) so that drivers can be better supported
  with the call variant “mutex_lock_nested(…, MDIO_MUTEX_NESTED)”.


…
> +++ b/include/linux/mdio.h
> @@ -8,6 +8,8 @@
>
>  #include <uapi/linux/mdio.h>
>  #include <linux/bitfield.h>
> +#include <linux/cleanup.h>

I suggest to omit this preprocessing directive here.


> +#include <linux/mutex.h>
>  #include <linux/mod_devicetable.h>
…

Further information is included as possibly needed.
https://elixir.bootlin.com/linux/v6.10-rc5/source/include/linux/mutex.h#L22

How reasonable is the added header file dependency so far?


Under which circumstances can remaining change resistance be adjusted
for further benefits from applications of scope-based resource management?

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ