From 0a874bd67394af847fff28dff22b1d78b1b8f3fa Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Thu, 1 Feb 2024 19:56:48 -0500 Subject: [PATCH] Drop hwmon-pc87360-bounds-check-data-innr-usage.patch Signed-off-by: Sasha Levin --- ...pc87360-bounds-check-data-innr-usage.patch | 60 ------------------- queue-4.19/series | 1 - ...pc87360-bounds-check-data-innr-usage.patch | 60 ------------------- queue-5.10/series | 1 - ...pc87360-bounds-check-data-innr-usage.patch | 60 ------------------- queue-5.15/series | 1 - ...pc87360-bounds-check-data-innr-usage.patch | 60 ------------------- queue-5.4/series | 1 - ...pc87360-bounds-check-data-innr-usage.patch | 60 ------------------- queue-6.1/series | 1 - ...pc87360-bounds-check-data-innr-usage.patch | 60 ------------------- queue-6.6/series | 1 - ...pc87360-bounds-check-data-innr-usage.patch | 60 ------------------- queue-6.7/series | 1 - 14 files changed, 427 deletions(-) delete mode 100644 queue-4.19/hwmon-pc87360-bounds-check-data-innr-usage.patch delete mode 100644 queue-5.10/hwmon-pc87360-bounds-check-data-innr-usage.patch delete mode 100644 queue-5.15/hwmon-pc87360-bounds-check-data-innr-usage.patch delete mode 100644 queue-5.4/hwmon-pc87360-bounds-check-data-innr-usage.patch delete mode 100644 queue-6.1/hwmon-pc87360-bounds-check-data-innr-usage.patch delete mode 100644 queue-6.6/hwmon-pc87360-bounds-check-data-innr-usage.patch delete mode 100644 queue-6.7/hwmon-pc87360-bounds-check-data-innr-usage.patch diff --git a/queue-4.19/hwmon-pc87360-bounds-check-data-innr-usage.patch b/queue-4.19/hwmon-pc87360-bounds-check-data-innr-usage.patch deleted file mode 100644 index f891f30149d..00000000000 --- a/queue-4.19/hwmon-pc87360-bounds-check-data-innr-usage.patch +++ /dev/null @@ -1,60 +0,0 @@ -From c17402ef78ee304ee43c1ef233f373b0a2bfc7fd Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 30 Nov 2023 12:02:07 -0800 -Subject: hwmon: (pc87360) Bounds check data->innr usage - -From: Kees Cook - -[ 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 -Cc: Jean Delvare -Cc: Guenter Roeck -Cc: linux-hwmon@vger.kernel.org -Signed-off-by: Kees Cook -Reviewed-by: Gustavo A. R. Silva -Link: https://lore.kernel.org/r/20231130200207.work.679-kees@kernel.org -[groeck: Added comment into code clarifying context] -Signed-off-by: Guenter Roeck -Signed-off-by: Sasha Levin ---- - 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 7e3697727537..d2b3137dccd4 100644 ---- a/drivers/hwmon/pc87360.c -+++ b/drivers/hwmon/pc87360.c -@@ -1637,7 +1637,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-4.19/series b/queue-4.19/series index 294e3634253..b9017157333 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -104,7 +104,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 diff --git a/queue-5.10/hwmon-pc87360-bounds-check-data-innr-usage.patch b/queue-5.10/hwmon-pc87360-bounds-check-data-innr-usage.patch deleted file mode 100644 index 11a4a91f2e8..00000000000 --- a/queue-5.10/hwmon-pc87360-bounds-check-data-innr-usage.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 870b52ed1cd6d610437943c732fdf45c6396c6c6 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 30 Nov 2023 12:02:07 -0800 -Subject: hwmon: (pc87360) Bounds check data->innr usage - -From: Kees Cook - -[ 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 -Cc: Jean Delvare -Cc: Guenter Roeck -Cc: linux-hwmon@vger.kernel.org -Signed-off-by: Kees Cook -Reviewed-by: Gustavo A. R. Silva -Link: https://lore.kernel.org/r/20231130200207.work.679-kees@kernel.org -[groeck: Added comment into code clarifying context] -Signed-off-by: Guenter Roeck -Signed-off-by: Sasha Levin ---- - 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.10/series b/queue-5.10/series index 9574aade0ed..3382cfd9707 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -190,7 +190,6 @@ 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 alsa-hda-intel-dspcfg-add-filters-for-arl-s-and-arl.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 diff --git a/queue-5.15/hwmon-pc87360-bounds-check-data-innr-usage.patch b/queue-5.15/hwmon-pc87360-bounds-check-data-innr-usage.patch deleted file mode 100644 index 742c9a886c8..00000000000 --- a/queue-5.15/hwmon-pc87360-bounds-check-data-innr-usage.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 14c450decfcb10feeef89e8f1ce3493fcfd66c31 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 30 Nov 2023 12:02:07 -0800 -Subject: hwmon: (pc87360) Bounds check data->innr usage - -From: Kees Cook - -[ 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 -Cc: Jean Delvare -Cc: Guenter Roeck -Cc: linux-hwmon@vger.kernel.org -Signed-off-by: Kees Cook -Reviewed-by: Gustavo A. R. Silva -Link: https://lore.kernel.org/r/20231130200207.work.679-kees@kernel.org -[groeck: Added comment into code clarifying context] -Signed-off-by: Guenter Roeck -Signed-off-by: Sasha Levin ---- - 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 6a9ba23cd302..3519f486f0b7 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.15/series b/queue-5.15/series index f426474962c..265c3c39fc7 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -227,7 +227,6 @@ pci-add-intel_hda_arl-to-pci_ids.h.patch alsa-hda-intel-add-hda_arl-pci-id-support.patch alsa-hda-intel-dspcfg-add-filters-for-arl-s-and-arl.patch media-rkisp1-drop-irqf_shared.patch -hwmon-pc87360-bounds-check-data-innr-usage.patch f2fs-fix-to-tag-gcing-flag-on-page-during-block-migr.patch drm-exynos-call-drm_atomic_helper_shutdown-at-shutdo.patch ib-ipoib-fix-mcast-list-locking.patch 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 445258b6cdd..00000000000 --- 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 -Date: Thu, 30 Nov 2023 12:02:07 -0800 -Subject: hwmon: (pc87360) Bounds check data->innr usage - -From: Kees Cook - -[ 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 -Cc: Jean Delvare -Cc: Guenter Roeck -Cc: linux-hwmon@vger.kernel.org -Signed-off-by: Kees Cook -Reviewed-by: Gustavo A. R. Silva -Link: https://lore.kernel.org/r/20231130200207.work.679-kees@kernel.org -[groeck: Added comment into code clarifying context] -Signed-off-by: Guenter Roeck -Signed-off-by: Sasha Levin ---- - 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 e65dc050ef3..6025eb62322 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 diff --git a/queue-6.1/hwmon-pc87360-bounds-check-data-innr-usage.patch b/queue-6.1/hwmon-pc87360-bounds-check-data-innr-usage.patch deleted file mode 100644 index 0ad75a35ff7..00000000000 --- a/queue-6.1/hwmon-pc87360-bounds-check-data-innr-usage.patch +++ /dev/null @@ -1,60 +0,0 @@ -From c1a102dbd47b6b5009605d0357a1314b95c3d9f3 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 30 Nov 2023 12:02:07 -0800 -Subject: hwmon: (pc87360) Bounds check data->innr usage - -From: Kees Cook - -[ 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 -Cc: Jean Delvare -Cc: Guenter Roeck -Cc: linux-hwmon@vger.kernel.org -Signed-off-by: Kees Cook -Reviewed-by: Gustavo A. R. Silva -Link: https://lore.kernel.org/r/20231130200207.work.679-kees@kernel.org -[groeck: Added comment into code clarifying context] -Signed-off-by: Guenter Roeck -Signed-off-by: Sasha Levin ---- - 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 a4adc8bd531f..534a6072036c 100644 ---- a/drivers/hwmon/pc87360.c -+++ b/drivers/hwmon/pc87360.c -@@ -323,7 +323,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-6.1/series b/queue-6.1/series index 197f0506e37..096906d1839 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -125,7 +125,6 @@ media-rkisp1-fix-irq-handler-return-values.patch media-rkisp1-store-irq-lines.patch media-rkisp1-fix-irq-disable-race-issue.patch hwmon-nct6775-fix-fan-speed-set-failure-in-automatic.patch -hwmon-pc87360-bounds-check-data-innr-usage.patch f2fs-fix-to-tag-gcing-flag-on-page-during-block-migr.patch drm-exynos-call-drm_atomic_helper_shutdown-at-shutdo.patch ib-ipoib-fix-mcast-list-locking.patch diff --git a/queue-6.6/hwmon-pc87360-bounds-check-data-innr-usage.patch b/queue-6.6/hwmon-pc87360-bounds-check-data-innr-usage.patch deleted file mode 100644 index 0f4ce2b437e..00000000000 --- a/queue-6.6/hwmon-pc87360-bounds-check-data-innr-usage.patch +++ /dev/null @@ -1,60 +0,0 @@ -From cd95b4c6be9f5e46a15a21ed918f92bac16f5295 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 30 Nov 2023 12:02:07 -0800 -Subject: hwmon: (pc87360) Bounds check data->innr usage - -From: Kees Cook - -[ 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 -Cc: Jean Delvare -Cc: Guenter Roeck -Cc: linux-hwmon@vger.kernel.org -Signed-off-by: Kees Cook -Reviewed-by: Gustavo A. R. Silva -Link: https://lore.kernel.org/r/20231130200207.work.679-kees@kernel.org -[groeck: Added comment into code clarifying context] -Signed-off-by: Guenter Roeck -Signed-off-by: Sasha Levin ---- - 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 a4adc8bd531f..534a6072036c 100644 ---- a/drivers/hwmon/pc87360.c -+++ b/drivers/hwmon/pc87360.c -@@ -323,7 +323,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-6.6/series b/queue-6.6/series index 06d40215e4f..097f7de2902 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -183,7 +183,6 @@ media-rkisp1-store-irq-lines.patch media-rkisp1-fix-irq-disable-race-issue.patch media-rkisp1-resizer-stop-manual-allocation-of-v4l2_.patch hwmon-nct6775-fix-fan-speed-set-failure-in-automatic.patch -hwmon-pc87360-bounds-check-data-innr-usage.patch hwmon-hp-wmi-sensors-fix-failure-to-load-on-elitedes.patch f2fs-fix-to-tag-gcing-flag-on-page-during-block-migr.patch drm-exynos-call-drm_atomic_helper_shutdown-at-shutdo.patch diff --git a/queue-6.7/hwmon-pc87360-bounds-check-data-innr-usage.patch b/queue-6.7/hwmon-pc87360-bounds-check-data-innr-usage.patch deleted file mode 100644 index 1477c315a39..00000000000 --- a/queue-6.7/hwmon-pc87360-bounds-check-data-innr-usage.patch +++ /dev/null @@ -1,60 +0,0 @@ -From a95f1e068507bc2f9c5e28e60883f3408f93eaa6 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 30 Nov 2023 12:02:07 -0800 -Subject: hwmon: (pc87360) Bounds check data->innr usage - -From: Kees Cook - -[ 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 -Cc: Jean Delvare -Cc: Guenter Roeck -Cc: linux-hwmon@vger.kernel.org -Signed-off-by: Kees Cook -Reviewed-by: Gustavo A. R. Silva -Link: https://lore.kernel.org/r/20231130200207.work.679-kees@kernel.org -[groeck: Added comment into code clarifying context] -Signed-off-by: Guenter Roeck -Signed-off-by: Sasha Levin ---- - 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 926ea1fe133c..9e9681b2e8c5 100644 ---- a/drivers/hwmon/pc87360.c -+++ b/drivers/hwmon/pc87360.c -@@ -323,7 +323,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-6.7/series b/queue-6.7/series index bdf30cd1262..1043fbe57ab 100644 --- a/queue-6.7/series +++ b/queue-6.7/series @@ -198,7 +198,6 @@ media-rkisp1-store-irq-lines.patch media-rkisp1-fix-irq-disable-race-issue.patch media-rkisp1-resizer-stop-manual-allocation-of-v4l2_.patch hwmon-nct6775-fix-fan-speed-set-failure-in-automatic.patch -hwmon-pc87360-bounds-check-data-innr-usage.patch hwmon-hp-wmi-sensors-fix-failure-to-load-on-elitedes.patch f2fs-fix-to-tag-gcing-flag-on-page-during-block-migr.patch drm-exynos-call-drm_atomic_helper_shutdown-at-shutdo.patch -- 2.47.3