From: Greg KH <gregkh@linuxfoundation.org>
To: Philippe De Muyter <phdm@macq.eu>
Cc: linuxlovemin@yonsei.ac.kr, linux-wireless@vger.kernel.org
Subject: Re: linux-stable v4.9.337 brcmfmac compilation error
Date: Wed, 19 Jul 2023 15:57:13 +0200 [thread overview]
Message-ID: <2023071917-stoning-cement-2235@gregkh> (raw)
In-Reply-To: <20230719064812.GA29927@frolo.corp.macq.eu>
On Wed, Jul 19, 2023 at 08:48:12AM +0200, Philippe De Muyter wrote:
> Hello,
>
> compilation of the brcmfmac driver in linux-4.9.y (tag v4.9.337) fails with
>
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c: In function ‘brcmf_fw_map_chip_to_name’:
> include/linux/stddef.h:7:14: error: return makes integer from pointer without a cast [-Werror=int-conversion]
> #define NULL ((void *)0)
> ^
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:577:10: note: in expansion of macro ‘NULL’
> return NULL;
> ^~~~
> cc1: all warnings being treated as errors
>
> This is caused by commit 1db036d13e10809943c2dce553e2fa7fc9c6cd80
> wifi: brcmfmac: Fix potential shift-out-of-bounds in brcmf_fw_alloc_request()
>
> [ Upstream commit 81d17f6f3331f03c8eafdacea68ab773426c1e3c ]
>
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
> index 33a7378..6675de1 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
> @@ -572,6 +572,11 @@ int brcmf_fw_map_chip_to_name(u32 chip, u32 chiprev,
> u32 i;
> char end;
>
> + if (chiprev >= BITS_PER_TYPE(u32)) {
> + brcmf_err("Invalid chip revision %u\n", chiprev);
> + return NULL;
> + }
> +
> for (i = 0; i < table_size; i++) {
> if (mapping_table[i].chipid == chip &&
> mapping_table[i].revmask & BIT(chiprev))
>
> The problem is that in the upstream commit, the patch is applied to
> brcmf_fw_alloc_request(), which returns a pointer, while in v4.9.337
> it is applied to brcmf_fw_map_chip_to_name() which returns 'int'.
>
> Should we simply revert that patch, or rather add the missing
> intermediate patches ?
4.9.y is long end-of-life and not accepting any more patches. Please
work with your kernel vendor to not be using it anymore as it is
obsolete and known to have unfixed security issues.
sorry,
greg k-h
prev parent reply other threads:[~2023-07-19 13:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-19 6:48 linux-stable v4.9.337 brcmfmac compilation error Philippe De Muyter
2023-07-19 13:57 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2023071917-stoning-cement-2235@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linuxlovemin@yonsei.ac.kr \
--cc=phdm@macq.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).