perf cs-etm: Add missing variable in cs_etm__process_queues()
PATCH 1/2 perf cs-etm: Add missing variable in cs_etm__process_queues()
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.
--- tools/perf/util/cs-etm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/cs-etm.c +1 -1
@@ -2171,7 +2171,7 @@ static int cs_etm__process_timeless_queues(struct cs_etm_auxtrace *etm,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;
PATCH 2/2 udf: Fix use of check_add_overflow() with mixed type arguments
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.
--- fs/udf/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/udf/super.c +1 -1
@@ -1153,7 +1153,7 @@ static int udf_fill_partdesc_info(struct super_block *sb, 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);
Re: [PATCH 5.4,5.10 2/2] udf: Fix use of check_add_overflow() with mixed type arguments
Quoted 10 lines · Ben Hutchings
Commit
ebbe26fd54a9"udf: Avoid excessive partition lengths" introduced a use ofcheck_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.
[....]
And for 5.15, I think it should be safe to backport commit d219d2a9a92e. Otherwise this patch should be applied to fix the warning there.
Ben.
Signature · 2 lines
Ben Hutchings - Debian developer, member of kernel, installer and LTS teams
Greg KH
maintainerRe: [PATCH 5.4,5.10 2/2] udf: Fix use of check_add_overflow() with mixed type arguments
Quoted 11 lines · Ben Hutchings
Quoted 10 lines · Ben Hutchings
Commit
ebbe26fd54a9"udf: Avoid excessive partition lengths" introduced a use ofcheck_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.
Quoted 5 lines
[....]
And for 5.15, I think it should be safe to backport commit
d219d2a9a92e. Otherwise this patch should be applied to fix the warning there.
I'll take either, whch do you want us to do?
thanks,
greg k-h
Re: [PATCH 5.4,5.10 2/2] udf: Fix use of check_add_overflow() with mixed type arguments
Quoted 12 lines · Greg KH
Quoted 11 lines · Ben Hutchings
Quoted 10 lines · Ben Hutchings
Commit
ebbe26fd54a9"udf: Avoid excessive partition lengths" introduced a use ofcheck_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.
Quoted 7 lines
Quoted 5 lines
[....]
And for 5.15, I think it should be safe to backport commit
d219d2a9a92e. Otherwise this patch should be applied to fix the warning there.I'll take either, whch do you want us to do?
Please apply commit d219d2a9a92e to 5.15.
Ben.
Signature · 2 lines
Ben Hutchings - Debian developer, member of kernel, installer and LTS teams
Greg KH
maintainerRe: [PATCH 5.4,5.10 2/2] udf: Fix use of check_add_overflow() with mixed type arguments
Quoted 15 lines · Ben Hutchings
Quoted 14 lines · Greg KH
Quoted 13 lines · Ben Hutchings
Quoted 10 lines · Ben Hutchings
Commit
ebbe26fd54a9"udf: Avoid excessive partition lengths" introduced a use ofcheck_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.[....]
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
And for 5.15, I think it should be safe to backport commit
d219d2a9a92e. Otherwise this patch should be applied to fix the warning there.I'll take either, whch do you want us to do?
Please apply commit
d219d2a9a92eto 5.15.
It showed up in the 5.15.149 release. Is there a portion of it missing there?
confused,
greg k-h
Sasha Levin
maintainerRe: [PATCH 5.4,5.10 2/2] udf: Fix use of check_add_overflow() with mixed type arguments
In reply to Ben Hutchings[ Sasha's backport helper bot ]
Hi,
Summary of potential issues:
ℹ️ This is part 2/2 of a series
⚠️ Could not find matching upstream commit
No upstream commit was identified. Using temporary commit for testing.
NOTE: These results are for this patch alone. Full series testing will be performed when all parts are received.
Results of testing on various branches:
| Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-5.4.y | Success | Success | | stable/linux-5.10.y | Success | Success |
Sasha Levin
maintainer[ Sasha's backport helper bot ]
Hi,
Summary of potential issues:
⚠️ Could not find matching upstream commit
No upstream commit was identified. Using temporary commit for testing.
Results of testing on various branches:
| Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-5.4.y | Success | Success |