2022-04-06 08:54:29

by Arend Van Spriel

[permalink] [raw]
Subject: Re: [RESEND PATCH 06/11] brcmfmac: sdio: Fix undefined behavior due to shift overflowing the constant

On 4/5/2022 6:55 PM, Borislav Petkov wrote:
> Fix:
>
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c: In function ‘brcmf_sdio_drivestrengthinit’:
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:3798:2: error: case label does not reduce to an integer constant
> case SDIOD_DRVSTR_KEY(BRCM_CC_43143_CHIP_ID, 17):
> ^~~~
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:3809:2: error: case label does not reduce to an integer constant
> case SDIOD_DRVSTR_KEY(BRCM_CC_43362_CHIP_ID, 13):
> ^~~~
>
> See https://lore.kernel.org/r/YkwQ6%[email protected] for the gory
> details as to why it triggers with older gccs only.

The details aren't that gory ;-)

Acked-by: Arend van Spriel <[email protected]>
> Signed-off-by: Borislav Petkov <[email protected]>
> Cc: Arend van Spriel <[email protected]>
> Cc: Franky Lin <[email protected]>
> Cc: Hante Meuleman <[email protected]>
> Cc: Kalle Valo <[email protected]>
> Cc: "David S. Miller" <[email protected]>
> Cc: Jakub Kicinski <[email protected]>
> Cc: [email protected]
> Cc: [email protected]


Attachments:
smime.p7s (4.12 kB)
S/MIME Cryptographic Signature