From: Greg Kroah-Hartman Date: Tue, 11 Mar 2025 14:25:47 +0000 (+0100) Subject: 5.4-stable patches X-Git-Tag: v5.4.291~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3871cab21a0163d50eb8c045ae8c15751c9a622b;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: perf-cs-etm-add-missing-variable-in-cs_etm__process_queues.patch udf-fix-use-of-check_add_overflow-with-mixed-type-arguments.patch --- diff --git a/queue-5.4/perf-cs-etm-add-missing-variable-in-cs_etm__process_queues.patch b/queue-5.4/perf-cs-etm-add-missing-variable-in-cs_etm__process_queues.patch new file mode 100644 index 0000000000..45e3204240 --- /dev/null +++ b/queue-5.4/perf-cs-etm-add-missing-variable-in-cs_etm__process_queues.patch @@ -0,0 +1,37 @@ +From stable+bounces-119388-greg=kroah.com@vger.kernel.org Mon Feb 24 17:20:13 2025 +From: Ben Hutchings +Date: Mon, 24 Feb 2025 16:57:20 +0100 +Subject: perf cs-etm: Add missing variable in cs_etm__process_queues() +To: stable@vger.kernel.org +Cc: James Clark +Message-ID: +Content-Disposition: inline + +From: Ben Hutchings + +Commit 5afd032961e8 "perf cs-etm: Don't flush when packet_queue fills +up" uses i as a loop counter in cs_etm__process_queues(). It was +backported to the 5.4 and 5.10 stable branches, but the i variable +doesn't exist there as it was only added in 5.15. + +Declare i with the expected type. + +Fixes: 1ed167325c32 ("perf cs-etm: Don't flush when packet_queue fills up") +Fixes: 26db806fa23e ("perf cs-etm: Don't flush when packet_queue fills up") +Signed-off-by: Ben Hutchings +Signed-off-by: Greg Kroah-Hartman +--- + tools/perf/util/cs-etm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/tools/perf/util/cs-etm.c ++++ b/tools/perf/util/cs-etm.c +@@ -2139,7 +2139,7 @@ static int cs_etm__process_timeless_queu + static int cs_etm__process_queues(struct cs_etm_auxtrace *etm) + { + int ret = 0; +- unsigned int cs_queue_nr, queue_nr; ++ unsigned int cs_queue_nr, queue_nr, i; + u8 trace_chan_id; + u64 timestamp; + struct auxtrace_queue *queue; diff --git a/queue-5.4/series b/queue-5.4/series index d59717fbc2..8336f11447 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -1,3 +1,5 @@ +perf-cs-etm-add-missing-variable-in-cs_etm__process_queues.patch +udf-fix-use-of-check_add_overflow-with-mixed-type-arguments.patch afs-fix-directory-format-encoding-struct.patch nbd-don-t-allow-reconnect-after-disconnect.patch partitions-ldm-remove-the-initial-kernel-doc-notatio.patch diff --git a/queue-5.4/udf-fix-use-of-check_add_overflow-with-mixed-type-arguments.patch b/queue-5.4/udf-fix-use-of-check_add_overflow-with-mixed-type-arguments.patch new file mode 100644 index 0000000000..b14f2c9930 --- /dev/null +++ b/queue-5.4/udf-fix-use-of-check_add_overflow-with-mixed-type-arguments.patch @@ -0,0 +1,43 @@ +From stable+bounces-119387-greg=kroah.com@vger.kernel.org Mon Feb 24 17:02:42 2025 +From: Ben Hutchings +Date: Mon, 24 Feb 2025 17:00:27 +0100 +Subject: udf: Fix use of check_add_overflow() with mixed type arguments +To: stable@vger.kernel.org +Cc: Jan Kara +Message-ID: +Content-Disposition: inline + +From: Ben Hutchings + +Commit ebbe26fd54a9 "udf: Avoid excessive partition lengths" +introduced a use of check_add_overflow() with argument types u32, +size_t, and u32 *. + +This was backported to the 5.x stable branches, where in 64-bit +configurations it results in a build error (with older compilers) or a +warning. Before commit d219d2a9a92e "overflow: Allow mixed type +arguments", which went into Linux 6.1, mixed type arguments are not +supported. That cannot be backported to 5.4 or 5.10 as it would raise +the minimum compiler version for these kernel versions. + +Add a cast to make the argument types compatible. + +Fixes: 1497a4484cdb ("udf: Avoid excessive partition lengths") +Fixes: 551966371e17 ("udf: Avoid excessive partition lengths") +Signed-off-by: Ben Hutchings +Signed-off-by: Greg Kroah-Hartman +--- + fs/udf/super.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/udf/super.c ++++ b/fs/udf/super.c +@@ -1160,7 +1160,7 @@ static int udf_fill_partdesc_info(struct + map->s_partition_flags |= UDF_PART_FLAG_UNALLOC_BITMAP; + /* Check whether math over bitmap won't overflow. */ + if (check_add_overflow(map->s_partition_len, +- sizeof(struct spaceBitmapDesc) << 3, ++ (u32)(sizeof(struct spaceBitmapDesc) << 3), + &sum)) { + udf_err(sb, "Partition %d is too long (%u)\n", p_index, + map->s_partition_len);