linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] firmware_loader: export sysctl registration
@ 2021-11-30 16:45 Luis Chamberlain
  2021-11-30 22:59 ` Randy Dunlap
  2021-12-01  7:08 ` Greg KH
  0 siblings, 2 replies; 6+ messages in thread
From: Luis Chamberlain @ 2021-11-30 16:45 UTC (permalink / raw)
  To: akpm, keescook, yzaikin, nixiaoming, ebiederm, steve, gregkh,
	rafael, tytso, viro, pmladek, senozhatsky, rostedt, john.ogness,
	dgilbert, jejb, martin.petersen, mcgrof, mcgrof, linux-scsi
  Cc: linux-fsdevel, linux-kernel, Randy Dunlap

The firmware loader fallback sysctl table is always built-in,
but when FW_LOADER=m the build will fail. We need to export
the sysctl registration and de-registration. Use the private
symbol namespace so that only the firmware loader uses these
calls.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Fixes: firmware_loader: move firmware sysctl to its own files
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 drivers/base/firmware_loader/fallback_table.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/base/firmware_loader/fallback_table.c b/drivers/base/firmware_loader/fallback_table.c
index 51751c46cdcf..255823887c70 100644
--- a/drivers/base/firmware_loader/fallback_table.c
+++ b/drivers/base/firmware_loader/fallback_table.c
@@ -56,10 +56,12 @@ int register_firmware_config_sysctl(void)
 		return -ENOMEM;
 	return 0;
 }
+EXPORT_SYMBOL_NS_GPL(register_firmware_config_sysctl, FIRMWARE_LOADER_PRIVATE);
 
 void unregister_firmware_config_sysctl(void)
 {
 	unregister_sysctl_table(firmware_config_sysct_table_header);
 	firmware_config_sysct_table_header = NULL;
 }
+EXPORT_SYMBOL_NS_GPL(unregister_firmware_config_sysctl, FIRMWARE_LOADER_PRIVATE);
 #endif /* CONFIG_SYSCTL */
-- 
2.33.0


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

* Re: [PATCH] firmware_loader: export sysctl registration
  2021-11-30 16:45 [PATCH] firmware_loader: export sysctl registration Luis Chamberlain
@ 2021-11-30 22:59 ` Randy Dunlap
  2021-12-01  7:08 ` Greg KH
  1 sibling, 0 replies; 6+ messages in thread
From: Randy Dunlap @ 2021-11-30 22:59 UTC (permalink / raw)
  To: Luis Chamberlain, akpm, keescook, yzaikin, nixiaoming, ebiederm,
	steve, gregkh, rafael, tytso, viro, pmladek, senozhatsky,
	rostedt, john.ogness, dgilbert, jejb, martin.petersen, mcgrof,
	linux-scsi
  Cc: linux-fsdevel, linux-kernel



On 11/30/21 08:45, Luis Chamberlain wrote:
> The firmware loader fallback sysctl table is always built-in,
> but when FW_LOADER=m the build will fail. We need to export
> the sysctl registration and de-registration. Use the private
> symbol namespace so that only the firmware loader uses these
> calls.
> 
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Fixes: firmware_loader: move firmware sysctl to its own files
> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>

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

Thanks.

> ---
>  drivers/base/firmware_loader/fallback_table.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/base/firmware_loader/fallback_table.c b/drivers/base/firmware_loader/fallback_table.c
> index 51751c46cdcf..255823887c70 100644
> --- a/drivers/base/firmware_loader/fallback_table.c
> +++ b/drivers/base/firmware_loader/fallback_table.c
> @@ -56,10 +56,12 @@ int register_firmware_config_sysctl(void)
>  		return -ENOMEM;
>  	return 0;
>  }
> +EXPORT_SYMBOL_NS_GPL(register_firmware_config_sysctl, FIRMWARE_LOADER_PRIVATE);
>  
>  void unregister_firmware_config_sysctl(void)
>  {
>  	unregister_sysctl_table(firmware_config_sysct_table_header);
>  	firmware_config_sysct_table_header = NULL;
>  }
> +EXPORT_SYMBOL_NS_GPL(unregister_firmware_config_sysctl, FIRMWARE_LOADER_PRIVATE);
>  #endif /* CONFIG_SYSCTL */
> 

-- 
~Randy

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

* Re: [PATCH] firmware_loader: export sysctl registration
  2021-11-30 16:45 [PATCH] firmware_loader: export sysctl registration Luis Chamberlain
  2021-11-30 22:59 ` Randy Dunlap
@ 2021-12-01  7:08 ` Greg KH
  2021-12-01 13:48   ` Luis Chamberlain
  1 sibling, 1 reply; 6+ messages in thread
From: Greg KH @ 2021-12-01  7:08 UTC (permalink / raw)
  To: Luis Chamberlain
  Cc: akpm, keescook, yzaikin, nixiaoming, ebiederm, steve, rafael,
	tytso, viro, pmladek, senozhatsky, rostedt, john.ogness,
	dgilbert, jejb, martin.petersen, mcgrof, linux-scsi,
	linux-fsdevel, linux-kernel, Randy Dunlap

On Tue, Nov 30, 2021 at 08:45:25AM -0800, Luis Chamberlain wrote:
> The firmware loader fallback sysctl table is always built-in,
> but when FW_LOADER=m the build will fail. We need to export
> the sysctl registration and de-registration. Use the private
> symbol namespace so that only the firmware loader uses these
> calls.
> 
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Fixes: firmware_loader: move firmware sysctl to its own files

Have a git id for this?

thanks,

greg k-h

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

* Re: [PATCH] firmware_loader: export sysctl registration
  2021-12-01  7:08 ` Greg KH
@ 2021-12-01 13:48   ` Luis Chamberlain
  2021-12-01 14:20     ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Luis Chamberlain @ 2021-12-01 13:48 UTC (permalink / raw)
  To: Greg KH
  Cc: akpm, keescook, yzaikin, nixiaoming, ebiederm, steve, rafael,
	tytso, viro, pmladek, senozhatsky, rostedt, john.ogness,
	dgilbert, jejb, martin.petersen, linux-scsi, linux-fsdevel,
	linux-kernel, Randy Dunlap

On Wed, Dec 01, 2021 at 08:08:00AM +0100, Greg KH wrote:
> On Tue, Nov 30, 2021 at 08:45:25AM -0800, Luis Chamberlain wrote:
> > The firmware loader fallback sysctl table is always built-in,
> > but when FW_LOADER=m the build will fail. We need to export
> > the sysctl registration and de-registration. Use the private
> > symbol namespace so that only the firmware loader uses these
> > calls.
> > 
> > Reported-by: Randy Dunlap <rdunlap@infradead.org>
> > Fixes: firmware_loader: move firmware sysctl to its own files
> 
> Have a git id for this?

I thought it would be ephemeral at this point since it was on
linux-next, so had not provided one. If it is a static commit
then I suppose this is 5cc0fea09ee52c9bcb6c41456bea03ca1b49602d

  Luis

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

* Re: [PATCH] firmware_loader: export sysctl registration
  2021-12-01 13:48   ` Luis Chamberlain
@ 2021-12-01 14:20     ` Greg KH
  2021-12-01 14:25       ` Luis Chamberlain
  0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2021-12-01 14:20 UTC (permalink / raw)
  To: Luis Chamberlain
  Cc: akpm, keescook, yzaikin, nixiaoming, ebiederm, steve, rafael,
	tytso, viro, pmladek, senozhatsky, rostedt, john.ogness,
	dgilbert, jejb, martin.petersen, linux-scsi, linux-fsdevel,
	linux-kernel, Randy Dunlap

On Wed, Dec 01, 2021 at 05:48:18AM -0800, Luis Chamberlain wrote:
> On Wed, Dec 01, 2021 at 08:08:00AM +0100, Greg KH wrote:
> > On Tue, Nov 30, 2021 at 08:45:25AM -0800, Luis Chamberlain wrote:
> > > The firmware loader fallback sysctl table is always built-in,
> > > but when FW_LOADER=m the build will fail. We need to export
> > > the sysctl registration and de-registration. Use the private
> > > symbol namespace so that only the firmware loader uses these
> > > calls.
> > > 
> > > Reported-by: Randy Dunlap <rdunlap@infradead.org>
> > > Fixes: firmware_loader: move firmware sysctl to its own files
> > 
> > Have a git id for this?
> 
> I thought it would be ephemeral at this point since it was on
> linux-next, so had not provided one. If it is a static commit
> then I suppose this is 5cc0fea09ee52c9bcb6c41456bea03ca1b49602d

Depends on where it came from.  If -mm then yes, it's not a valid id.
If someone else, it might be a real id.

thanks,

greg k-h

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

* Re: [PATCH] firmware_loader: export sysctl registration
  2021-12-01 14:20     ` Greg KH
@ 2021-12-01 14:25       ` Luis Chamberlain
  0 siblings, 0 replies; 6+ messages in thread
From: Luis Chamberlain @ 2021-12-01 14:25 UTC (permalink / raw)
  To: Greg KH
  Cc: akpm, keescook, yzaikin, nixiaoming, ebiederm, steve, rafael,
	tytso, viro, pmladek, senozhatsky, rostedt, john.ogness,
	dgilbert, jejb, martin.petersen, linux-scsi, linux-fsdevel,
	linux-kernel, Randy Dunlap

On Wed, Dec 01, 2021 at 03:20:28PM +0100, Greg KH wrote:
> On Wed, Dec 01, 2021 at 05:48:18AM -0800, Luis Chamberlain wrote:
> > On Wed, Dec 01, 2021 at 08:08:00AM +0100, Greg KH wrote:
> > > On Tue, Nov 30, 2021 at 08:45:25AM -0800, Luis Chamberlain wrote:
> > > > The firmware loader fallback sysctl table is always built-in,
> > > > but when FW_LOADER=m the build will fail. We need to export
> > > > the sysctl registration and de-registration. Use the private
> > > > symbol namespace so that only the firmware loader uses these
> > > > calls.
> > > > 
> > > > Reported-by: Randy Dunlap <rdunlap@infradead.org>
> > > > Fixes: firmware_loader: move firmware sysctl to its own files
> > > 
> > > Have a git id for this?
> > 
> > I thought it would be ephemeral at this point since it was on
> > linux-next, so had not provided one. If it is a static commit
> > then I suppose this is 5cc0fea09ee52c9bcb6c41456bea03ca1b49602d
> 
> Depends on where it came from.  If -mm then yes, it's not a valid id.
> If someone else, it might be a real id.

It came in through -mm.

  Luis

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

end of thread, other threads:[~2021-12-01 14:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-30 16:45 [PATCH] firmware_loader: export sysctl registration Luis Chamberlain
2021-11-30 22:59 ` Randy Dunlap
2021-12-01  7:08 ` Greg KH
2021-12-01 13:48   ` Luis Chamberlain
2021-12-01 14:20     ` Greg KH
2021-12-01 14:25       ` Luis Chamberlain

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).