* [PATCH 5.4,4.10 1/2] perf cs-etm: Add missing variable in cs_etm__process_queues()
@ 2025-02-24 15:57 Ben Hutchings
2025-02-24 16:00 ` [PATCH 5.4,5.10 2/2] udf: Fix use of check_add_overflow() with mixed type arguments Ben Hutchings
2025-02-25 16:13 ` [PATCH 5.4,4.10 1/2] perf cs-etm: Add missing variable in cs_etm__process_queues() Sasha Levin
0 siblings, 2 replies; 8+ messages in thread
From: Ben Hutchings @ 2025-02-24 15:57 UTC (permalink / raw)
To: stable; +Cc: James Clark
[-- Attachment #1: Type: text/plain, Size: 1065 bytes --]
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 <benh@debian.org>
---
tools/perf/util/cs-etm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
index e3fa32b83367..2055d582a8a4 100644
--- a/tools/perf/util/cs-etm.c
+++ b/tools/perf/util/cs-etm.c
@@ -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;
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5.4,5.10 2/2] udf: Fix use of check_add_overflow() with mixed type arguments
2025-02-24 15:57 [PATCH 5.4,4.10 1/2] perf cs-etm: Add missing variable in cs_etm__process_queues() Ben Hutchings
@ 2025-02-24 16:00 ` Ben Hutchings
2025-02-24 22:28 ` Ben Hutchings
2025-02-25 16:13 ` Sasha Levin
2025-02-25 16:13 ` [PATCH 5.4,4.10 1/2] perf cs-etm: Add missing variable in cs_etm__process_queues() Sasha Levin
1 sibling, 2 replies; 8+ messages in thread
From: Ben Hutchings @ 2025-02-24 16:00 UTC (permalink / raw)
To: stable; +Cc: Jan Kara
[-- Attachment #1: Type: text/plain, Size: 1426 bytes --]
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 <benh@debian.org>
---
fs/udf/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/udf/super.c b/fs/udf/super.c
index ae75df43d51c..8dae5e73a00b 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -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);
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 5.4,5.10 2/2] udf: Fix use of check_add_overflow() with mixed type arguments
2025-02-24 16:00 ` [PATCH 5.4,5.10 2/2] udf: Fix use of check_add_overflow() with mixed type arguments Ben Hutchings
@ 2025-02-24 22:28 ` Ben Hutchings
2025-03-10 16:29 ` Greg KH
2025-02-25 16:13 ` Sasha Levin
1 sibling, 1 reply; 8+ messages in thread
From: Ben Hutchings @ 2025-02-24 22:28 UTC (permalink / raw)
To: stable; +Cc: Jan Kara
[-- Attachment #1: Type: text/plain, Size: 874 bytes --]
On Mon, 2025-02-24 at 17:00 +0100, Ben Hutchings wrote:
> 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.
[....]
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.
--
Ben Hutchings - Debian developer, member of kernel, installer and LTS
teams
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 5.4,5.10 2/2] udf: Fix use of check_add_overflow() with mixed type arguments
2025-02-24 16:00 ` [PATCH 5.4,5.10 2/2] udf: Fix use of check_add_overflow() with mixed type arguments Ben Hutchings
2025-02-24 22:28 ` Ben Hutchings
@ 2025-02-25 16:13 ` Sasha Levin
1 sibling, 0 replies; 8+ messages in thread
From: Sasha Levin @ 2025-02-25 16:13 UTC (permalink / raw)
To: stable, benh; +Cc: Sasha Levin
[ 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 |
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 5.4,4.10 1/2] perf cs-etm: Add missing variable in cs_etm__process_queues()
2025-02-24 15:57 [PATCH 5.4,4.10 1/2] perf cs-etm: Add missing variable in cs_etm__process_queues() Ben Hutchings
2025-02-24 16:00 ` [PATCH 5.4,5.10 2/2] udf: Fix use of check_add_overflow() with mixed type arguments Ben Hutchings
@ 2025-02-25 16:13 ` Sasha Levin
1 sibling, 0 replies; 8+ messages in thread
From: Sasha Levin @ 2025-02-25 16:13 UTC (permalink / raw)
To: stable, benh; +Cc: Sasha Levin
[ 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 |
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 5.4,5.10 2/2] udf: Fix use of check_add_overflow() with mixed type arguments
2025-02-24 22:28 ` Ben Hutchings
@ 2025-03-10 16:29 ` Greg KH
2025-03-11 17:00 ` Ben Hutchings
0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2025-03-10 16:29 UTC (permalink / raw)
To: Ben Hutchings; +Cc: stable, Jan Kara
On Mon, Feb 24, 2025 at 11:28:22PM +0100, Ben Hutchings wrote:
> On Mon, 2025-02-24 at 17:00 +0100, Ben Hutchings wrote:
> > 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.
> [....]
>
> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 5.4,5.10 2/2] udf: Fix use of check_add_overflow() with mixed type arguments
2025-03-10 16:29 ` Greg KH
@ 2025-03-11 17:00 ` Ben Hutchings
2025-03-13 15:42 ` Greg KH
0 siblings, 1 reply; 8+ messages in thread
From: Ben Hutchings @ 2025-03-11 17:00 UTC (permalink / raw)
To: Greg KH; +Cc: stable, Jan Kara
[-- Attachment #1: Type: text/plain, Size: 1152 bytes --]
On Mon, 2025-03-10 at 17:29 +0100, Greg KH wrote:
> On Mon, Feb 24, 2025 at 11:28:22PM +0100, Ben Hutchings wrote:
> > On Mon, 2025-02-24 at 17:00 +0100, Ben Hutchings wrote:
> > > 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.
> > [....]
> >
> > 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.
--
Ben Hutchings - Debian developer, member of kernel, installer and LTS
teams
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 5.4,5.10 2/2] udf: Fix use of check_add_overflow() with mixed type arguments
2025-03-11 17:00 ` Ben Hutchings
@ 2025-03-13 15:42 ` Greg KH
0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2025-03-13 15:42 UTC (permalink / raw)
To: Ben Hutchings; +Cc: stable, Jan Kara
On Tue, Mar 11, 2025 at 06:00:58PM +0100, Ben Hutchings wrote:
> On Mon, 2025-03-10 at 17:29 +0100, Greg KH wrote:
> > On Mon, Feb 24, 2025 at 11:28:22PM +0100, Ben Hutchings wrote:
> > > On Mon, 2025-02-24 at 17:00 +0100, Ben Hutchings wrote:
> > > > 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.
> > > [....]
> > >
> > > 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.
It showed up in the 5.15.149 release. Is there a portion of it missing
there?
confused,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-03-13 15:42 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-24 15:57 [PATCH 5.4,4.10 1/2] perf cs-etm: Add missing variable in cs_etm__process_queues() Ben Hutchings
2025-02-24 16:00 ` [PATCH 5.4,5.10 2/2] udf: Fix use of check_add_overflow() with mixed type arguments Ben Hutchings
2025-02-24 22:28 ` Ben Hutchings
2025-03-10 16:29 ` Greg KH
2025-03-11 17:00 ` Ben Hutchings
2025-03-13 15:42 ` Greg KH
2025-02-25 16:13 ` Sasha Levin
2025-02-25 16:13 ` [PATCH 5.4,4.10 1/2] perf cs-etm: Add missing variable in cs_etm__process_queues() Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox