linux-fpga.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] fpga: m10bmc-sec: Fix kconfig dependencies
@ 2022-11-15  0:11 Russ Weight
  2022-11-15  1:03 ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Russ Weight @ 2022-11-15  0:11 UTC (permalink / raw)
  To: mdf, hao.wu, yilun.xu, trix, linux-fpga, linux-kernel
  Cc: lgoncalv, marpagan, matthew.gerlach, basheer.ahmed.muddebihal,
	tianfei.zhang, Russ Weight, kernel test robot, stable

The secure update driver depends on the firmware-upload functionality of
the firmware-loader. The firmware-loader is carried in the firmware-class
driver which is enabled with the tristate CONFIG_FW_LOADER option. The
firmware-upload functionality is included in the firmware-class driver if
the bool FW_UPLOAD config is set.

The current dependency statement, "depends on FW_UPLOAD", is not adequate
because it does not implicitly turn on FW_LOADER. Instead of adding a
dependency, follow the convention used by drivers that require the
FW_LOADER_USER_HELPER functionality of the firmware-loader by using
select for both FW_LOADER and FW_UPLOAD.

Fixes: bdf86d0e6ca3 ("fpga: m10bmc-sec: create max10 bmc secure update")
Reported-by: kernel test robot <lkp@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Russ Weight <russell.h.weight@intel.com>
---
 drivers/fpga/Kconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/fpga/Kconfig b/drivers/fpga/Kconfig
index d1a8107fdcb3..6ce143dafd04 100644
--- a/drivers/fpga/Kconfig
+++ b/drivers/fpga/Kconfig
@@ -246,7 +246,9 @@ config FPGA_MGR_VERSAL_FPGA
 
 config FPGA_M10_BMC_SEC_UPDATE
 	tristate "Intel MAX10 BMC Secure Update driver"
-	depends on MFD_INTEL_M10_BMC && FW_UPLOAD
+	depends on MFD_INTEL_M10_BMC
+	select FW_LOADER
+	select FW_UPLOAD
 	help
 	  Secure update support for the Intel MAX10 board management
 	  controller.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 1/1] fpga: m10bmc-sec: Fix kconfig dependencies
  2022-11-15  0:11 [PATCH v1 1/1] fpga: m10bmc-sec: Fix kconfig dependencies Russ Weight
@ 2022-11-15  1:03 ` Randy Dunlap
  2022-11-15 13:54   ` Xu Yilun
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2022-11-15  1:03 UTC (permalink / raw)
  To: Russ Weight, mdf, hao.wu, yilun.xu, trix, linux-fpga,
	linux-kernel
  Cc: lgoncalv, marpagan, matthew.gerlach, basheer.ahmed.muddebihal,
	tianfei.zhang, kernel test robot, stable



On 11/14/22 16:11, Russ Weight wrote:
> The secure update driver depends on the firmware-upload functionality of
> the firmware-loader. The firmware-loader is carried in the firmware-class
> driver which is enabled with the tristate CONFIG_FW_LOADER option. The
> firmware-upload functionality is included in the firmware-class driver if
> the bool FW_UPLOAD config is set.
> 
> The current dependency statement, "depends on FW_UPLOAD", is not adequate
> because it does not implicitly turn on FW_LOADER. Instead of adding a
> dependency, follow the convention used by drivers that require the
> FW_LOADER_USER_HELPER functionality of the firmware-loader by using
> select for both FW_LOADER and FW_UPLOAD.
> 
> Fixes: bdf86d0e6ca3 ("fpga: m10bmc-sec: create max10 bmc secure update")
> Reported-by: kernel test robot <lkp@intel.com>
> Cc: stable@vger.kernel.org
> Signed-off-by: Russ Weight <russell.h.weight@intel.com>

Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested

Thanks.

> ---
>  drivers/fpga/Kconfig | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/fpga/Kconfig b/drivers/fpga/Kconfig
> index d1a8107fdcb3..6ce143dafd04 100644
> --- a/drivers/fpga/Kconfig
> +++ b/drivers/fpga/Kconfig
> @@ -246,7 +246,9 @@ config FPGA_MGR_VERSAL_FPGA
>  
>  config FPGA_M10_BMC_SEC_UPDATE
>  	tristate "Intel MAX10 BMC Secure Update driver"
> -	depends on MFD_INTEL_M10_BMC && FW_UPLOAD
> +	depends on MFD_INTEL_M10_BMC
> +	select FW_LOADER
> +	select FW_UPLOAD
>  	help
>  	  Secure update support for the Intel MAX10 board management
>  	  controller.

-- 
~Randy

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 1/1] fpga: m10bmc-sec: Fix kconfig dependencies
  2022-11-15  1:03 ` Randy Dunlap
@ 2022-11-15 13:54   ` Xu Yilun
  0 siblings, 0 replies; 3+ messages in thread
From: Xu Yilun @ 2022-11-15 13:54 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Russ Weight, mdf, hao.wu, trix, linux-fpga, linux-kernel,
	lgoncalv, marpagan, matthew.gerlach, basheer.ahmed.muddebihal,
	tianfei.zhang, kernel test robot, stable

On 2022-11-14 at 17:03:03 -0800, Randy Dunlap wrote:
> 
> 
> On 11/14/22 16:11, Russ Weight wrote:
> > The secure update driver depends on the firmware-upload functionality of
> > the firmware-loader. The firmware-loader is carried in the firmware-class
> > driver which is enabled with the tristate CONFIG_FW_LOADER option. The
> > firmware-upload functionality is included in the firmware-class driver if
> > the bool FW_UPLOAD config is set.
> > 
> > The current dependency statement, "depends on FW_UPLOAD", is not adequate
> > because it does not implicitly turn on FW_LOADER. Instead of adding a
> > dependency, follow the convention used by drivers that require the
> > FW_LOADER_USER_HELPER functionality of the firmware-loader by using
> > select for both FW_LOADER and FW_UPLOAD.
> > 
> > Fixes: bdf86d0e6ca3 ("fpga: m10bmc-sec: create max10 bmc secure update")
> > Reported-by: kernel test robot <lkp@intel.com>
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Russ Weight <russell.h.weight@intel.com>
> 
> Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested

Acked-by: Xu Yilun <yilun.xu@intel.com>

Applied to for-6.1

> 
> Thanks.
> 
> > ---
> >  drivers/fpga/Kconfig | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/fpga/Kconfig b/drivers/fpga/Kconfig
> > index d1a8107fdcb3..6ce143dafd04 100644
> > --- a/drivers/fpga/Kconfig
> > +++ b/drivers/fpga/Kconfig
> > @@ -246,7 +246,9 @@ config FPGA_MGR_VERSAL_FPGA
> >  
> >  config FPGA_M10_BMC_SEC_UPDATE
> >  	tristate "Intel MAX10 BMC Secure Update driver"
> > -	depends on MFD_INTEL_M10_BMC && FW_UPLOAD
> > +	depends on MFD_INTEL_M10_BMC
> > +	select FW_LOADER
> > +	select FW_UPLOAD
> >  	help
> >  	  Secure update support for the Intel MAX10 board management
> >  	  controller.
> 
> -- 
> ~Randy

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-15 14:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-15  0:11 [PATCH v1 1/1] fpga: m10bmc-sec: Fix kconfig dependencies Russ Weight
2022-11-15  1:03 ` Randy Dunlap
2022-11-15 13:54   ` Xu Yilun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).