linux-stable/kernel/module
Andrea Righi ada57fd312 module/decompress: use kvmalloc() consistently
[ Upstream commit 17fc8084aa ]

We consistently switched from kmalloc() to vmalloc() in module
decompression to prevent potential memory allocation failures with large
modules, however vmalloc() is not as memory-efficient and fast as
kmalloc().

Since we don't know in general the size of the workspace required by the
decompression algorithm, it is more reasonable to use kvmalloc()
consistently, also considering that we don't have special memory
requirements here.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Tested-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-20 11:59:37 +01:00
..
debug_kmemleak.c
decompress.c module/decompress: use kvmalloc() consistently 2023-11-20 11:59:37 +01:00
dups.c module: include internal.h in module/dups.c 2023-05-02 20:33:36 -07:00
internal.h kbuild: generate KSYMTAB entries by modpost 2023-06-22 21:17:10 +09:00
kallsyms.c modpost, kallsyms: Treat add '$'-prefixed symbols as mapping symbols 2023-07-24 12:09:47 -07:00
Kconfig module: add debugging auto-load duplicate module support 2023-04-19 17:26:01 -07:00
kdb.c module: replace module_layout with module_memory 2023-03-09 12:55:15 -08:00
kmod.c module: add debugging auto-load duplicate module support 2023-04-19 17:26:01 -07:00
livepatch.c livepatch: fix ELF typos 2023-03-09 11:08:24 +01:00
main.c module: Expose module_init_layout_section() 2023-08-03 13:42:02 -07:00
Makefile module: add debugging auto-load duplicate module support 2023-04-19 17:26:01 -07:00
procfs.c module: replace module_layout with module_memory 2023-03-09 12:55:15 -08:00
signing.c
stats.c module: Fix use-after-free bug in read_file_mod_stats() 2023-05-22 14:13:13 -07:00
strict_rwx.c module: replace module_layout with module_memory 2023-03-09 12:55:15 -08:00
sysfs.c module: remove redundant module_sysfs_initialized variable 2022-11-11 10:19:52 -08:00
tracking.c module: add debug stats to help identify memory pressure 2023-04-18 11:15:24 -07:00
tree_lookup.c module: replace module_layout with module_memory 2023-03-09 12:55:15 -08:00
version.c