linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: "Guilherme G. Piccoli" <gpiccoli@igalia.com>
Cc: Ard Biesheuvel <ardb@kernel.org>,
	linux-kernel@vger.kernel.org, regressions@lists.linux.dev,
	linux-fsdevel@vger.kernel.org, kernel-dev@igalia.com,
	kernel@gpiccoli.net, Anton Vorontsov <anton@enomsg.org>,
	Colin Cross <ccross@android.com>, Tony Luck <tony.luck@intel.com>,
	Thorsten Leemhuis <linux@leemhuis.info>
Subject: Re: [REGRESSION][PATCH] Revert "pstore: migrate to crypto acomp interface"
Date: Fri, 30 Sep 2022 12:08:42 -0700	[thread overview]
Message-ID: <202209301207.66D6069757@keescook> (raw)
In-Reply-To: <101050d9-e3ec-8c21-5fb6-68442f51b39f@igalia.com>

On Fri, Sep 30, 2022 at 03:31:17PM -0300, Guilherme G. Piccoli wrote:
> On 30/09/2022 12:51, Ard Biesheuvel wrote:
> > [...]
> > 
> > Does this help?
> > 
> > diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
> > index b2fd3c20e7c2..c0b609d7d04e 100644
> > --- a/fs/pstore/platform.c
> > +++ b/fs/pstore/platform.c
> > @@ -292,7 +292,7 @@ static int pstore_compress(const void *in, void *out,
> >                 return ret;
> >         }
> > 
> > -       return outlen;
> > +       return creq->dlen;
> >  }
> > 
> >  static void allocate_buf_for_compression(void)
> > 
> 
> Thanks a lot Ard, this seems to be the fix! Tested with lz4/zstd/deflate
> in both ramoops/efi backends, and all worked fine. It makes sense,
> outlen was modified in the previous API and not in the acomp thing, so
> it was a good catch =)
> 
> 
> >> Heheh you're right! But for something like this (pstore/dmesg
> >> compression broke for the most backends), I'd be glad if we could fix it
> >> before the release.
> > 
> > Yeah better to revert - this was not a critical change anyway. But I
> > think the tweak above should fix things (it works for me here)
> 
> Agreed - in fact seems it was reverted already. More than that, I found
> yet another small issue in the acomp refactor, a memory leak - attached
> is a patch with the fix, feel free to integrate in your acomp refactor
> when re-submitting (I mean, feel free to just integrate the code, don't
> need to send it as a separate patch/fix).
> 
> I'm also working some fixes in implicit conversions in pstore that
> aren't great (unsigned -> int in many places), I'll send some stuff next
> week.

Awesome! Thank you both! I'll probably be busy for the next week with
the merge window, but after that I'll pull new stuff into -next for
pstore. I appreciate more people poking around in the code. :)

-- 
Kees Cook

  reply	other threads:[~2022-09-30 19:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29 21:55 [REGRESSION][PATCH] Revert "pstore: migrate to crypto acomp interface" Guilherme G. Piccoli
2022-09-30  3:29 ` Kees Cook
2022-09-30 12:39   ` Guilherme G. Piccoli
2022-09-30 15:51     ` Ard Biesheuvel
2022-09-30 18:31       ` Guilherme G. Piccoli
2022-09-30 19:08         ` Kees Cook [this message]
2022-09-30 12:03 ` [REGRESSION][PATCH] Revert "pstore: migrate to crypto acomp interface" #forregzbot Thorsten Leemhuis

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=202209301207.66D6069757@keescook \
    --to=keescook@chromium.org \
    --cc=anton@enomsg.org \
    --cc=ardb@kernel.org \
    --cc=ccross@android.com \
    --cc=gpiccoli@igalia.com \
    --cc=kernel-dev@igalia.com \
    --cc=kernel@gpiccoli.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@leemhuis.info \
    --cc=regressions@lists.linux.dev \
    --cc=tony.luck@intel.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;
as well as URLs for NNTP newsgroup(s).