From: Petr Pavlu <petr.pavlu@suse.com>
To: Paul Menzel <pmenzel@molgen.mpg.de>
Cc: Luis Chamberlain <mcgrof@kernel.org>,
Daniel Gomez <da.gomez@kernel.org>,
Sami Tolvanen <samitolvanen@google.com>,
Aaron Tomlin <atomlin@atomlin.com>,
Nick Terrell <terrelln@fb.com>, David Sterba <dsterba@suse.com>,
Piotr Gorski <lucjan.lucjanov@gmail.com>,
Stephen Boyd <swboyd@chromium.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] module/decompress: Use ssize_t for the zstd decompressed size
Date: Wed, 18 Nov 2026 15:25:32 +0100 [thread overview]
Message-ID: <6f402ad7-8d8b-44aa-8333-0c647a9dc295@suse.com> (raw)
In-Reply-To: <20261115145559.262878-1-pmenzel@molgen.mpg.de>
On 11/15/26 3:55 PM, Paul Menzel wrote:
> module_zstd_decompress() returns ssize_t, but keeps the decompressed
> size in the int retval. Output of 2 GiB or more becomes a negative
> value that is not an errno, and output of 4 GiB or more can also be
> truncated to a positive size smaller than the pages mapped to
> info->hdr. Declare retval as ssize_t like module_gzip_decompress() and
> module_xz_decompress() do, and print it with %zd.
>
> The Sashiko AI review found the same bug in the proposed LZ4 decoder,
> which is modelled on the zstd decoder [1].
>
> The x86_64 build boots in QEMU/KVM, and finit_module() with
> MODULE_INIT_COMPRESSED_FILE and module.sig_enforce=1 decompresses the
> 237 .ko.zst modules without error.
>
> Fixes: 169a58ad824d ("module/decompress: Support zstd in-kernel decompression")
> Link: https://sashiko.dev/#/patchset/20261113144233.193782-1-pmenzel@molgen.mpg.de?part=1 [1]
> Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Looks ok to me. I've slightly simplified the commit description and
queued the patch on modules-next.
--
Thanks,
Petr
prev parent reply other threads:[~2026-11-18 14:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-15 14:55 Paul Menzel
2026-11-15 17:44 ` Bradley Morgan
2026-11-18 14:25 ` Petr Pavlu [this message]
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=6f402ad7-8d8b-44aa-8333-0c647a9dc295@suse.com \
--to=petr.pavlu@suse.com \
--cc=atomlin@atomlin.com \
--cc=da.gomez@kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=dsterba@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=lucjan.lucjanov@gmail.com \
--cc=mcgrof@kernel.org \
--cc=pmenzel@molgen.mpg.de \
--cc=samitolvanen@google.com \
--cc=swboyd@chromium.org \
--cc=terrelln@fb.com \
/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
all inboxes | Powered by JetHome®