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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 21 Nov 2012 00:01:40 +0800
From:	Ming Lei <tom.leiming@...il.com>
To:	Solomon Peachy <pizza@...ftnet.org>
Cc:	linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] [firmware_class] Fix compile with no builtin firmware

On Tue, Nov 20, 2012 at 10:45 PM, Solomon Peachy <pizza@...ftnet.org> wrote:
> When compiling the firmware loader, the builtin firmware functions were
> erroneously compiled as they were wrapped with CONFIG_FW_LOADER instead
> of CONFIG_FIRMWARE_IN_KERNEL.  This is normally harmless, except when
> there was actually no firmware to compile into the kernel, causing the
> build to fail with a linking error:
>
> drivers/built-in.o: In function `release_firmware':
> (.text+0x192e2): undefined reference to `__end_builtin_fw'
> drivers/built-in.o: In function `release_firmware':
> (.text+0x19304): undefined reference to `__end_builtin_fw'
> drivers/built-in.o: In function `_request_firmware':
> firmware_class.c:(.text+0x1986c): undefined reference to `__end_builtin_fw'
> firmware_class.c:(.text+0x19886): undefined reference to `__end_builtin_fw'
> firmware_class.c:(.text+0x19a98): undefined reference to `__end_builtin_fw'
> drivers/built-in.o: In function `release_firmware':
> (.text+0x192dc): undefined reference to `__start_builtin_fw'
> drivers/built-in.o: In function `_request_firmware':
> firmware_class.c:(.text+0x19860): undefined reference to `__start_builtin_fw'
> firmware_class.c:(.text+0x19a8a): undefined reference to `__start_builtin_fw'

I have tried to reproduce the compile failure but not succeed, could you share
your .config?

>
> This trivial patch fixes this oversight.
>
> Signed-off-by: Solomon Peachy <pizza@...ftnet.org>
> CC: stable@...r.kernel.org
> ---
>  drivers/base/firmware_class.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
> index 8945f4e..3474e7f 100644
> --- a/drivers/base/firmware_class.c
> +++ b/drivers/base/firmware_class.c
> @@ -38,7 +38,7 @@ MODULE_LICENSE("GPL");
>
>  /* Builtin firmware support */
>
> -#ifdef CONFIG_FW_LOADER
> +#ifdef CONFIG_FIRMWARE_IN_KERNEL

This might not be correct when EXTRA_FIRMWARE is set and
CONFIG_FIRMWARE_IN_KERNEL is unset.

Thanks,
-- 
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ