linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] firmware_loader: fix build without sysctl
@ 2019-05-31  1:26 Matteo Croce
  2019-05-31  1:32 ` Stephen Rothwell
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Matteo Croce @ 2019-05-31  1:26 UTC (permalink / raw)
  To: Stephen Rothwell, Randy Dunlap, Linux Next Mailing List
  Cc: Luis Chamberlain, Greg Kroah-Hartman, linux-kernel

firmware_config_table has references to the sysctl code which
triggers a build failure when CONFIG_PROC_SYSCTL is not set:

    ld: drivers/base/firmware_loader/fallback_table.o:(.data+0x30): undefined reference to `sysctl_vals'
    ld: drivers/base/firmware_loader/fallback_table.o:(.data+0x38): undefined reference to `sysctl_vals'
    ld: drivers/base/firmware_loader/fallback_table.o:(.data+0x70): undefined reference to `sysctl_vals'
    ld: drivers/base/firmware_loader/fallback_table.o:(.data+0x78): undefined reference to `sysctl_vals'

Put the firmware_config_table struct under #ifdef CONFIG_PROC_SYSCTL.

Fixes: 6a33853c5773 ("proc/sysctl: add shared variables for range check")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Matteo Croce <mcroce@redhat.com>
---
 drivers/base/firmware_loader/fallback_table.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/base/firmware_loader/fallback_table.c b/drivers/base/firmware_loader/fallback_table.c
index 58d4a1263480..18d646777fb9 100644
--- a/drivers/base/firmware_loader/fallback_table.c
+++ b/drivers/base/firmware_loader/fallback_table.c
@@ -23,6 +23,8 @@ struct firmware_fallback_config fw_fallback_config = {
 };
 EXPORT_SYMBOL_GPL(fw_fallback_config);
 
+#ifdef CONFIG_PROC_SYSCTL
+
 struct ctl_table firmware_config_table[] = {
 	{
 		.procname	= "force_sysfs_fallback",
@@ -45,3 +47,5 @@ struct ctl_table firmware_config_table[] = {
 	{ }
 };
 EXPORT_SYMBOL_GPL(firmware_config_table);
+
+#endif
-- 
2.21.0

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

* Re: [PATCH] firmware_loader: fix build without sysctl
  2019-05-31  1:26 [PATCH] firmware_loader: fix build without sysctl Matteo Croce
@ 2019-05-31  1:32 ` Stephen Rothwell
  2019-05-31  1:37 ` Stephen Rothwell
  2019-05-31  2:15 ` Randy Dunlap
  2 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2019-05-31  1:32 UTC (permalink / raw)
  To: Matteo Croce
  Cc: Randy Dunlap, Linux Next Mailing List, Luis Chamberlain,
	Greg Kroah-Hartman, linux-kernel, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 1826 bytes --]

Hi all,

[Just cc'ing Andrew who is currently carrying the patch that this fixes.]

On Fri, 31 May 2019 03:26:49 +0200 Matteo Croce <mcroce@redhat.com> wrote:
>
> firmware_config_table has references to the sysctl code which
> triggers a build failure when CONFIG_PROC_SYSCTL is not set:
> 
>     ld: drivers/base/firmware_loader/fallback_table.o:(.data+0x30): undefined reference to `sysctl_vals'
>     ld: drivers/base/firmware_loader/fallback_table.o:(.data+0x38): undefined reference to `sysctl_vals'
>     ld: drivers/base/firmware_loader/fallback_table.o:(.data+0x70): undefined reference to `sysctl_vals'
>     ld: drivers/base/firmware_loader/fallback_table.o:(.data+0x78): undefined reference to `sysctl_vals'
> 
> Put the firmware_config_table struct under #ifdef CONFIG_PROC_SYSCTL.
> 
> Fixes: 6a33853c5773 ("proc/sysctl: add shared variables for range check")
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Matteo Croce <mcroce@redhat.com>
> ---
>  drivers/base/firmware_loader/fallback_table.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/base/firmware_loader/fallback_table.c b/drivers/base/firmware_loader/fallback_table.c
> index 58d4a1263480..18d646777fb9 100644
> --- a/drivers/base/firmware_loader/fallback_table.c
> +++ b/drivers/base/firmware_loader/fallback_table.c
> @@ -23,6 +23,8 @@ struct firmware_fallback_config fw_fallback_config = {
>  };
>  EXPORT_SYMBOL_GPL(fw_fallback_config);
>  
> +#ifdef CONFIG_PROC_SYSCTL
> +
>  struct ctl_table firmware_config_table[] = {
>  	{
>  		.procname	= "force_sysfs_fallback",
> @@ -45,3 +47,5 @@ struct ctl_table firmware_config_table[] = {
>  	{ }
>  };
>  EXPORT_SYMBOL_GPL(firmware_config_table);
> +
> +#endif
> -- 
> 2.21.0
> 

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] firmware_loader: fix build without sysctl
  2019-05-31  1:26 [PATCH] firmware_loader: fix build without sysctl Matteo Croce
  2019-05-31  1:32 ` Stephen Rothwell
@ 2019-05-31  1:37 ` Stephen Rothwell
  2019-05-31  2:15 ` Randy Dunlap
  2 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2019-05-31  1:37 UTC (permalink / raw)
  To: Matteo Croce
  Cc: Randy Dunlap, Linux Next Mailing List, Luis Chamberlain,
	Greg Kroah-Hartman, linux-kernel, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 993 bytes --]

Hi all,

On Fri, 31 May 2019 03:26:49 +0200 Matteo Croce <mcroce@redhat.com> wrote:
>
> firmware_config_table has references to the sysctl code which
> triggers a build failure when CONFIG_PROC_SYSCTL is not set:
> 
>     ld: drivers/base/firmware_loader/fallback_table.o:(.data+0x30): undefined reference to `sysctl_vals'
>     ld: drivers/base/firmware_loader/fallback_table.o:(.data+0x38): undefined reference to `sysctl_vals'
>     ld: drivers/base/firmware_loader/fallback_table.o:(.data+0x70): undefined reference to `sysctl_vals'
>     ld: drivers/base/firmware_loader/fallback_table.o:(.data+0x78): undefined reference to `sysctl_vals'
> 
> Put the firmware_config_table struct under #ifdef CONFIG_PROC_SYSCTL.
> 
> Fixes: 6a33853c5773 ("proc/sysctl: add shared variables for range check")
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Matteo Croce <mcroce@redhat.com>

I have added this to linux-next today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] firmware_loader: fix build without sysctl
  2019-05-31  1:26 [PATCH] firmware_loader: fix build without sysctl Matteo Croce
  2019-05-31  1:32 ` Stephen Rothwell
  2019-05-31  1:37 ` Stephen Rothwell
@ 2019-05-31  2:15 ` Randy Dunlap
  2019-05-31  9:12   ` Matteo Croce
  2 siblings, 1 reply; 6+ messages in thread
From: Randy Dunlap @ 2019-05-31  2:15 UTC (permalink / raw)
  To: Matteo Croce, Stephen Rothwell, Linux Next Mailing List
  Cc: Luis Chamberlain, Greg Kroah-Hartman, linux-kernel

On 5/30/19 6:26 PM, Matteo Croce wrote:
> firmware_config_table has references to the sysctl code which
> triggers a build failure when CONFIG_PROC_SYSCTL is not set:
> 
>     ld: drivers/base/firmware_loader/fallback_table.o:(.data+0x30): undefined reference to `sysctl_vals'
>     ld: drivers/base/firmware_loader/fallback_table.o:(.data+0x38): undefined reference to `sysctl_vals'
>     ld: drivers/base/firmware_loader/fallback_table.o:(.data+0x70): undefined reference to `sysctl_vals'
>     ld: drivers/base/firmware_loader/fallback_table.o:(.data+0x78): undefined reference to `sysctl_vals'
> 
> Put the firmware_config_table struct under #ifdef CONFIG_PROC_SYSCTL.
> 
> Fixes: 6a33853c5773 ("proc/sysctl: add shared variables for range check")
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Matteo Croce <mcroce@redhat.com>

Works for me.

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

Thanks.

> ---
>  drivers/base/firmware_loader/fallback_table.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/base/firmware_loader/fallback_table.c b/drivers/base/firmware_loader/fallback_table.c
> index 58d4a1263480..18d646777fb9 100644
> --- a/drivers/base/firmware_loader/fallback_table.c
> +++ b/drivers/base/firmware_loader/fallback_table.c
> @@ -23,6 +23,8 @@ struct firmware_fallback_config fw_fallback_config = {
>  };
>  EXPORT_SYMBOL_GPL(fw_fallback_config);
>  
> +#ifdef CONFIG_PROC_SYSCTL
> +
>  struct ctl_table firmware_config_table[] = {
>  	{
>  		.procname	= "force_sysfs_fallback",
> @@ -45,3 +47,5 @@ struct ctl_table firmware_config_table[] = {
>  	{ }
>  };
>  EXPORT_SYMBOL_GPL(firmware_config_table);
> +
> +#endif
> 


-- 
~Randy

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

* Re: [PATCH] firmware_loader: fix build without sysctl
  2019-05-31  2:15 ` Randy Dunlap
@ 2019-05-31  9:12   ` Matteo Croce
  2019-06-01  2:14     ` Stephen Rothwell
  0 siblings, 1 reply; 6+ messages in thread
From: Matteo Croce @ 2019-05-31  9:12 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Stephen Rothwell, Linux Next Mailing List, Luis Chamberlain,
	Greg Kroah-Hartman, LKML

On Fri, May 31, 2019 at 4:15 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> On 5/30/19 6:26 PM, Matteo Croce wrote:
> > firmware_config_table has references to the sysctl code which
> > triggers a build failure when CONFIG_PROC_SYSCTL is not set:
> >
> >     ld: drivers/base/firmware_loader/fallback_table.o:(.data+0x30): undefined reference to `sysctl_vals'
> >     ld: drivers/base/firmware_loader/fallback_table.o:(.data+0x38): undefined reference to `sysctl_vals'
> >     ld: drivers/base/firmware_loader/fallback_table.o:(.data+0x70): undefined reference to `sysctl_vals'
> >     ld: drivers/base/firmware_loader/fallback_table.o:(.data+0x78): undefined reference to `sysctl_vals'
> >
> > Put the firmware_config_table struct under #ifdef CONFIG_PROC_SYSCTL.
> >
> > Fixes: 6a33853c5773 ("proc/sysctl: add shared variables for range check")
> > Reported-by: Randy Dunlap <rdunlap@infradead.org>
> > Signed-off-by: Matteo Croce <mcroce@redhat.com>
>
> Works for me.
>
> Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
>
> Thanks.
>
> > ---
> >  drivers/base/firmware_loader/fallback_table.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/base/firmware_loader/fallback_table.c b/drivers/base/firmware_loader/fallback_table.c
> > index 58d4a1263480..18d646777fb9 100644
> > --- a/drivers/base/firmware_loader/fallback_table.c
> > +++ b/drivers/base/firmware_loader/fallback_table.c
> > @@ -23,6 +23,8 @@ struct firmware_fallback_config fw_fallback_config = {
> >  };
> >  EXPORT_SYMBOL_GPL(fw_fallback_config);
> >
> > +#ifdef CONFIG_PROC_SYSCTL
> > +
> >  struct ctl_table firmware_config_table[] = {
> >       {
> >               .procname       = "force_sysfs_fallback",
> > @@ -45,3 +47,5 @@ struct ctl_table firmware_config_table[] = {
> >       { }
> >  };
> >  EXPORT_SYMBOL_GPL(firmware_config_table);
> > +
> > +#endif
> >
>
>
> --
> ~Randy

Hi,

please correct the Fixes tag if possible.
It seems that the hash of the offending commit now is d91bff3011cf

Regards,
-- 
Matteo Croce
per aspera ad upstream

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

* Re: [PATCH] firmware_loader: fix build without sysctl
  2019-05-31  9:12   ` Matteo Croce
@ 2019-06-01  2:14     ` Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2019-06-01  2:14 UTC (permalink / raw)
  To: Matteo Croce
  Cc: Randy Dunlap, Linux Next Mailing List, Luis Chamberlain,
	Greg Kroah-Hartman, LKML, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 435 bytes --]

Hi Matteo,

On Fri, 31 May 2019 11:12:39 +0200 Matteo Croce <mcroce@redhat.com> wrote:
>
> please correct the Fixes tag if possible.
> It seems that the hash of the offending commit now is d91bff3011cf

Unfortunately, these hashes will keep changing for things in Andrew's
patch queue until they are sent to Linus.  In the end Andrew will
probably just squash this fix into the original patch.


Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2019-06-01  2:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-31  1:26 [PATCH] firmware_loader: fix build without sysctl Matteo Croce
2019-05-31  1:32 ` Stephen Rothwell
2019-05-31  1:37 ` Stephen Rothwell
2019-05-31  2:15 ` Randy Dunlap
2019-05-31  9:12   ` Matteo Croce
2019-06-01  2:14     ` Stephen Rothwell

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