Skip to content

treewide: Fix a bunch of shift overflows

Borislav Petkov alsa-devel dri-devel intel-gfx linux-arm-kernel linux-i2c linux-rdma linux-scsi linux-usb linux-wireless lkml netdev 1 version Applied

Status from this message: Thanks, applied to mlx5-next.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 30 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/11scsi: aacraid: Fix undefined behavior due to shift overflowing the constantdrivers/scsi/aacraid/aacraid.h+1 -13 replies
2/11ALSA: usb-audio: Fix undefined behavior due to shift overflowing the constantsound/usb/usbaudio.h+1 -13 replies
3/11bnx2x: Fix undefined behavior due to shift overflowing the constantdrivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h+1 -12 replies
4/11drm/r128: Fix undefined behavior due to shift overflowing the constantdrivers/gpu/drm/r128/r128_drv.h+2 -24 replies
5/11i2c: ismt: Fix undefined behavior due to shift overflowing the constantdrivers/i2c/busses/i2c-ismt.c+2 -21 reply
6/11brcmfmac: sdio: Fix undefined behavior due to shift overflowing the constantdrivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c+1 -12 replies
6/11brcmfmac: sdio: Fix undefined behavior due to shift overflowing the constantdrivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c+1 -13 replies
7/11usb: typec: tcpm: Fix undefined behavior due to shift overflowing the constantinclude/linux/usb/pd_bdo.h+1 -10 replies
8/11mt76: Fix undefined behavior due to shift overflowing the constantdrivers/net/wireless/mediatek/mt76/mt76x2/pci.c+1 -12 replies
9/11perf/imx_ddr: Fix undefined behavior due to shift overflowing the constantdrivers/perf/fsl_imx8_ddr_perf.c+1 -12 replies
10/11IB/mlx5: Fix undefined behavior due to shift overflowing the constantinclude/linux/mlx5/port.h+1 -13 replies
11/11drm/i915: Fix undefined behavior due to shift overflowing the constantdrivers/gpu/drm/i915/gt/uc/abi/guc_actions_abi.h drivers/gpu/drm/i915/gt/uc/abi/guc_communication_ctb_abi.h drivers/gpu/drm/i915/gt/uc/abi/guc_messages_abi.h +2 more+13 -133 replies

Reviews trailers per patch

7 of 12 patches have a Reviewed-by or Acked-by.

PatchArend van SprielKalle ValoSeth HeasleyWill DeaconRandy Dunlap
1/11R-b
2/11
3/11
4/11R-b
5/11R-b
6/11A-b A-b
6/11A-b A-b
7/11
8/11
9/11A-b
10/11
11/11A-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v1 thread

Cover letter [PATCH 00/11] treewide: Fix a bunch of shift overflows

From: Borislav Petkov <[email protected]>

Hi all,

so this is the result of me trying to make allmodconfig actually build here.

Due to some recent changes which added -fsanitize-shift to the build options of an allmodconfig, it started failing here with an old gcc because getting an overflow while shifting is undefined C99 behavior.

gcc warns/errors out with -Werror about this only on newer versions where -pedantic is present while older ones do so even without it. The whole details here:

https://lore.kernel.org/r/YkwQ6%[email protected]

Fixing all those is trivial so please pick up at your convenience.

In order to avoid spamming people unnecessarily, I'm not CCing everyone on each patch but only the relevant maintainers and lists.

Thx.

Borislav Petkov (11):
scsi: aacraid: Fix undefined behavior due to shift overflowing the
constant
ALSA: usb-audio: Fix undefined behavior due to shift overflowing the
constant
bnx2x: Fix undefined behavior due to shift overflowing the constant drm/r128: Fix undefined behavior due to shift overflowing the constant
i2c: ismt: Fix undefined behavior due to shift overflowing the
constant
brcmfmac: sdio: Fix undefined behavior due to shift overflowing the
constant
usb: typec: tcpm: Fix undefined behavior due to shift overflowing the
constant
mt76: Fix undefined behavior due to shift overflowing the constant perf/imx_ddr: Fix undefined behavior due to shift overflowing the
constant
IB/mlx5: Fix undefined behavior due to shift overflowing the constant drm/i915: Fix undefined behavior due to shift overflowing the constant

 .../gpu/drm/i915/gt/uc/abi/guc_actions_abi.h   |  2 +-
 .../i915/gt/uc/abi/guc_communication_ctb_abi.h |  2 +-
 .../gpu/drm/i915/gt/uc/abi/guc_messages_abi.h  |  2 +-
 drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h     |  2 +-
 drivers/gpu/drm/i915/i915_reg.h                | 18 +++++++++---------
 drivers/gpu/drm/r128/r128_drv.h                |  4 ++--
 drivers/i2c/busses/i2c-ismt.c                  |  4 ++--
 .../net/ethernet/broadcom/bnx2x/bnx2x_reg.h    |  2 +-
 .../broadcom/brcm80211/brcmfmac/sdio.c         |  2 +-
 .../net/wireless/mediatek/mt76/mt76x2/pci.c    |  2 +-
 drivers/perf/fsl_imx8_ddr_perf.c               |  2 +-
 drivers/scsi/aacraid/aacraid.h                 |  2 +-
 include/linux/mlx5/port.h                      |  2 +-
 include/linux/usb/pd_bdo.h                     |  2 +-
 sound/usb/usbaudio.h                           |  2 +-
 15 files changed, 25 insertions(+), 25 deletions(-)
Signature · 1 line
2.35.1