lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 30 Sep 2022 15:31:17 -0300
From:   "Guilherme G. Piccoli" <gpiccoli@...lia.com>
To:     Ard Biesheuvel <ardb@...nel.org>, Kees Cook <keescook@...omium.org>
Cc:     linux-kernel@...r.kernel.org, regressions@...ts.linux.dev,
        linux-fsdevel@...r.kernel.org, kernel-dev@...lia.com,
        kernel@...ccoli.net, Anton Vorontsov <anton@...msg.org>,
        Colin Cross <ccross@...roid.com>,
        Tony Luck <tony.luck@...el.com>,
        Thorsten Leemhuis <linux@...mhuis.info>
Subject: Re: [REGRESSION][PATCH] Revert "pstore: migrate to crypto acomp
 interface"

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.

Cheers,


Guilherme
View attachment "pstore-Fix-memory-leak-after-the-recent-compression-.patch" of type "text/x-patch" (889 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ