linux-next/arch/s390
Mike Rapoport (IBM) 12af2b83d0 mm: introduce execmem_alloc() and execmem_free()
module_alloc() is used everywhere as a mean to allocate memory for code.

Beside being semantically wrong, this unnecessarily ties all subsystems
that need to allocate code, such as ftrace, kprobes and BPF to modules and
puts the burden of code allocation to the modules code.

Several architectures override module_alloc() because of various
constraints where the executable memory can be located and this causes
additional obstacles for improvements of code allocation.

Start splitting code allocation from modules by introducing execmem_alloc()
and execmem_free() APIs.

Initially, execmem_alloc() is a wrapper for module_alloc() and
execmem_free() is a replacement of module_memfree() to allow updating all
call sites to use the new APIs.

Since architectures define different restrictions on placement,
permissions, alignment and other parameters for memory that can be used by
different subsystems that allocate executable memory, execmem_alloc() takes
a type argument, that will be used to identify the calling subsystem and to
allow architectures define parameters for ranges suitable for that
subsystem.

No functional changes.

Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Acked-by: Song Liu <song@kernel.org>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
2024-05-14 00:31:43 -07:00
..
appldata S390: Remove now superfluous sentinel elem from ctl_table arrays 2023-10-10 15:22:02 -07:00
boot s390: Compile kernel with -fPIC and link with -no-pie 2024-04-29 17:33:30 +02:00
configs crypto: remove CONFIG_CRYPTO_STATS 2024-04-02 10:49:38 +08:00
crypto s390/paes: Reestablish retry loop in paes 2024-05-01 11:52:54 +02:00
hypfs s390/hypfs_sprp: remove unneeded DMA zone allocation 2024-02-09 13:58:14 +01:00
include Scheduler changes for v6.10: 2024-05-13 17:18:51 -07:00
kernel mm: introduce execmem_alloc() and execmem_free() 2024-05-14 00:31:43 -07:00
kvm - Store AP Query Configuration Information in a static buffer 2024-05-13 08:33:52 -07:00
lib s390/expoline: Make modules use kernel expolines 2024-04-17 13:38:03 +02:00
mm - Store AP Query Configuration Information in a static buffer 2024-05-13 08:33:52 -07:00
net s390/bpf: Fix bpf_plt pointer arithmetic 2024-03-19 22:52:43 -07:00
pci s390/pci: Drop unneeded reference to CONFIG_DMI 2024-04-29 17:33:30 +02:00
purgatory s390 updates for 6.5 merge window part 2 2023-07-06 13:18:30 -07:00
tools s390/boot: Rework deployment of the kernel image 2024-04-17 13:38:02 +02:00
Kbuild - An extensive rework of kexec and crash Kconfig from Eric DeVolder 2023-08-29 14:53:51 -07:00
Kconfig s390: Compile kernel with -fPIC and link with -no-pie 2024-04-29 17:33:30 +02:00
Kconfig.debug s390/Kconfig.debug: fix indentation 2022-06-01 12:03:15 +02:00
Makefile s390: Compile kernel with -fPIC and link with -no-pie 2024-04-29 17:33:30 +02:00