mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Suseendran Bhaskaran <suseendranb@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
	Yosry Ahmed <yosry@kernel.org>, Nhat Pham <nphamcs@gmail.com>,
	Chengming Zhou <chengming.zhou@linux.dev>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/zswap: validate dlen and normalize comp_ret on compression success
Date: Fri, 23 Oct 2026 16:21:00 -0700	[thread overview]
Message-ID: <20261023162100.41145a57fb91ed1073c24c41@linux-foundation.org> (raw)
In-Reply-To: <20261023200426.3865221-1-suseendranb@google.com>

On Fri, 23 Oct 2026 20:04:26 +0000 Suseendran Bhaskaran <suseendranb@google.com> wrote:

> > Wht you forgot to tell us (please never forget this) is the
> > userspace-visible runtime effects of the bug.  Autobot says:
> >
> > : The userspace-visible effects are limited to corrected zswap
> > : statistics and a new warning for invalid compressor results.
> > :
> > : When compression succeeds but produces exactly PAGE_SIZE bytes, and
> > : zswap writeback is disabled, the page is rejected as before. However,
> > : reject_compress_poor now increments instead of reject_compress_fail.
> > : This makes the debugfs statistics distinguish incompressible pages
> > : from actual compressor failures more accurately.
> > :
> > : A compressor which reports success with a zero or oversized output
> > : length will now trigger WARN_ON_ONCE(). Previously, zswap handled
> > : these results without a warning. On systems with panic_on_warn
> > : enabled, this could cause a kernel panic.
> > :
> > : There is no intended change to which pages zswap accepts, rejects
> > : or stores uncompressed, nor to normal application behavior.
> > :
> > : I think these runtime effects should be described more prominently
> > : in the changelog, particularly the new warning.
> 
> Apologies for missing the userspace-visible runtime impact in the commit
> description. I will make sure to always include this going forward.
> Autobot is spot-on here. I would be happy to send a v2 with an updated
> commit message that clearly documents these runtime effects and
> behavioral changes.

I'm mainly interested in answering "should we backport this into
-stable kernels?".  A small debugfs accounting error is probably a
"no", but a WARN is "yes".  Is that real?  Can current kernels truly
emit WARNs due to this issue?

If so then yup, please send along a new changelog.  Or a v2 with a new
changelog.

  reply	other threads:[~2026-10-23 23:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-22 23:27 Suseendran Bhaskaran
2026-10-23 15:07 ` Yosry Ahmed
2026-10-23 17:26 ` Andrew Morton
2026-10-23 20:04   ` Suseendran Bhaskaran
2026-10-23 23:21     ` Andrew Morton [this message]
2026-10-23 23:36       ` Yosry Ahmed
2026-10-23 23:57 ` SJ Park

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=20261023162100.41145a57fb91ed1073c24c41@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=chengming.zhou@linux.dev \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nphamcs@gmail.com \
    --cc=suseendranb@google.com \
    --cc=yosry@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

all inboxes | Powered by JetHome®