From: sashiko-bot@kernel.org
To: "Ian Rogers" <irogers@google.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v3 2/2] perf python: treport add flamegraph support
Date: Sun, 09 Aug 2026 04:36:37 +0000 [thread overview]
Message-ID: <20260809043638.549B21F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260809041638.2402705-4-irogers@google.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Rich markup injection vulnerability from unescaped DSO/symbol names containing brackets.
--
--- Patch [2]: [PATCH v3 2/2] perf python: treport add flamegraph support ---
commit 0b23e0e4520eaa617a120b39e7e4595517aedb98
Author: Alice Rogers <alice.mei.rogers@gmail.com>
perf python: treport add flamegraph support
Implement a flamegraph widget that recursively walks down a tree
splitting line segments based on their value. A visitor pattern is used
so that the same logic can both draw the line segments and locate which
segment had a mouse click. Add a tab for the flame graph widget.
> diff --git a/tools/perf/python/treport.py b/tools/perf/python/treport.py
> index 528a640e4d356..ec3263a6b6257 100755
> --- a/tools/perf/python/treport.py
> +++ b/tools/perf/python/treport.py
[ ... ]
> @@ -120,6 +150,327 @@ class ProfileNode:
> key=lambda pnode: pnode.value, reverse=True):
> pnode.add_to_tree(new_node, root_value)
[Severity: Medium]
Will this crash the TUI application when handling typical perf traces?
Looking at ProfileNode.add_to_tree(), self.name is embedded directly into a
formatted string alongside rich style tags:
if root_value != 0:
percent = self.value / root_value * 100
label = f"{self.name} [r]{percent:.3g}%[/]"
Since perf trace data heavily uses brackets for kernel threads (e.g.,
[kworker/0:1]), DSOs (e.g., [kernel.kallsyms]), or placeholders like
[unknown], the Textual Tree widget's rich parser may intercept these as
unclosed or invalid markup tags.
Does this unescaped input trigger a fatal rich.errors.MarkupError when
constructing the Tree widget?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260809041638.2402705-1-irogers@google.com?part=2
next prev parent reply other threads:[~2026-08-09 4:36 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-25 8:24 [PATCH v1 1/2] perf script: New treport script Ian Rogers
2025-07-25 8:24 ` [PATCH v1 2/2] perf script: treport add flamegraph support Ian Rogers
2025-07-25 8:38 ` Ian Rogers
2026-08-08 6:57 ` [PATCH v2 0/2] perf python TUI report and flamegraph Ian Rogers
2026-08-08 6:57 ` [PATCH v2 1/2] perf python: New treport script Ian Rogers
2026-08-08 7:13 ` sashiko-bot
2026-08-08 6:57 ` [PATCH v2 2/2] perf python: treport add flamegraph support Ian Rogers
2026-08-09 4:16 ` [PATCH v3 0/2] perf python TUI report and flamegraph Ian Rogers
2026-08-09 4:16 ` [PATCH v3 1/2] perf python: New treport script Ian Rogers
2026-08-09 4:29 ` sashiko-bot
2026-08-09 4:16 ` [PATCH v3] perf test: Fixes for check branch stack sampling Ian Rogers
2026-08-09 5:21 ` Ian Rogers
2026-08-09 4:16 ` [PATCH v3 2/2] perf python: treport add flamegraph support Ian Rogers
2026-08-09 4:36 ` sashiko-bot [this message]
2026-08-09 5:18 ` [PATCH v4 0/2] perf python TUI report and flamegraph Ian Rogers
2026-08-09 5:18 ` [PATCH v4 1/2] perf python: New treport script Ian Rogers
2026-08-09 5:18 ` [PATCH v4 2/2] perf python: treport add flamegraph support Ian Rogers
2025-07-26 6:43 ` [PATCH v1 2/2] perf script: " Namhyung Kim
2025-07-26 6:39 ` [PATCH v1 1/2] perf script: New treport script Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260809043638.549B21F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=irogers@google.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.