netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 03/11] bnx2x: Fix undefined behavior due to shift overflowing the constant
       [not found] <20220405151517.29753-1-bp@alien8.de>
@ 2022-04-05 15:15 ` Borislav Petkov
  2022-04-05 19:53   ` Jakub Kicinski
  2022-04-05 15:15 ` [PATCH 06/11] brcmfmac: sdio: " Borislav Petkov
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 17+ messages in thread
From: Borislav Petkov @ 2022-04-05 15:15 UTC (permalink / raw)
  To: LKML
  Cc: Ariel Elior, Sudarsana Kalluru, Manish Chopra, David S. Miller,
	Jakub Kicinski, Paolo Abeni, netdev

From: Borislav Petkov <bp@suse.de>

Fix:

  drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c: In function ‘bnx2x_check_blocks_with_parity3’:
  drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:4917:4: error: case label does not reduce to an integer constant
      case AEU_INPUTS_ATTN_BITS_MCP_LATCHED_SCPAD_PARITY:
      ^~~~

See https://lore.kernel.org/r/YkwQ6%2BtIH8GQpuct@zn.tnic for the gory
details as to why it triggers with older gccs only.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Ariel Elior <aelior@marvell.com>
Cc: Sudarsana Kalluru <skalluru@marvell.com>
Cc: Manish Chopra <manishc@marvell.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h
index 5caa75b41b73..881ac33fe914 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h
@@ -6218,7 +6218,7 @@
 #define AEU_INPUTS_ATTN_BITS_GPIO0_FUNCTION_0			 (0x1<<2)
 #define AEU_INPUTS_ATTN_BITS_IGU_PARITY_ERROR			 (0x1<<12)
 #define AEU_INPUTS_ATTN_BITS_MCP_LATCHED_ROM_PARITY		 (0x1<<28)
-#define AEU_INPUTS_ATTN_BITS_MCP_LATCHED_SCPAD_PARITY		 (0x1<<31)
+#define AEU_INPUTS_ATTN_BITS_MCP_LATCHED_SCPAD_PARITY		 (0x1U<<31)
 #define AEU_INPUTS_ATTN_BITS_MCP_LATCHED_UMP_RX_PARITY		 (0x1<<29)
 #define AEU_INPUTS_ATTN_BITS_MCP_LATCHED_UMP_TX_PARITY		 (0x1<<30)
 #define AEU_INPUTS_ATTN_BITS_MISC_HW_INTERRUPT			 (0x1<<15)
-- 
2.35.1


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

* [PATCH 06/11] brcmfmac: sdio: Fix undefined behavior due to shift overflowing the constant
       [not found] <20220405151517.29753-1-bp@alien8.de>
  2022-04-05 15:15 ` [PATCH 03/11] bnx2x: Fix undefined behavior due to shift overflowing the constant Borislav Petkov
@ 2022-04-05 15:15 ` Borislav Petkov
  2022-04-05 15:25   ` Kalle Valo
  2022-04-05 15:15 ` [PATCH 08/11] mt76: " Borislav Petkov
  2022-04-05 15:15 ` [PATCH 10/11] IB/mlx5: " Borislav Petkov
  3 siblings, 1 reply; 17+ messages in thread
From: Borislav Petkov @ 2022-04-05 15:15 UTC (permalink / raw)
  To: LKML
  Cc: Arend van Spriel, Franky Lin, Hante Meuleman, Kalle Valo,
	David S. Miller, Jakub Kicinski, brcm80211-dev-list.pdl, netdev

From: Borislav Petkov <bp@suse.de>

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%2BtIH8GQpuct@zn.tnic for the gory
details as to why it triggers with older gccs only.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arend van Spriel <aspriel@gmail.com>
Cc: Franky Lin <franky.lin@broadcom.com>
Cc: Hante Meuleman <hante.meuleman@broadcom.com>
Cc: Kalle Valo <kvalo@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: brcm80211-dev-list.pdl@broadcom.com
Cc: netdev@vger.kernel.org
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
index ba3c159111d3..d78ccc223709 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -557,7 +557,7 @@ enum brcmf_sdio_frmtype {
 	BRCMF_SDIO_FT_SUB,
 };
 
-#define SDIOD_DRVSTR_KEY(chip, pmu)     (((chip) << 16) | (pmu))
+#define SDIOD_DRVSTR_KEY(chip, pmu)     (((unsigned int)(chip) << 16) | (pmu))
 
 /* SDIO Pad drive strength to select value mappings */
 struct sdiod_drive_str {
-- 
2.35.1


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

* [PATCH 08/11] mt76: Fix undefined behavior due to shift overflowing the constant
       [not found] <20220405151517.29753-1-bp@alien8.de>
  2022-04-05 15:15 ` [PATCH 03/11] bnx2x: Fix undefined behavior due to shift overflowing the constant Borislav Petkov
  2022-04-05 15:15 ` [PATCH 06/11] brcmfmac: sdio: " Borislav Petkov
@ 2022-04-05 15:15 ` Borislav Petkov
  2022-04-06  5:43   ` Kalle Valo
  2022-04-10 12:20   ` Kalle Valo
  2022-04-05 15:15 ` [PATCH 10/11] IB/mlx5: " Borislav Petkov
  3 siblings, 2 replies; 17+ messages in thread
From: Borislav Petkov @ 2022-04-05 15:15 UTC (permalink / raw)
  To: LKML
  Cc: Felix Fietkau, Lorenzo Bianconi, Ryder Lee, Shayne Chen,
	Sean Wang, Kalle Valo, David S. Miller, Jakub Kicinski,
	linux-wireless, netdev

From: Borislav Petkov <bp@suse.de>

Fix:

  drivers/net/wireless/mediatek/mt76/mt76x2/pci.c: In function ‘mt76x2e_probe’:
  ././include/linux/compiler_types.h:352:38: error: call to ‘__compiletime_assert_946’ \
	declared with attribute error: FIELD_PREP: mask is not constant
    _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)

See https://lore.kernel.org/r/YkwQ6%2BtIH8GQpuct@zn.tnic for the gory
details as to why it triggers with older gccs only.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Felix Fietkau <nbd@nbd.name>
Cc: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Cc: Ryder Lee <ryder.lee@mediatek.com>
Cc: Shayne Chen <shayne.chen@mediatek.com>
Cc: Sean Wang <sean.wang@mediatek.com>
Cc: Kalle Valo <kvalo@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
---
 drivers/net/wireless/mediatek/mt76/mt76x2/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/pci.c b/drivers/net/wireless/mediatek/mt76/mt76x2/pci.c
index 8a22ee581674..df85ebc6e1df 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2/pci.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2/pci.c
@@ -80,7 +80,7 @@ mt76x2e_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	mt76_rmw_field(dev, 0x15a10, 0x1f << 16, 0x9);
 
 	/* RG_SSUSB_G1_CDR_BIC_LTR = 0xf */
-	mt76_rmw_field(dev, 0x15a0c, 0xf << 28, 0xf);
+	mt76_rmw_field(dev, 0x15a0c, 0xfU << 28, 0xf);
 
 	/* RG_SSUSB_CDR_BR_PE1D = 0x3 */
 	mt76_rmw_field(dev, 0x15c58, 0x3 << 6, 0x3);
-- 
2.35.1


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

* [PATCH 10/11] IB/mlx5: Fix undefined behavior due to shift overflowing the constant
       [not found] <20220405151517.29753-1-bp@alien8.de>
                   ` (2 preceding siblings ...)
  2022-04-05 15:15 ` [PATCH 08/11] mt76: " Borislav Petkov
@ 2022-04-05 15:15 ` Borislav Petkov
  2022-04-05 18:31   ` Leon Romanovsky
  2022-04-06  7:17   ` Leon Romanovsky
  3 siblings, 2 replies; 17+ messages in thread
From: Borislav Petkov @ 2022-04-05 15:15 UTC (permalink / raw)
  To: LKML; +Cc: Leon Romanovsky, Saeed Mahameed, linux-rdma, netdev

From: Borislav Petkov <bp@suse.de>

Fix:

  drivers/infiniband/hw/mlx5/main.c: In function ‘translate_eth_legacy_proto_oper’:
  drivers/infiniband/hw/mlx5/main.c:370:2: error: case label does not reduce to an integer constant
    case MLX5E_PROT_MASK(MLX5E_50GBASE_KR2):
    ^~~~

See https://lore.kernel.org/r/YkwQ6%2BtIH8GQpuct@zn.tnic for the gory
details as to why it triggers with older gccs only.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Leon Romanovsky <leon@kernel.org>
Cc: Saeed Mahameed <saeedm@nvidia.com>
Cc: linux-rdma@vger.kernel.org
Cc: netdev@vger.kernel.org
---
 include/linux/mlx5/port.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/mlx5/port.h b/include/linux/mlx5/port.h
index 28a928b0684b..e96ee1e348cb 100644
--- a/include/linux/mlx5/port.h
+++ b/include/linux/mlx5/port.h
@@ -141,7 +141,7 @@ enum mlx5_ptys_width {
 	MLX5_PTYS_WIDTH_12X	= 1 << 4,
 };
 
-#define MLX5E_PROT_MASK(link_mode) (1 << link_mode)
+#define MLX5E_PROT_MASK(link_mode) (1U << link_mode)
 #define MLX5_GET_ETH_PROTO(reg, out, ext, field)	\
 	(ext ? MLX5_GET(reg, out, ext_##field) :	\
 	MLX5_GET(reg, out, field))
-- 
2.35.1


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

* Re: [PATCH 06/11] brcmfmac: sdio: Fix undefined behavior due to shift overflowing the constant
  2022-04-05 15:15 ` [PATCH 06/11] brcmfmac: sdio: " Borislav Petkov
@ 2022-04-05 15:25   ` Kalle Valo
  2022-04-05 16:06     ` Borislav Petkov
  0 siblings, 1 reply; 17+ messages in thread
From: Kalle Valo @ 2022-04-05 15:25 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: LKML, Arend van Spriel, Franky Lin, Hante Meuleman,
	David S. Miller, Jakub Kicinski, brcm80211-dev-list.pdl, netdev,
	linux-wireless

+ linux-wireless

Borislav Petkov <bp@alien8.de> writes:

> From: Borislav Petkov <bp@suse.de>
>
> 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%2BtIH8GQpuct@zn.tnic for the gory
> details as to why it triggers with older gccs only.
>
> Signed-off-by: Borislav Petkov <bp@suse.de>
> Cc: Arend van Spriel <aspriel@gmail.com>
> Cc: Franky Lin <franky.lin@broadcom.com>
> Cc: Hante Meuleman <hante.meuleman@broadcom.com>
> Cc: Kalle Valo <kvalo@kernel.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: brcm80211-dev-list.pdl@broadcom.com
> Cc: netdev@vger.kernel.org
> ---
>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
> index ba3c159111d3..d78ccc223709 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
> @@ -557,7 +557,7 @@ enum brcmf_sdio_frmtype {
>  	BRCMF_SDIO_FT_SUB,
>  };
>  
> -#define SDIOD_DRVSTR_KEY(chip, pmu)     (((chip) << 16) | (pmu))
> +#define SDIOD_DRVSTR_KEY(chip, pmu)     (((unsigned int)(chip) << 16) | (pmu))

Via which tree is this going? I assume not the wireless tree, so:

Acked-by: Kalle Valo <kvalo@kernel.org>

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

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

* Re: [PATCH 06/11] brcmfmac: sdio: Fix undefined behavior due to shift overflowing the constant
  2022-04-05 15:25   ` Kalle Valo
@ 2022-04-05 16:06     ` Borislav Petkov
  2022-04-05 16:37       ` Kalle Valo
  0 siblings, 1 reply; 17+ messages in thread
From: Borislav Petkov @ 2022-04-05 16:06 UTC (permalink / raw)
  To: Kalle Valo
  Cc: LKML, Arend van Spriel, Franky Lin, Hante Meuleman,
	David S. Miller, Jakub Kicinski, brcm80211-dev-list.pdl, netdev,
	linux-wireless

On Tue, Apr 05, 2022 at 06:25:30PM +0300, Kalle Valo wrote:
> Via which tree is this going? I assume not the wireless tree, so:

Whoever picks it up.

> Acked-by: Kalle Valo <kvalo@kernel.org>

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

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

* Re: [PATCH 06/11] brcmfmac: sdio: Fix undefined behavior due to shift overflowing the constant
  2022-04-05 16:06     ` Borislav Petkov
@ 2022-04-05 16:37       ` Kalle Valo
  2022-04-05 16:55         ` [RESEND PATCH " Borislav Petkov
  0 siblings, 1 reply; 17+ messages in thread
From: Kalle Valo @ 2022-04-05 16:37 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: LKML, Arend van Spriel, Franky Lin, Hante Meuleman,
	David S. Miller, Jakub Kicinski, brcm80211-dev-list.pdl, netdev,
	linux-wireless

Borislav Petkov <bp@alien8.de> writes:

> On Tue, Apr 05, 2022 at 06:25:30PM +0300, Kalle Valo wrote:
>> Via which tree is this going? I assume not the wireless tree, so:
>
> Whoever picks it up.

It would be good to have a plan so the patch is not forgotten :)

Normally brcmfmac patches go via the wireless tree, so I could take this
patch. But you didn't CC linux-wireless so our patchwork doesn't see it.
So if you want me to take this you need to resend.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

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

* [RESEND PATCH 06/11] brcmfmac: sdio: Fix undefined behavior due to shift overflowing the constant
  2022-04-05 16:37       ` Kalle Valo
@ 2022-04-05 16:55         ` Borislav Petkov
  2022-04-05 19:11           ` Arend van Spriel
  2022-04-10 12:20           ` Kalle Valo
  0 siblings, 2 replies; 17+ messages in thread
From: Borislav Petkov @ 2022-04-05 16:55 UTC (permalink / raw)
  To: Kalle Valo
  Cc: LKML, Arend van Spriel, Franky Lin, Hante Meuleman,
	David S. Miller, Jakub Kicinski, brcm80211-dev-list.pdl, netdev,
	linux-wireless

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%2BtIH8GQpuct@zn.tnic for the gory
details as to why it triggers with older gccs only.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Arend van Spriel <aspriel@gmail.com>
Cc: Franky Lin <franky.lin@broadcom.com>
Cc: Hante Meuleman <hante.meuleman@broadcom.com>
Cc: Kalle Valo <kvalo@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: brcm80211-dev-list.pdl@broadcom.com
Cc: netdev@vger.kernel.org
---

Resend, this time with linux-wireless on Cc so that patchwork can pick
it up.

Thx.

 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
index ba3c159111d3..d78ccc223709 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -557,7 +557,7 @@ enum brcmf_sdio_frmtype {
 	BRCMF_SDIO_FT_SUB,
 };
 
-#define SDIOD_DRVSTR_KEY(chip, pmu)     (((chip) << 16) | (pmu))
+#define SDIOD_DRVSTR_KEY(chip, pmu)     (((unsigned int)(chip) << 16) | (pmu))
 
 /* SDIO Pad drive strength to select value mappings */
 struct sdiod_drive_str {
-- 
2.35.1


-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

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

* Re: [PATCH 10/11] IB/mlx5: Fix undefined behavior due to shift overflowing the constant
  2022-04-05 15:15 ` [PATCH 10/11] IB/mlx5: " Borislav Petkov
@ 2022-04-05 18:31   ` Leon Romanovsky
  2022-04-05 19:42     ` Borislav Petkov
  2022-04-06  7:17   ` Leon Romanovsky
  1 sibling, 1 reply; 17+ messages in thread
From: Leon Romanovsky @ 2022-04-05 18:31 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: LKML, Saeed Mahameed, linux-rdma, netdev, Jason Gunthorpe,
	Jakub Kicinski

On Tue, Apr 05, 2022 at 05:15:16PM +0200, Borislav Petkov wrote:
> From: Borislav Petkov <bp@suse.de>
> 
> Fix:
> 
>   drivers/infiniband/hw/mlx5/main.c: In function ‘translate_eth_legacy_proto_oper’:
>   drivers/infiniband/hw/mlx5/main.c:370:2: error: case label does not reduce to an integer constant
>     case MLX5E_PROT_MASK(MLX5E_50GBASE_KR2):
>     ^~~~
> 
> See https://lore.kernel.org/r/YkwQ6%2BtIH8GQpuct@zn.tnic for the gory
> details as to why it triggers with older gccs only.
> 
> Signed-off-by: Borislav Petkov <bp@suse.de>
> Cc: Leon Romanovsky <leon@kernel.org>
> Cc: Saeed Mahameed <saeedm@nvidia.com>
> Cc: linux-rdma@vger.kernel.org
> Cc: netdev@vger.kernel.org
> ---
>  include/linux/mlx5/port.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

I would like to take this patch to mlx5-next, but it didn't show
nor in patchworks [1] nor in lore [2].

Thanks

[1] https://patchwork.kernel.org/project/linux-rdma/list/
[2] https://lore.kernel.org/linux-rdma/

> 
> diff --git a/include/linux/mlx5/port.h b/include/linux/mlx5/port.h
> index 28a928b0684b..e96ee1e348cb 100644
> --- a/include/linux/mlx5/port.h
> +++ b/include/linux/mlx5/port.h
> @@ -141,7 +141,7 @@ enum mlx5_ptys_width {
>  	MLX5_PTYS_WIDTH_12X	= 1 << 4,
>  };
>  
> -#define MLX5E_PROT_MASK(link_mode) (1 << link_mode)
> +#define MLX5E_PROT_MASK(link_mode) (1U << link_mode)
>  #define MLX5_GET_ETH_PROTO(reg, out, ext, field)	\
>  	(ext ? MLX5_GET(reg, out, ext_##field) :	\
>  	MLX5_GET(reg, out, field))
> -- 
> 2.35.1
> 

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

* Re: [RESEND PATCH 06/11] brcmfmac: sdio: Fix undefined behavior due to shift overflowing the constant
  2022-04-05 16:55         ` [RESEND PATCH " Borislav Petkov
@ 2022-04-05 19:11           ` Arend van Spriel
  2022-04-10 12:20           ` Kalle Valo
  1 sibling, 0 replies; 17+ messages in thread
From: Arend van Spriel @ 2022-04-05 19:11 UTC (permalink / raw)
  To: Borislav Petkov, Kalle Valo
  Cc: LKML, Arend van Spriel, Franky Lin, Hante Meuleman,
	David S. Miller, Jakub Kicinski, brcm80211-dev-list.pdl, netdev,
	linux-wireless

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

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%2BtIH8GQpuct@zn.tnic for the gory
> details as to why it triggers with older gccs only.

The details aren't that gory ;-)

Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
> Signed-off-by: Borislav Petkov <bp@suse.de>
> Cc: Arend van Spriel <aspriel@gmail.com>
> Cc: Franky Lin <franky.lin@broadcom.com>
> Cc: Hante Meuleman <hante.meuleman@broadcom.com>
> Cc: Kalle Valo <kvalo@kernel.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: brcm80211-dev-list.pdl@broadcom.com
> Cc: netdev@vger.kernel.org

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4219 bytes --]

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

* Re: [PATCH 10/11] IB/mlx5: Fix undefined behavior due to shift overflowing the constant
  2022-04-05 18:31   ` Leon Romanovsky
@ 2022-04-05 19:42     ` Borislav Petkov
  0 siblings, 0 replies; 17+ messages in thread
From: Borislav Petkov @ 2022-04-05 19:42 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: LKML, Saeed Mahameed, linux-rdma, netdev, Jason Gunthorpe,
	Jakub Kicinski

On Tue, Apr 05, 2022 at 09:31:16PM +0300, Leon Romanovsky wrote:
> I would like to take this patch to mlx5-next, but it didn't show
> nor in patchworks [1] nor in lore [2].

I'm investigating. I'll resend tomorrow if it hasn't appeared by then.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

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

* Re: [PATCH 03/11] bnx2x: Fix undefined behavior due to shift overflowing the constant
  2022-04-05 15:15 ` [PATCH 03/11] bnx2x: Fix undefined behavior due to shift overflowing the constant Borislav Petkov
@ 2022-04-05 19:53   ` Jakub Kicinski
  2022-04-05 19:59     ` Borislav Petkov
  0 siblings, 1 reply; 17+ messages in thread
From: Jakub Kicinski @ 2022-04-05 19:53 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: LKML, Ariel Elior, Sudarsana Kalluru, Manish Chopra,
	David S. Miller, Paolo Abeni, netdev

On Tue,  5 Apr 2022 17:15:09 +0200 Borislav Petkov wrote:
> From: Borislav Petkov <bp@suse.de>
> 
> Fix:
> 
>   drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c: In function ‘bnx2x_check_blocks_with_parity3’:
>   drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:4917:4: error: case label does not reduce to an integer constant
>       case AEU_INPUTS_ATTN_BITS_MCP_LATCHED_SCPAD_PARITY:
>       ^~~~
> 
> See https://lore.kernel.org/r/YkwQ6%2BtIH8GQpuct@zn.tnic for the gory
> details as to why it triggers with older gccs only.
> 
> Signed-off-by: Borislav Petkov <bp@suse.de>

I think this patch did not make it to netdev patchwork.
Could you resend (as a non-series patch - drop the 03/11
from the subject, that way build bot will not consider
it a partial/broken posting)? Thanks!

> diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h
> index 5caa75b41b73..881ac33fe914 100644
> --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h
> +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h
> @@ -6218,7 +6218,7 @@
>  #define AEU_INPUTS_ATTN_BITS_GPIO0_FUNCTION_0			 (0x1<<2)
>  #define AEU_INPUTS_ATTN_BITS_IGU_PARITY_ERROR			 (0x1<<12)
>  #define AEU_INPUTS_ATTN_BITS_MCP_LATCHED_ROM_PARITY		 (0x1<<28)
> -#define AEU_INPUTS_ATTN_BITS_MCP_LATCHED_SCPAD_PARITY		 (0x1<<31)
> +#define AEU_INPUTS_ATTN_BITS_MCP_LATCHED_SCPAD_PARITY		 (0x1U<<31)
>  #define AEU_INPUTS_ATTN_BITS_MCP_LATCHED_UMP_RX_PARITY		 (0x1<<29)
>  #define AEU_INPUTS_ATTN_BITS_MCP_LATCHED_UMP_TX_PARITY		 (0x1<<30)
>  #define AEU_INPUTS_ATTN_BITS_MISC_HW_INTERRUPT			 (0x1<<15)


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

* Re: [PATCH 03/11] bnx2x: Fix undefined behavior due to shift overflowing the constant
  2022-04-05 19:53   ` Jakub Kicinski
@ 2022-04-05 19:59     ` Borislav Petkov
  0 siblings, 0 replies; 17+ messages in thread
From: Borislav Petkov @ 2022-04-05 19:59 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: LKML, Ariel Elior, Sudarsana Kalluru, Manish Chopra,
	David S. Miller, Paolo Abeni, netdev

On Tue, Apr 05, 2022 at 12:53:42PM -0700, Jakub Kicinski wrote:
> I think this patch did not make it to netdev patchwork.
> Could you resend (as a non-series patch - drop the 03/11
> from the subject, that way build bot will not consider
> it a partial/broken posting)? Thanks!

Yeah, will give vger some time as it sounds like it is clogged at the
moment. Which would explain why my patches haven't appeared in multiple
patchworks, if they depend on vger, that is...

I'll do what you suggest tomorrow if it doesn't appear by then.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

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

* Re: [PATCH 08/11] mt76: Fix undefined behavior due to shift overflowing the constant
  2022-04-05 15:15 ` [PATCH 08/11] mt76: " Borislav Petkov
@ 2022-04-06  5:43   ` Kalle Valo
  2022-04-10 12:20   ` Kalle Valo
  1 sibling, 0 replies; 17+ messages in thread
From: Kalle Valo @ 2022-04-06  5:43 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: LKML, Felix Fietkau, Lorenzo Bianconi, Ryder Lee, Shayne Chen,
	Sean Wang, David S. Miller, Jakub Kicinski, linux-wireless,
	netdev

Borislav Petkov <bp@alien8.de> writes:

> From: Borislav Petkov <bp@suse.de>
>
> Fix:
>
>   drivers/net/wireless/mediatek/mt76/mt76x2/pci.c: In function ‘mt76x2e_probe’:
>   ././include/linux/compiler_types.h:352:38: error: call to ‘__compiletime_assert_946’ \
> 	declared with attribute error: FIELD_PREP: mask is not constant
>     _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
>
> See https://lore.kernel.org/r/YkwQ6%2BtIH8GQpuct@zn.tnic for the gory
> details as to why it triggers with older gccs only.
>
> Signed-off-by: Borislav Petkov <bp@suse.de>

As this fixes a compiler warning in Linus' tree, I would like to take
this to wireless tree and I assigned this to myself in patchwork.

Felix, ack?

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

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

* Re: [PATCH 10/11] IB/mlx5: Fix undefined behavior due to shift overflowing the constant
  2022-04-05 15:15 ` [PATCH 10/11] IB/mlx5: " Borislav Petkov
  2022-04-05 18:31   ` Leon Romanovsky
@ 2022-04-06  7:17   ` Leon Romanovsky
  1 sibling, 0 replies; 17+ messages in thread
From: Leon Romanovsky @ 2022-04-06  7:17 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: LKML, Saeed Mahameed, linux-rdma, netdev, Jakub Kicinski,
	Jason Gunthorpe

On Tue, Apr 05, 2022 at 05:15:16PM +0200, Borislav Petkov wrote:
> From: Borislav Petkov <bp@suse.de>
> 
> Fix:
> 
>   drivers/infiniband/hw/mlx5/main.c: In function ‘translate_eth_legacy_proto_oper’:
>   drivers/infiniband/hw/mlx5/main.c:370:2: error: case label does not reduce to an integer constant
>     case MLX5E_PROT_MASK(MLX5E_50GBASE_KR2):
>     ^~~~
> 
> See https://lore.kernel.org/r/YkwQ6%2BtIH8GQpuct@zn.tnic for the gory
> details as to why it triggers with older gccs only.
> 
> Signed-off-by: Borislav Petkov <bp@suse.de>
> Cc: Leon Romanovsky <leon@kernel.org>
> Cc: Saeed Mahameed <saeedm@nvidia.com>
> Cc: linux-rdma@vger.kernel.org
> Cc: netdev@vger.kernel.org
> ---
>  include/linux/mlx5/port.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, applied to mlx5-next.

0276bd3a94c0 ("IB/mlx5: Fix undefined behavior due to shift overflowing the constant")

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

* Re: [PATCH 08/11] mt76: Fix undefined behavior due to shift overflowing the constant
  2022-04-05 15:15 ` [PATCH 08/11] mt76: " Borislav Petkov
  2022-04-06  5:43   ` Kalle Valo
@ 2022-04-10 12:20   ` Kalle Valo
  1 sibling, 0 replies; 17+ messages in thread
From: Kalle Valo @ 2022-04-10 12:20 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: LKML, Felix Fietkau, Lorenzo Bianconi, Ryder Lee, Shayne Chen,
	Sean Wang, David S. Miller, Jakub Kicinski, linux-wireless,
	netdev

Borislav Petkov <bp@alien8.de> wrote:

> From: Borislav Petkov <bp@suse.de>
> 
> Fix:
> 
>   drivers/net/wireless/mediatek/mt76/mt76x2/pci.c: In function ‘mt76x2e_probe’:
>   ././include/linux/compiler_types.h:352:38: error: call to ‘__compiletime_assert_946’ \
> 	declared with attribute error: FIELD_PREP: mask is not constant
>     _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> 
> See https://lore.kernel.org/r/YkwQ6%2BtIH8GQpuct@zn.tnic for the gory
> details as to why it triggers with older gccs only.
> 
> Signed-off-by: Borislav Petkov <bp@suse.de>
> Cc: Felix Fietkau <nbd@nbd.name>
> Cc: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
> Cc: Ryder Lee <ryder.lee@mediatek.com>
> Cc: Shayne Chen <shayne.chen@mediatek.com>
> Cc: Sean Wang <sean.wang@mediatek.com>
> Cc: Kalle Valo <kvalo@kernel.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: linux-wireless@vger.kernel.org
> Cc: netdev@vger.kernel.org

Patch applied to wireless.git, thanks.

dbc2b1764734 mt76: Fix undefined behavior due to shift overflowing the constant

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20220405151517.29753-9-bp@alien8.de/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


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

* Re: [RESEND PATCH 06/11] brcmfmac: sdio: Fix undefined behavior due to shift overflowing the constant
  2022-04-05 16:55         ` [RESEND PATCH " Borislav Petkov
  2022-04-05 19:11           ` Arend van Spriel
@ 2022-04-10 12:20           ` Kalle Valo
  1 sibling, 0 replies; 17+ messages in thread
From: Kalle Valo @ 2022-04-10 12:20 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: LKML, Arend van Spriel, Franky Lin, Hante Meuleman,
	David S. Miller, Jakub Kicinski, brcm80211-dev-list.pdl, netdev,
	linux-wireless

Borislav Petkov <bp@alien8.de> 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%2BtIH8GQpuct@zn.tnic for the gory
> details as to why it triggers with older gccs only.
> 
> Signed-off-by: Borislav Petkov <bp@suse.de>
> Cc: Arend van Spriel <aspriel@gmail.com>
> Cc: Franky Lin <franky.lin@broadcom.com>
> Cc: Hante Meuleman <hante.meuleman@broadcom.com>
> Cc: Kalle Valo <kvalo@kernel.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: brcm80211-dev-list.pdl@broadcom.com
> Cc: netdev@vger.kernel.org
> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>

Patch applied to wireless.git, thanks.

6fb3a5868b21 brcmfmac: sdio: Fix undefined behavior due to shift overflowing the constant

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/Ykx0iRlvtBnKqtbG@zn.tnic/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


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

end of thread, other threads:[~2022-04-10 12:21 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20220405151517.29753-1-bp@alien8.de>
2022-04-05 15:15 ` [PATCH 03/11] bnx2x: Fix undefined behavior due to shift overflowing the constant Borislav Petkov
2022-04-05 19:53   ` Jakub Kicinski
2022-04-05 19:59     ` Borislav Petkov
2022-04-05 15:15 ` [PATCH 06/11] brcmfmac: sdio: " Borislav Petkov
2022-04-05 15:25   ` Kalle Valo
2022-04-05 16:06     ` Borislav Petkov
2022-04-05 16:37       ` Kalle Valo
2022-04-05 16:55         ` [RESEND PATCH " Borislav Petkov
2022-04-05 19:11           ` Arend van Spriel
2022-04-10 12:20           ` Kalle Valo
2022-04-05 15:15 ` [PATCH 08/11] mt76: " Borislav Petkov
2022-04-06  5:43   ` Kalle Valo
2022-04-10 12:20   ` Kalle Valo
2022-04-05 15:15 ` [PATCH 10/11] IB/mlx5: " Borislav Petkov
2022-04-05 18:31   ` Leon Romanovsky
2022-04-05 19:42     ` Borislav Petkov
2022-04-06  7:17   ` Leon Romanovsky

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