* FAILED: patch "[PATCH] scripts/decode_stacktrace.sh: fix build ID and PC source" failed to apply to 6.17-stable tree
@ 2025-11-20 15:56 gregkh
2025-11-20 17:28 ` Carlos Llamas
0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2025-11-20 15:56 UTC (permalink / raw)
To: cmllamas, akpm, broonie, catalin.marinas, leitao, luca.ceresoli,
mark.rutland, matttbe, mbenes, puranjay, stable
Cc: stable
The patch below does not apply to the 6.17-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.17.y
git checkout FETCH_HEAD
git cherry-pick -x 7d9f7d390f6af3a29614e81e802e2b9c238eb7b2
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2025112031-catalyze-sleep-ba6e@gregkh' --subject-prefix 'PATCH 6.17.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 7d9f7d390f6af3a29614e81e802e2b9c238eb7b2 Mon Sep 17 00:00:00 2001
From: Carlos Llamas <cmllamas@google.com>
Date: Thu, 30 Oct 2025 01:03:33 +0000
Subject: [PATCH] scripts/decode_stacktrace.sh: fix build ID and PC source
parsing
Support for parsing PC source info in stacktraces (e.g. '(P)') was added
in commit 2bff77c665ed ("scripts/decode_stacktrace.sh: fix decoding of
lines with an additional info"). However, this logic was placed after the
build ID processing. This incorrect order fails to parse lines containing
both elements, e.g.:
drm_gem_mmap_obj+0x114/0x200 [drm 03d0564e0529947d67bb2008c3548be77279fd27] (P)
This patch fixes the problem by extracting the PC source info first and
then processing the module build ID. With this change, the line above is
now properly parsed as such:
drm_gem_mmap_obj (./include/linux/mmap_lock.h:212 ./include/linux/mm.h:811 drivers/gpu/drm/drm_gem.c:1177) drm (P)
While here, also add a brief explanation the build ID section.
Link: https://lkml.kernel.org/r/20251030010347.2731925-1-cmllamas@google.com
Fixes: 2bff77c665ed ("scripts/decode_stacktrace.sh: fix decoding of lines with an additional info")
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Cc: Breno Leitao <leitao@debian.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marc Rutland <mark.rutland@arm.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Matthieu Baerts <matttbe@kernel.org>
Cc: Miroslav Benes <mbenes@suse.cz>
Cc: Puranjay Mohan <puranjay@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
diff --git a/scripts/decode_stacktrace.sh b/scripts/decode_stacktrace.sh
index c73cb802a0a3..8d01b741de62 100755
--- a/scripts/decode_stacktrace.sh
+++ b/scripts/decode_stacktrace.sh
@@ -277,12 +277,6 @@ handle_line() {
fi
done
- if [[ ${words[$last]} =~ ^[0-9a-f]+\] ]]; then
- words[$last-1]="${words[$last-1]} ${words[$last]}"
- unset words[$last] spaces[$last]
- last=$(( $last - 1 ))
- fi
-
# Extract info after the symbol if present. E.g.:
# func_name+0x54/0x80 (P)
# ^^^
@@ -295,6 +289,14 @@ handle_line() {
last=$(( $last - 1 ))
fi
+ # Join module name with its build id if present, as these were
+ # split during tokenization (e.g. "[module" and "modbuildid]").
+ if [[ ${words[$last]} =~ ^[0-9a-f]+\] ]]; then
+ words[$last-1]="${words[$last-1]} ${words[$last]}"
+ unset words[$last] spaces[$last]
+ last=$(( $last - 1 ))
+ fi
+
if [[ ${words[$last]} =~ \[([^]]+)\] ]]; then
module=${words[$last]}
# some traces format is "(%pS)", which like "(foo+0x0/0x1 [bar])"
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: FAILED: patch "[PATCH] scripts/decode_stacktrace.sh: fix build ID and PC source" failed to apply to 6.17-stable tree
2025-11-20 15:56 FAILED: patch "[PATCH] scripts/decode_stacktrace.sh: fix build ID and PC source" failed to apply to 6.17-stable tree gregkh
@ 2025-11-20 17:28 ` Carlos Llamas
2025-11-21 9:47 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Carlos Llamas @ 2025-11-20 17:28 UTC (permalink / raw)
To: gregkh
Cc: akpm, broonie, catalin.marinas, leitao, luca.ceresoli,
mark.rutland, matttbe, mbenes, puranjay, stable
On Thu, Nov 20, 2025 at 04:56:31PM +0100, gregkh@linuxfoundation.org wrote:
>
> The patch below does not apply to the 6.17-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.
>
> To reproduce the conflict and resubmit, you may use the following commands:
>
> git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.17.y
> git checkout FETCH_HEAD
> git cherry-pick -x 7d9f7d390f6af3a29614e81e802e2b9c238eb7b2
> # <resolve conflicts, build, test, etc.>
> git commit -s
> git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2025112031-catalyze-sleep-ba6e@gregkh' --subject-prefix 'PATCH 6.17.y' HEAD^..
>
> Possible dependencies:
The dependencies I missed to specify are the following 2 fixes:
d322f6a24ee5 ("scripts/decode_stacktrace.sh: symbol: avoid trailing whitespaces")
4a2fc4897b5e ("scripts/decode_stacktrace.sh: symbol: preserve alignment")
They apply cleanly on top of linux-6.17.y:
git cherry-pick -xs d322f6a24ee5 4a2fc4897b5e 7d9f7d390f6a
I've also verified the expected fixes work for all 3 patches.
Greg, do you need me to send these?
--
Carlos Llamas
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: FAILED: patch "[PATCH] scripts/decode_stacktrace.sh: fix build ID and PC source" failed to apply to 6.17-stable tree
2025-11-20 17:28 ` Carlos Llamas
@ 2025-11-21 9:47 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2025-11-21 9:47 UTC (permalink / raw)
To: Carlos Llamas
Cc: akpm, broonie, catalin.marinas, leitao, luca.ceresoli,
mark.rutland, matttbe, mbenes, puranjay, stable
On Thu, Nov 20, 2025 at 05:28:55PM +0000, Carlos Llamas wrote:
> On Thu, Nov 20, 2025 at 04:56:31PM +0100, gregkh@linuxfoundation.org wrote:
> >
> > The patch below does not apply to the 6.17-stable tree.
> > If someone wants it applied there, or to any other stable or longterm
> > tree, then please email the backport, including the original git commit
> > id to <stable@vger.kernel.org>.
> >
> > To reproduce the conflict and resubmit, you may use the following commands:
> >
> > git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.17.y
> > git checkout FETCH_HEAD
> > git cherry-pick -x 7d9f7d390f6af3a29614e81e802e2b9c238eb7b2
> > # <resolve conflicts, build, test, etc.>
> > git commit -s
> > git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2025112031-catalyze-sleep-ba6e@gregkh' --subject-prefix 'PATCH 6.17.y' HEAD^..
> >
> > Possible dependencies:
>
> The dependencies I missed to specify are the following 2 fixes:
> d322f6a24ee5 ("scripts/decode_stacktrace.sh: symbol: avoid trailing whitespaces")
> 4a2fc4897b5e ("scripts/decode_stacktrace.sh: symbol: preserve alignment")
>
> They apply cleanly on top of linux-6.17.y:
> git cherry-pick -xs d322f6a24ee5 4a2fc4897b5e 7d9f7d390f6a
>
> I've also verified the expected fixes work for all 3 patches.
>
> Greg, do you need me to send these?
Nope, that worked, thanks!
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-11-21 9:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-20 15:56 FAILED: patch "[PATCH] scripts/decode_stacktrace.sh: fix build ID and PC source" failed to apply to 6.17-stable tree gregkh
2025-11-20 17:28 ` Carlos Llamas
2025-11-21 9:47 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.