Re: [PATCH v3 2/2] tracing: Bound histogram expression strings with seq_buf
From: Steven Rostedt
Date: Fri May 15 2026 - 12:46:54 EST
On Fri, 17 Apr 2026 20:28:00 +0800
Pengpeng Hou <pengpeng@xxxxxxxxxxx> wrote:
> expr_str() allocates a fixed MAX_FILTER_STR_VAL buffer and then builds
> expression names with a series of raw strcat() appends. Nested operands,
> constants and field flags can push the rendered string past that fixed
> limit before the name is attached to the hist field.
>
> Build the expression strings with seq_buf and return -E2BIG when the
> rendered name would exceed MAX_FILTER_STR_VAL.
>
> Signed-off-by: Pengpeng Hou <pengpeng@xxxxxxxxxxx>
> ---
Things have changed and this no longer applies cleanly. Can you send a v3
rebased on top of v7.1-rc3.
Also, make sure it's a new thread and not a reply to this patch series.
You can add a
Changes since v3: https://lore.kernel.org/all/20260417223002.2-tracing-expr-v3-pengpeng@xxxxxxxxxxx/
to that patch too.
-- Steve
> Changes since v2:
> - split the ERR_PTR() conversion into patch 1/2 as requested by Steven
> Rostedt
> - keep this patch focused on the seq_buf conversion and overflow
> detection
>