aboutsummaryrefslogtreecommitdiffstats
path: root/queue-5.4
diff options
context:
space:
mode:
authorSasha Levin <sashal@kernel.org>2024-02-01 19:56:48 -0500
committerSasha Levin <sashal@kernel.org>2024-02-01 19:56:48 -0500
commit0a874bd67394af847fff28dff22b1d78b1b8f3fa (patch)
tree56af91ad40722d864fcc98a8602a2dce43a81fa2 /queue-5.4
parentb34970218ee1cbd1082b4bf0d9044f26b2e63349 (diff)
downloadstable-queue-0a874bd67394af847fff28dff22b1d78b1b8f3fa.tar.gz
Drop hwmon-pc87360-bounds-check-data-innr-usage.patch
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'queue-5.4')
-rw-r--r--queue-5.4/hwmon-pc87360-bounds-check-data-innr-usage.patch60
-rw-r--r--queue-5.4/series1
2 files changed, 0 insertions, 61 deletions
diff --git a/queue-5.4/hwmon-pc87360-bounds-check-data-innr-usage.patch b/queue-5.4/hwmon-pc87360-bounds-check-data-innr-usage.patch
deleted file mode 100644
index 445258b6cd..0000000000
--- a/queue-5.4/hwmon-pc87360-bounds-check-data-innr-usage.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From fdbba7c9106a4bbd4764380244b63b58ad4ffd4c Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Thu, 30 Nov 2023 12:02:07 -0800
-Subject: hwmon: (pc87360) Bounds check data->innr usage
-
-From: Kees Cook <keescook@chromium.org>
-
-[ Upstream commit 4265eb062a7303e537ab3792ade31f424c3c5189 ]
-
-Without visibility into the initializers for data->innr, GCC suspects
-using it as an index could walk off the end of the various 14-element
-arrays in data. Perform an explicit clamp to the array size. Silences
-the following warning with GCC 12+:
-
-../drivers/hwmon/pc87360.c: In function 'pc87360_update_device':
-../drivers/hwmon/pc87360.c:341:49: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
- 341 | data->in_max[i] = pc87360_read_value(data,
- | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
- 342 | LD_IN, i,
- | ~~~~~~~~~
- 343 | PC87365_REG_IN_MAX);
- | ~~~~~~~~~~~~~~~~~~~
-../drivers/hwmon/pc87360.c:209:12: note: at offset 255 into destination object 'in_max' of size 14
- 209 | u8 in_max[14]; /* Register value */
- | ^~~~~~
-
-Cc: Jim Cromie <jim.cromie@gmail.com>
-Cc: Jean Delvare <jdelvare@suse.com>
-Cc: Guenter Roeck <linux@roeck-us.net>
-Cc: linux-hwmon@vger.kernel.org
-Signed-off-by: Kees Cook <keescook@chromium.org>
-Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
-Link: https://lore.kernel.org/r/20231130200207.work.679-kees@kernel.org
-[groeck: Added comment into code clarifying context]
-Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/hwmon/pc87360.c | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/hwmon/pc87360.c b/drivers/hwmon/pc87360.c
-index 94f4b8b4a2ba..0cf603c8c9f9 100644
---- a/drivers/hwmon/pc87360.c
-+++ b/drivers/hwmon/pc87360.c
-@@ -1605,7 +1605,11 @@ static struct pc87360_data *pc87360_update_device(struct device *dev)
- }
-
- /* Voltages */
-- for (i = 0; i < data->innr; i++) {
-+ /*
-+ * The min() below does not have any practical meaning and is
-+ * only needed to silence a warning observed with gcc 12+.
-+ */
-+ for (i = 0; i < min(data->innr, ARRAY_SIZE(data->in)); i++) {
- data->in_status[i] = pc87360_read_value(data, LD_IN, i,
- PC87365_REG_IN_STATUS);
- /* Clear bits */
---
-2.43.0
-
diff --git a/queue-5.4/series b/queue-5.4/series
index e65dc050ef..6025eb6232 100644
--- a/queue-5.4/series
+++ b/queue-5.4/series
@@ -129,7 +129,6 @@ media-stk1160-fixed-high-volume-of-stk1160_dbg-messa.patch
media-rockchip-rga-fix-swizzling-for-rgb-formats.patch
pci-add-intel_hda_arl-to-pci_ids.h.patch
alsa-hda-intel-add-hda_arl-pci-id-support.patch
-hwmon-pc87360-bounds-check-data-innr-usage.patch
drm-exynos-call-drm_atomic_helper_shutdown-at-shutdo.patch
ib-ipoib-fix-mcast-list-locking.patch
media-ddbridge-fix-an-error-code-problem-in-ddb_prob.patch