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] [day] [month] [year] [list]
Message-ID: <87fuxx7muq.fsf@kamboji.qca.qualcomm.com>
Date:	Sat, 16 Jan 2016 14:03:25 +0200
From:	Kalle Valo <kvalo@...eaurora.org>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:	Hante Meuleman <meuleman@...adcom.com>,
	"netdev\@vger.kernel.org" <netdev@...r.kernel.org>,
	linux-wireless <linux-wireless@...r.kernel.org>,
	brcm80211-dev-list@...adcom.com,
	"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: brcmfmac build failure with gcc < 4.3 due to __UNIQUE_ID() clash

Geert Uytterhoeven <geert@...ux-m68k.org> writes:

> On Wed, Jan 13, 2016 at 5:55 AM, Linux Kernel Mailing List
> <linux-kernel@...r.kernel.org> wrote:
>> Commit:     46d703a775394e4724509ff55cdda41d228c028c
>>    brcmfmac: Unify methods to define and map firmware files.
>

[...]

> This change breaks the build with gcc < 4.3:
>
>     drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:598:
> error: redefinition of ‘__UNIQUE_ID_firmware598’
>     drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:598:
> error: previous definition of ‘__UNIQUE_ID_firmware598’ was here
>     drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:599:
> error: redefinition of ‘__UNIQUE_ID_firmware600’
>     drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:599:
> error: previous definition of ‘__UNIQUE_ID_firmware600’ was here
>     ...
>
> The reason is that BRCMF_FW_NVRAM_DEF() expands to two instances of
> MODULE_FIRMWARE():
>
>> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h
>> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h
>>
>> +#define BRCMF_FW_NVRAM_DEF(fw_nvram_name, fw, nvram) \
>> +static const char BRCM_ ## fw_nvram_name ## _FIRMWARE_NAME[] = \
>> +       BRCMF_FW_DEFAULT_PATH fw; \
>> +static const char BRCM_ ## fw_nvram_name ## _NVRAM_NAME[] = \
>> +       BRCMF_FW_DEFAULT_PATH nvram; \
>> +MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH fw); \
>> +MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH nvram)
>
> When compiling using gcc < 4.3, __UNIQUE_ID() uses __LINE__ instead of
> __COUNTER__, as the latter is not available. Hence it derives a "unique" ID
> from the same source line number, causing a redefinition.

Hante, what should we do? We need to fix this build breakage ASAP.

-- 
Kalle Valo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ