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] [day] [month] [year] [list]
Message-ID: <ZQtjSdDUJ88CfOYc@bombadil.infradead.org>
Date:   Wed, 20 Sep 2023 14:25:29 -0700
From:   Luis Chamberlain <mcgrof@...nel.org>
To:     Andrea Righi <andrea.righi@...onical.com>
Cc:     Lucas De Marchi <lucas.demarchi@...el.com>,
        Nick Terrell <terrelln@...com>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        linux-modules@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] module/decompress: use vmalloc() for gzip decompression
 workspace

On Wed, Aug 30, 2023 at 05:58:20PM +0200, Andrea Righi wrote:
> Use a similar approach as commit a419beac4a07 ("module/decompress: use
> vmalloc() for zstd decompression workspace") and replace kmalloc() with
> vmalloc() also for the gzip module decompression workspace.
> 
> In this case the workspace is represented by struct inflate_workspace
> that can be fairly large for kmalloc() and it can potentially lead to
> allocation errors on certain systems:
> 
> $ pahole inflate_workspace
> struct inflate_workspace {
> 	struct inflate_state       inflate_state;        /*     0  9544 */
> 	/* --- cacheline 149 boundary (9536 bytes) was 8 bytes ago --- */
> 	unsigned char              working_window[32768]; /*  9544 32768 */
> 
> 	/* size: 42312, cachelines: 662, members: 2 */
> 	/* last cacheline: 8 bytes */
> };
> 
> Considering that there is no need to use continuous physical memory,
> simply switch to vmalloc() to provide a more reliable in-kernel module
> decompression.
> 
> Fixes: b1ae6dc41eaa ("module: add in-kernel support for decompressing")
> Signed-off-by: Andrea Righi <andrea.righi@...onical.com>

Applied, and pushed, thanks!

  Luis

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ