A mirror of the official Linux kernel repository just in case
Go to file
Andrea Righi 3737df782c module/decompress: use vmalloc() for gzip decompression workspace
Use a similar approach as commit a419beac4a ("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: b1ae6dc41e ("module: add in-kernel support for decompressing")
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
2023-11-01 13:07:08 -07:00
arch drm for 6.7-rc1 2023-11-01 06:28:35 -10:00
block vfs-6.7.super 2023-10-30 08:59:05 -10:00
certs certs: Reference revocation list for all keyrings 2023-08-17 20:12:41 +00:00
crypto KEYS: asymmetric: Fix sign/verify on pkcs1pad without a hash 2023-10-18 12:27:10 +08:00
Documentation drm for 6.7-rc1 2023-11-01 06:28:35 -10:00
drivers drm for 6.7-rc1 2023-11-01 06:28:35 -10:00
fs execve updates for v6.7-rc1 2023-10-30 19:28:19 -10:00
include module: Clarify documentation of module_param_call() 2023-11-01 13:03:02 -07:00
init hardening updates for v6.7-rc1 2023-10-30 19:09:55 -10:00
io_uring vfs-6.7.misc 2023-10-30 09:14:19 -10:00
ipc ipc: convert to new timestamp accessors 2023-10-18 14:08:30 +02:00
kernel module/decompress: use vmalloc() for gzip decompression workspace 2023-11-01 13:07:08 -07:00
lib Networking changes for 6.7. 2023-10-31 05:10:11 -10:00
LICENSES LICENSES: Add the copyleft-next-0.3.1 license 2022-11-08 15:44:01 +01:00
mm Networking changes for 6.7. 2023-10-31 05:10:11 -10:00
net Networking changes for 6.7. 2023-10-31 05:10:11 -10:00
rust workqueue: Add rust bindings for v6.7 2023-10-30 20:35:48 -10:00
samples samples/bpf: Allow building with custom bpftool 2023-10-26 15:32:13 +02:00
scripts Devicetree updates for 6.7: 2023-10-31 18:50:13 -10:00
security lsm/stable-6.7 PR 20231030 2023-10-30 20:13:17 -10:00
sound vfs-6.7.iov_iter 2023-10-30 09:24:21 -10:00
tools Devicetree updates for 6.7: 2023-10-31 18:50:13 -10:00
usr initramfs: Encode dependency on KBUILD_BUILD_TIMESTAMP 2023-06-06 17:54:49 +09:00
virt ARM: 2023-09-07 13:52:20 -07:00
.clang-format iommu: Add for_each_group_device() 2023-05-23 08:15:51 +02:00
.cocciconfig
.get_maintainer.ignore get_maintainer: add Alan to .get_maintainer.ignore 2022-08-20 15:17:44 -07:00
.gitattributes .gitattributes: set diff driver for Rust source code files 2023-05-31 17:48:25 +02:00
.gitignore kbuild: rpm-pkg: rename binkernel.spec to kernel.spec 2023-07-25 00:59:33 +09:00
.mailmap 20 hotfixes. 12 are cc:stable and the remainder address post-6.5 issues 2023-10-24 09:52:16 -10:00
.rustfmt.toml rust: add .rustfmt.toml 2022-09-28 09:02:20 +02:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS USB: Remove Wireless USB and UWB documentation 2023-08-09 14:17:32 +02:00
Kbuild Kbuild updates for v6.1 2022-10-10 12:00:45 -07:00
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS MAINTAINERS: add include/linux/module*.h to modules 2023-11-01 13:06:54 -07:00
Makefile Linux 6.6 2023-10-29 16:31:08 -10:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.