Go to file
Donald Dutile ca8a2f786d module/decompress: use vmalloc() for zstd decompression workspace
JIRA: https://issues.redhat.com/browse/RHEL-28063

commit a419beac4a070aff63c520f36ebf7cb8a76a8ae5
Author: Andrea Righi <andrea.righi@canonical.com>
Date:   Tue Aug 29 14:05:08 2023 +0200

    module/decompress: use vmalloc() for zstd decompression workspace

    Using kmalloc() to allocate the decompression workspace for zstd may
    trigger the following warning when large modules are loaded (i.e., xfs):

    [    2.961884] WARNING: CPU: 1 PID: 254 at mm/page_alloc.c:4453 __alloc_pages+0x2c3/0x350
    ...
    [    2.989033] Call Trace:
    [    2.989841]  <TASK>
    [    2.990614]  ? show_regs+0x6d/0x80
    [    2.991573]  ? __warn+0x89/0x160
    [    2.992485]  ? __alloc_pages+0x2c3/0x350
    [    2.993520]  ? report_bug+0x17e/0x1b0
    [    2.994506]  ? handle_bug+0x51/0xa0
    [    2.995474]  ? exc_invalid_op+0x18/0x80
    [    2.996469]  ? asm_exc_invalid_op+0x1b/0x20
    [    2.997530]  ? module_zstd_decompress+0xdc/0x2a0
    [    2.998665]  ? __alloc_pages+0x2c3/0x350
    [    2.999695]  ? module_zstd_decompress+0xdc/0x2a0
    [    3.000821]  __kmalloc_large_node+0x7a/0x150
    [    3.001920]  __kmalloc+0xdb/0x170
    [    3.002824]  module_zstd_decompress+0xdc/0x2a0
    [    3.003857]  module_decompress+0x37/0xc0
    [    3.004688]  init_module_from_file+0xd0/0x100
    [    3.005668]  idempotent_init_module+0x11c/0x2b0
    [    3.006632]  __x64_sys_finit_module+0x64/0xd0
    [    3.007568]  do_syscall_64+0x59/0x90
    [    3.008373]  ? ksys_read+0x73/0x100
    [    3.009395]  ? exit_to_user_mode_prepare+0x30/0xb0
    [    3.010531]  ? syscall_exit_to_user_mode+0x37/0x60
    [    3.011662]  ? do_syscall_64+0x68/0x90
    [    3.012511]  ? do_syscall_64+0x68/0x90
    [    3.013364]  entry_SYSCALL_64_after_hwframe+0x6e/0xd8

    However, continuous physical memory does not seem to be required in
    module_zstd_decompress(), so use vmalloc() instead, to prevent the
    warning and avoid potential failures at loading compressed modules.

    Fixes: 169a58ad824d ("module/decompress: Support zstd in-kernel decompression")
    Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
    Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>

Signed-off-by: Donald Dutile <ddutile@redhat.com>
2024-06-17 14:17:29 -04:00
Documentation dyndbg: add source filename to prefix 2024-06-17 14:17:29 -04:00
LICENSES
arch ARM: dyndbg: allow including dyndbg.h in decompressor 2024-06-17 14:17:23 -04:00
block blk-cgroup: Properly propagate the iostat update up the hierarchy 2024-06-07 09:11:13 +08:00
certs integrity: PowerVM support for loading third party code signing keys 2024-02-05 19:05:32 +08:00
crypto crypto: pcrypt - Fix hungtask for PADATA_RESET 2024-05-29 13:20:49 +08:00
drivers xen: unexport __init-annotated xen_xlate_map_ballooned_pages() 2024-06-17 14:17:28 -04:00
fs Merge: gfs2: Fix glock shrinker 2024-06-12 13:28:35 +00:00
include dyndbg: add source filename to prefix 2024-06-17 14:17:29 -04:00
init kallsyms: Add self-test facility 2024-06-17 14:17:22 -04:00
io_uring use less confusing names for iov_iter direction initializers 2024-05-15 13:56:26 +08:00
ipc Merge: ipc/msg: mitigate the lock contention in ipc/msg 2024-05-16 13:29:40 +00:00
kernel module/decompress: use vmalloc() for zstd decompression workspace 2024-06-17 14:17:29 -04:00
lib dyndbg: add source filename to prefix 2024-06-17 14:17:29 -04:00
mm Merge: mm/hugetlb: fix missing hugetlb_lock for resv uncharge 2024-06-12 13:32:08 +00:00
net net/smc: avoid data corruption caused by decline 2024-06-13 10:02:17 +00:00
redhat module: add debug stats to help identify memory pressure 2024-06-17 14:17:25 -04:00
samples kmemleak-test: fix kmemleak_test.c build logic 2024-04-30 07:00:50 -04:00
scripts modpost, kallsyms: Treat add '$'-prefixed symbols as mapping symbols 2024-06-17 14:17:28 -04:00
security Merge: mm: update to 6.3 2024-05-13 12:46:48 +00:00
sound Merge DRM changes from upstream v6.7..v6.8 2024-06-11 06:44:18 +10:00
tools kallsyms: increase maximum kernel symbol length to 512 2024-06-17 14:17:21 -04:00
usr kexec.h: add linux/kexec.h to UAPI compile-test coverage 2024-05-15 13:58:51 +08:00
virt KVM: Drop unused @may_block param from gfn_to_pfn_cache_invalidate_start() 2024-05-13 23:58:51 -04:00
.clang-format printk: Prepare for SRCU console list protection 2024-05-09 11:25:16 -04:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore redhat: rhdocs: delete .get_maintainer.conf 2024-06-06 09:36:57 -04:00
.gitlab-ci.yml gitlab-ci: allow coverage template to disable debug builds again 2024-04-09 14:39:33 +02:00
.mailmap
COPYING
CREDITS MAINTAINERS: Drop Gustavo Pimentel as PCI DWC Maintainer 2024-05-13 15:56:48 -06:00
Kbuild
Kconfig
Kconfig.redhat
MAINTAINERS module: Move kdb module related code out of main kdb code 2024-06-17 14:17:13 -04:00
Makefile Merge DRM changes from upstream v6.8..v6.9 2024-06-11 06:44:19 +10:00
Makefile.rhelver [redhat] kernel-5.14.0-464.el9 2024-06-13 13:20:10 +00:00
README
makefile

README

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.