linux-hardening.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ardb@kernel.org>
To: Kees Cook <kees@kernel.org>
Cc: linux-hardening@vger.kernel.org,
	Kees Cook <keescook@chromium.org>,
	"Guilherme G. Piccoli" <gpiccoli@igalia.com>
Subject: Re: [PATCH 2/2] pstore: Replace crypto API compression with zlib_deflate library calls
Date: Tue, 4 Jul 2023 18:56:51 +0200	[thread overview]
Message-ID: <CAMj1kXGW0kZdSfnNM7oMNt+0Ois8NJS4ZwHmrcvrOP1vRdUa2g@mail.gmail.com> (raw)
In-Reply-To: <D690FB7B-BE46-4A56-9BDE-AB84652997D3@kernel.org>

On Tue, 4 Jul 2023 at 18:48, Kees Cook <kees@kernel.org> wrote:
>
> On July 4, 2023 6:52:11 AM PDT, Ard Biesheuvel <ardb@kernel.org> wrote:
> >@@ -217,10 +220,6 @@ static void allocate_buf_for_compression(void)
> >
> > static void free_buf_for_compression(void)
> > {
> >-      if (IS_ENABLED(CONFIG_PSTORE_COMPRESS) && tfm) {
> >-              crypto_free_comp(tfm);
> >-              tfm = NULL;
> >-      }
> >       kfree(big_oops_buf);
> >       big_oops_buf = NULL;
> >       big_oops_buf_sz = 0;
>
> I think this is missing a free of compress_workspace?

Indeed.

> Everything else looks great! What kind of testing did you do for this series?

I tested it using lkdtm PANIC in a arm64 vm, and after a reboot,
checking the contents of /sys/fs/pstore, and all looked as expected.

  reply	other threads:[~2023-07-04 16:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-04 13:52 [PATCH 0/2] pstore: Replace crypto API compression with zlib calls Ard Biesheuvel
2023-07-04 13:52 ` [PATCH 1/2] pstore: Remove worst-case compression size logic Ard Biesheuvel
2023-07-04 18:07   ` Eric Biggers
2023-07-04 13:52 ` [PATCH 2/2] pstore: Replace crypto API compression with zlib_deflate library calls Ard Biesheuvel
2023-07-04 16:48   ` Kees Cook
2023-07-04 16:56     ` Ard Biesheuvel [this message]
2023-07-04 18:31   ` Eric Biggers
2023-07-04 16:08 ` [PATCH 0/2] pstore: Replace crypto API compression with zlib calls Kees Cook
2023-07-04 18:30 ` Guilherme G. Piccoli

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=CAMj1kXGW0kZdSfnNM7oMNt+0Ois8NJS4ZwHmrcvrOP1vRdUa2g@mail.gmail.com \
    --to=ardb@kernel.org \
    --cc=gpiccoli@igalia.com \
    --cc=kees@kernel.org \
    --cc=keescook@chromium.org \
    --cc=linux-hardening@vger.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;
as well as URLs for NNTP newsgroup(s).