The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Artem Novak <artem122novak@gmail.com>
Cc: minchan@kernel.org, senozhatsky@chromium.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 10:19:14 +0900	[thread overview]
Message-ID: <awjaHB2ugCG_F3Io@google.com> (raw)
In-Reply-To: <20261127004411.109585-1-artem122novak@gmail.com>

On (26/11/26 18:44), Artem Novak wrote:
[..]
> @@ -185,6 +185,8 @@ int zcomp_decompress(struct zcomp *comp, struct zcomp_strm *zstrm,
>  	ret = comp->ops->decompress(comp->params, &zstrm->ctx, &req);
>  	if (src)
>  		kunmap_local(src);
> +	if (!ret && req.dst_len != PAGE_SIZE)
> +		ret = -EINVAL;
>  	return ret;
>  }

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.

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

Thread overview: 3+ 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 [this message]
2026-11-27  1:34   ` 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=awjaHB2ugCG_F3Io@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