Linux Perf Users
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ivan Shapovalov" <intelfx@intelfx.name>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 1/4] perf: zstd: zstd_decompress_stream -> zstd_decompress_buffer
Date: Wed, 14 Oct 2026 17:38:36 +0000	[thread overview]
Message-ID: <sashiko-outbox-171580@kernel.org> (raw)
In-Reply-To: <20261014-perf-zstd-v1-1-9652727886fa@intelfx.name>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] perf: stale function name in comment for zstd_decompress_buffer
--

commit a8489356f2f1a85e8397e7dba79a95d1bfde0cb1
Author: Ivan Shapovalov <intelfx@intelfx.name>

perf: zstd: zstd_decompress_stream -> zstd_decompress_buffer

This commit renames zstd_decompress_stream() to zstd_decompress_buffer() to
free up the old name for an actual streaming decompression function.

> diff --git a/tools/perf/util/tool.c b/tools/perf/util/tool.c
> index 25c9b378aa163..d7956cd75c26d 100644
> --- a/tools/perf/util/tool.c
> +++ b/tools/perf/util/tool.c
[ ... ]
> @@ -92,15 +92,15 @@ static int perf_session__process_compressed_event(const struct perf_tool *tool _
>  		src = (void *)event + sizeof(struct perf_record_compressed2);
>  		src_size = event->pack2.data_size;
>  		/*
>  		 * data_size is independent of header.size (which
>  		 * includes padding); verify it doesn't exceed the
>  		 * actual payload to prevent out-of-bounds reads in
>  		 * zstd_decompress_stream().
>  		 */

[Severity: Low]
Could this comment in perf_session__process_compressed_event() be updated to
reference the renamed zstd_decompress_buffer() function?

Since the commit message indicates the old name will be reused for a different
function, leaving this stale comment could be confusing when the new function
is introduced.

>  		if (src_size > event->header.size - sizeof(struct perf_record_compressed2))
>  			goto err_decomp;
>  	} else {
>  		goto err_decomp;
>  	}
>  
> -	decomp_size = zstd_decompress_stream(session->active_decomp->zstd_decomp, src, src_size,
> +	decomp_size = zstd_decompress_buffer(session->active_decomp->zstd_decomp, src, src_size,
>  				&(decomp->data[decomp_last_rem]), decomp_len - decomp_last_rem);

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261014-perf-zstd-v1-0-9652727886fa@intelfx.name?part=1

  reply	other threads:[~2026-10-14 17:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14 17:34 [PATCH 0/4] perf: support zstd-compressed kernel modules Ivan Shapovalov
2026-10-14 17:34 ` [PATCH 1/4] perf: zstd: zstd_decompress_stream -> zstd_decompress_buffer Ivan Shapovalov
2026-10-14 17:38   ` sashiko-bot [this message]
2026-10-14 17:34 ` [PATCH 2/4] perf: zstd: factor out zstd_init_{c,d}stream() Ivan Shapovalov
2026-10-14 17:43   ` sashiko-bot
2026-10-14 17:34 ` [PATCH 3/4] perf: zstd: add streaming decompression and format probe functions Ivan Shapovalov
2026-10-14 17:51   ` sashiko-bot
2026-10-14 17:34 ` [PATCH 4/4] perf: support zstd-compressed kernel modules Ivan Shapovalov
2026-10-14 17:58   ` sashiko-bot

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=sashiko-outbox-171580@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=intelfx@intelfx.name \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox