From: Ilya Leoshkevich <iii@linux.ibm.com>
To: Mikhail Zaslonko <zaslonko@linux.ibm.com>,
Qu Wenruo <wqu@suse.com>, David Sterba <dsterba@suse.cz>,
linux-btrfs@vger.kernel.org
Cc: Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Heiko Carstens <hca@linux.ibm.com>,
linux-s390@vger.kernel.org
Subject: Re: [PATCH] btrfs: Fix avail_in bytes for s390 zlib HW compression path
Date: Thu, 12 Dec 2024 16:37:26 +0100 [thread overview]
Message-ID: <32b98d12e822557f23939a90dbaa091d9f8a4c97.camel@linux.ibm.com> (raw)
In-Reply-To: <20241212135000.1926110-1-zaslonko@linux.ibm.com>
On Thu, 2024-12-12 at 14:50 +0100, Mikhail Zaslonko wrote:
> Since the input data length passed to zlib_compress_folios() can be
> arbitrary, always setting strm.avail_in to a multiple of PAGE_SIZE
> may
> cause read-in bytes to exceed the input range. Currently this
> triggers
> an assert in btrfs_compress_folios() on the debug kernel. But it may
> potentially lead to data corruption.
> Fix strm.avail_in calculation for S390 hardware acceleration path.
>
> Signed-off-by: Mikhail Zaslonko <zaslonko@linux.ibm.com>
> Fixes: fd1e75d0105d ("btrfs: make compression path to be subpage
> compatible")
> ---
> fs/btrfs/zlib.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
next prev parent reply other threads:[~2024-12-12 15:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-12 13:50 [PATCH] btrfs: Fix avail_in bytes for s390 zlib HW compression path Mikhail Zaslonko
2024-12-12 15:37 ` Ilya Leoshkevich [this message]
2024-12-12 20:37 ` Qu Wenruo
2024-12-13 9:34 ` Zaslonko Mikhail
2024-12-13 9:42 ` Qu Wenruo
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=32b98d12e822557f23939a90dbaa091d9f8a4c97.camel@linux.ibm.com \
--to=iii@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=dsterba@suse.cz \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=wqu@suse.com \
--cc=zaslonko@linux.ibm.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