Skip to content

treewide: address gcc-11 -Wstringop-overread warnings

Arnd Bergmann ath11k cgroups dri-devel intel-gfx linux-arm-kernel linux-scsi linux-security-module linux-wireless lkml netdev 1 version Applied

Status from this message: The following commit has been merged into the x86/boot branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 22 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/11x86: compressed: avoid gcc-11 -Wstringop-overread warningarch/x86/boot/compressed/misc.c+0 -20 replies
2/11x86: tboot: avoid Wstringop-overread-warningarch/x86/kernel/tboot.c+26 -187 replies
3/11security: commoncap: fix -Wstringop-overread warningsecurity/commoncap.c+1 -12 replies
4/11ath11: Wstringop-overread warningdrivers/net/wireless/ath/ath11k/mac.c+1 -13 replies
5/11qnx: avoid -Wstringop-overread warningfs/qnx4/dir.c+5 -60 replies
6/11cgroup: fix -Wzero-length-bounds warningskernel/cgroup/cgroup.c+12 -33 replies
7/11ARM: sharpsl_param: work around -Wstringop-overread warningarch/arm/common/sharpsl_param.c+3 -10 replies
8/11atmel: avoid gcc -Wstringop-overflow warningdrivers/net/wireless/atmel/atmel.c+15 -100 replies
9/11scsi: lpfc: fix gcc -Wstringop-overread warningdrivers/scsi/lpfc/lpfc_attr.c+2 -40 replies
10/11drm/i915: avoid stringop-overread warning on pri_latencydrivers/gpu/drm/i915/i915_drv.h+3 -32 replies
11/11drm/i915/dp: fix array overflow warningdrivers/gpu/drm/i915/display/intel_dp.c+1 -14 replies

Reviews trailers per patch

3 of 11 patches have a Reviewed-by or Acked-by.

PatchChristian BraunerJani NikulaMichal Koutný
1/11
2/11
3/11A-b
4/11
5/11
6/11R-b
7/11
8/11
9/11
10/11R-b
11/11

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

Read the v1 thread

Cover letter [PATCH 00/11] treewide: address gcc-11 -Wstringop-overread warnings

From: Arnd Bergmann <[email protected]>

The coming gcc release introduces a new warning for string operations reading beyond the end of a fixed-length object. After testing randconfig kernels for a while, think I have patches for any such warnings that came up on x86, arm and arm64.

Most of these warnings are false-positive ones, either gcc warning about something that is entirely correct, or about something that looks suspicious but turns out to be correct after all.

The two patches for the i915 driver look like something that might be actual bugs, but I am not sure about those either.

We probably want some combination of workaround like the ones I post here and changes to gcc to have fewer false positives in the release. I'm posting the entire set of workaround that give me a cleanly building kernel for reference here.

Arnd

Arnd Bergmann (11):
x86: compressed: avoid gcc-11 -Wstringop-overread warning
x86: tboot: avoid Wstringop-overread-warning
security: commoncap: fix -Wstringop-overread warning
ath11: Wstringop-overread warning
qnx: avoid -Wstringop-overread warning
cgroup: fix -Wzero-length-bounds warnings
ARM: sharpsl_param: work around -Wstringop-overread warning
atmel: avoid gcc -Wstringop-overflow warning
scsi: lpfc: fix gcc -Wstringop-overread warning drm/i915: avoid stringop-overread warning on pri_latency [RFC] drm/i915/dp: fix array overflow warning

 arch/arm/common/sharpsl_param.c         |  4 ++-
 arch/x86/boot/compressed/misc.c         |  2 --
 arch/x86/kernel/tboot.c                 | 44 +++++++++++++++----------
 drivers/gpu/drm/i915/display/intel_dp.c |  2 +-
 drivers/gpu/drm/i915/i915_drv.h         |  6 ++--
 drivers/net/wireless/ath/ath11k/mac.c   |  2 +-
 drivers/net/wireless/atmel/atmel.c      | 25 ++++++++------
 drivers/scsi/lpfc/lpfc_attr.c           |  6 ++--
 fs/qnx4/dir.c                           | 11 +++----
 kernel/cgroup/cgroup.c                  | 15 +++++++--
 security/commoncap.c                    |  2 +-
 11 files changed, 69 insertions(+), 50 deletions(-)
Signature · 1 line
2.29.2