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: <0d5656d6-91f1-40b2-828f-c844465f8da4@web.de>
Date: Fri, 12 Jul 2024 20:42:53 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Pankaj Gupta <pankaj.gupta@....com>, imx@...ts.linux.dev,
 devicetree@...r.kernel.org, linux-doc@...r.kernel.org,
 kernel-janitors@...r.kernel.org, kernel@...gutronix.de,
 linux-arm-kernel@...ts.infradead.org
Cc: LKML <linux-kernel@...r.kernel.org>, Conor Dooley <conor+dt@...nel.org>,
 Fabio Estevam <festevam@...il.com>, Jonathan Corbet <corbet@....net>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>, Rob Herring <robh@...nel.org>,
 Sascha Hauer <s.hauer@...gutronix.de>, Shawn Guo <shawnguo@...nel.org>
Subject: Re: [PATCH v5 4/5] firmware: imx: add driver for NXP EdgeLock Enclave

…
> +++ b/drivers/firmware/imx/ele_common.c
> @@ -0,0 +1,264 @@
…
> +int ele_msg_send(struct se_if_priv *priv, void *tx_msg)
> +{
…
> +	if (header->tag == priv->cmd_tag)
> +		lockdep_assert_held(&priv->se_if_cmd_lock);
> +
> +	scoped_guard(mutex, &priv->se_if_lock);
…

I interpret the documentation for this programming interface in the way
that such code may usually be used together with a (compound) statement.
https://elixir.bootlin.com/linux/v6.10-rc7/source/include/linux/cleanup.h#L137

How do you think about to apply a statement like “guard(mutex)(&priv->se_if_lock);” instead?
https://elixir.bootlin.com/linux/v6.10-rc7/source/include/linux/mutex.h#L196

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ