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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7b0df952-9269-4669-bac4-826384316e70@intel.com>
Date: Mon, 12 May 2025 11:42:13 -0700
From: Jacob Keller <jacob.e.keller@...el.com>
To: Lee Trager <lee@...ger.us>, Alexander Duyck <alexanderduyck@...com>,
	"Jakub Kicinski" <kuba@...nel.org>, <kernel-team@...a.com>, "David S. Miller"
	<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
	<pabeni@...hat.com>, Simon Horman <horms@...nel.org>, Jonathan Corbet
	<corbet@....net>, Andrew Lunn <andrew+netdev@...n.ch>, Mohsin Bashir
	<mohsin.bashr@...il.com>, Sanman Pradhan <sanman.p211993@...il.com>, Su Hui
	<suhui@...china.com>, Al Viro <viro@...iv.linux.org.uk>, Michal Swiatkowski
	<michal.swiatkowski@...ux.intel.com>
CC: Andrew Lunn <andrew@...n.ch>, <netdev@...r.kernel.org>,
	<linux-doc@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next v4 1/5] pldmfw: Don't require send_package_data
 or send_component_table to be defined



On 5/9/2025 5:21 PM, Lee Trager wrote:
> Not all drivers require send_package_data or send_component_table when
> updating firmware. Instead of forcing drivers to implement a stub allow
> these functions to go undefined.
> 
> Signed-off-by: Lee Trager <lee@...ger.us>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>

Makes sense.

Acked-by: Jacob Keller <jacob.e.keller@...el.com>

> ---
>  lib/pldmfw/pldmfw.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/lib/pldmfw/pldmfw.c b/lib/pldmfw/pldmfw.c
> index 6264e2013f25..b45ceb725780 100644
> --- a/lib/pldmfw/pldmfw.c
> +++ b/lib/pldmfw/pldmfw.c
> @@ -728,6 +728,9 @@ pldm_send_package_data(struct pldmfw_priv *data)
>  	struct pldmfw_record *record = data->matching_record;
>  	const struct pldmfw_ops *ops = data->context->ops;
> 
> +	if (!ops->send_package_data)
> +		return 0;
> +
>  	return ops->send_package_data(data->context, record->package_data,
>  				      record->package_data_len);
>  }
> @@ -755,6 +758,9 @@ pldm_send_component_tables(struct pldmfw_priv *data)
>  		if (!test_bit(index, bitmap))
>  			continue;
> 
> +		if (!data->context->ops->send_component_table)
> +			continue;
> +
>  		/* determine whether this is the start, middle, end, or both
>  		 * the start and end of the component tables
>  		 */
> --
> 2.47.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ