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: <IA3PR11MB8986C5D31E8BA1CE3294B013E55FA@IA3PR11MB8986.namprd11.prod.outlook.com>
Date: Wed, 23 Jul 2025 10:38:12 +0000
From: "Loktionov, Aleksandr" <aleksandr.loktionov@...el.com>
To: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>,
	"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>, "Kitszel, Przemyslaw"
	<przemyslaw.kitszel@...el.com>, "dawid.osuchowski@...ux.intel.com"
	<dawid.osuchowski@...ux.intel.com>
Subject: RE: [Intel-wired-lan] [PATCH iwl-next v1 08/15] ice: check for PF
 number outside the fwlog code



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf
> Of Michal Swiatkowski
> Sent: Tuesday, July 22, 2025 12:46 PM
> To: intel-wired-lan@...ts.osuosl.org
> Cc: netdev@...r.kernel.org; Kitszel, Przemyslaw
> <przemyslaw.kitszel@...el.com>; dawid.osuchowski@...ux.intel.com;
> Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
> Subject: [Intel-wired-lan] [PATCH iwl-next v1 08/15] ice: check for PF
> number outside the fwlog code
> 
> Fwlog can be supported only on PF 0. Check this before calling
> init/deinit functions.
> 
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>
> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@...el.com>

> ---
>  drivers/net/ethernet/intel/ice/ice_common.c  | 8 ++++++++
> drivers/net/ethernet/intel/ice/ice_debugfs.c | 4 ----
>  drivers/net/ethernet/intel/ice/ice_fwlog.c   | 7 -------
>  3 files changed, 8 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_common.c
> b/drivers/net/ethernet/intel/ice/ice_common.c
> index 9119d097eb08..2666e59b0786 100644
> --- a/drivers/net/ethernet/intel/ice/ice_common.c
> +++ b/drivers/net/ethernet/intel/ice/ice_common.c
> @@ -1002,6 +1002,10 @@ static int __fwlog_init(struct ice_hw *hw)
>  	};
>  	int err;
> 
> +	/* only support fw log commands on PF 0 */
> +	if (hw->bus.func)
> +		return -EINVAL;
> +
>  	err = ice_debugfs_pf_init(pf);
>  	if (err)
>  		return err;
> @@ -1186,6 +1190,10 @@ int ice_init_hw(struct ice_hw *hw)
> 
>  static void __fwlog_deinit(struct ice_hw *hw)  {
> +	/* only support fw log commands on PF 0 */
> +	if (hw->bus.func)
> +		return;
> +
>  	ice_debugfs_pf_deinit(hw->back);
>  	ice_fwlog_deinit(hw, &hw->fwlog);
>  }
> diff --git a/drivers/net/ethernet/intel/ice/ice_debugfs.c
> b/drivers/net/ethernet/intel/ice/ice_debugfs.c
> index c7d9e92d7f56..e5b63b6bd44d 100644
> --- a/drivers/net/ethernet/intel/ice/ice_debugfs.c
> +++ b/drivers/net/ethernet/intel/ice/ice_debugfs.c
> @@ -588,10 +588,6 @@ void ice_debugfs_fwlog_init(struct ice_pf *pf)
>  	struct dentry **fw_modules;
>  	int i;
> 
> -	/* only support fw log commands on PF 0 */
> -	if (pf->hw.bus.func)
> -		return;
> -
>  	/* allocate space for this first because if it fails then we
> don't
>  	 * need to unwind
>  	 */
> diff --git a/drivers/net/ethernet/intel/ice/ice_fwlog.c
> b/drivers/net/ethernet/intel/ice/ice_fwlog.c
> index f7dbcb5e11aa..634e3de3ae66 100644
> --- a/drivers/net/ethernet/intel/ice/ice_fwlog.c
> +++ b/drivers/net/ethernet/intel/ice/ice_fwlog.c
> @@ -242,9 +242,6 @@ static void ice_fwlog_set_supported(struct
> ice_fwlog *fwlog)  int ice_fwlog_init(struct ice_hw *hw, struct
> ice_fwlog *fwlog,
>  		   struct ice_fwlog_api *api)
>  {
> -	/* only support fw log commands on PF 0 */
> -	if (hw->bus.func)
> -		return -EINVAL;
> 
>  	fwlog->api = *api;
>  	ice_fwlog_set_supported(fwlog);
> @@ -296,10 +293,6 @@ void ice_fwlog_deinit(struct ice_hw *hw, struct
> ice_fwlog *fwlog)
>  	struct ice_pf *pf = hw->back;
>  	int status;
> 
> -	/* only support fw log commands on PF 0 */
> -	if (hw->bus.func)
> -		return;
> -
>  	/* make sure FW logging is disabled to not put the FW in a
> weird state
>  	 * for the next driver load
>  	 */
> --
> 2.49.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ