Linux block layer
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Artem Novak <artem122novak@gmail.com>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
	minchan@kernel.org,  axboe@kernel.dk,
	linux-kernel@vger.kernel.org, linux-block@vger.kernel.org
Subject: Re: [PATCH] zram: validate decompressed page size
Date: Fri, 27 Nov 2026 11:10:51 +0900	[thread overview]
Message-ID: <awjlpLnyVmKRqhmQ@google.com> (raw)
In-Reply-To: <CAPufuhb9txcosy48VXtfxwnC7Ct448J=_HbR00JnZR1QG-NfHg@mail.gmail.com>

Hi Artem,

On (26/11/26 19:34), Artem Novak wrote:
> Hey Sergey,
> 
> On Thu, Nov 26, 2026 at 7:19 PM Sergey Senozhatsky
> <senozhatsky@chromium.org> wrote:
> > Yeah, I don't think we should do this.  We only ever compress PAGE_SIZE
> > buffers, if some backend decompresses it to a something that is not
> > PAGE_SIZE and doesn't signal an error via "ret" then it's a bug in the
> > backend and zram should not cover it up.
> 
> I see.
> 
> I thought it might be worth having a defensive check here,
> since allowing an incorrectly sized result to propagate seems a bit sloppy.
> 
> Do you consider this useful, or should I rely completely on the
> backend contract?

I would probably prefer to do nothing about it, IOW rely on the
backend contract.  Most of those compression libraries are used
in other places in the kernel (f2fs, squashfs, etc. etc.), zram
is not the only one to rely on them.

  reply	other threads:[~2026-11-27  2:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27  0:44 [PATCH] zram: validate decompressed page size Artem Novak
2026-11-27  1:19 ` Sergey Senozhatsky
2026-11-27  1:34   ` Artem Novak
2026-11-27  2:10     ` Sergey Senozhatsky [this message]
2026-11-27  2:41       ` Artem Novak

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=awjlpLnyVmKRqhmQ@google.com \
    --to=senozhatsky@chromium.org \
    --cc=artem122novak@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minchan@kernel.org \
    /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