linux/arch/parisc/kernel
Song Liu ac3b432839 module: replace module_layout with module_memory
module_layout manages different types of memory (text, data, rodata, etc.)
in one allocation, which is problematic for some reasons:

1. It is hard to enable CONFIG_STRICT_MODULE_RWX.
2. It is hard to use huge pages in modules (and not break strict rwx).
3. Many archs uses module_layout for arch-specific data, but it is not
   obvious how these data are used (are they RO, RX, or RW?)

Improve the scenario by replacing 2 (or 3) module_layout per module with
up to 7 module_memory per module:

        MOD_TEXT,
        MOD_DATA,
        MOD_RODATA,
        MOD_RO_AFTER_INIT,
        MOD_INIT_TEXT,
        MOD_INIT_DATA,
        MOD_INIT_RODATA,

and allocating them separately. This adds slightly more entries to
mod_tree (from up to 3 entries per module, to up to 7 entries per
module). However, this at most adds a small constant overhead to
__module_address(), which is expected to be fast.

Various archs use module_layout for different data. These data are put
into different module_memory based on their location in module_layout.
IOW, data that used to go with text is allocated with MOD_MEM_TYPE_TEXT;
data that used to go with data is allocated with MOD_MEM_TYPE_DATA, etc.

module_memory simplifies quite some of the module code. For example,
ARCH_WANTS_MODULES_DATA_IN_VMALLOC is a lot cleaner, as it just uses a
different allocator for the data. kernel/module/strict_rwx.c is also
much cleaner with module_memory.

Signed-off-by: Song Liu <song@kernel.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
2023-03-09 12:55:15 -08:00
..
syscalls parisc: Align parisc MADV_XXX constants with all other architectures 2022-12-17 23:19:39 +01:00
vdso32 parisc: Add missing FORCE prerequisites in Makefile 2022-12-18 22:18:49 +01:00
vdso64 parisc: Add missing FORCE prerequisites in Makefile 2022-12-18 22:18:49 +01:00
.gitignore
alternative.c parisc: Reduce kernel size by packing alternative tables 2022-10-11 12:01:24 +02:00
asm-offsets.c parisc: Fix vDSO signal breakage on 32-bit kernel 2022-07-02 18:36:58 +02:00
audit.c
cache.c parisc: remove mmap linked list from cache handling 2022-09-26 19:46:19 -07:00
compat_audit.c
drivers.c driver core: make struct bus_type.uevent() take a const * 2023-01-27 13:45:52 +01:00
entry.S parisc: Fix userspace graphics card breakage due to pgtable special bit 2022-10-14 10:45:12 +02:00
firmware.c parisc: Fix return code of pdc_iodc_print() 2023-01-09 09:51:56 +01:00
ftrace.c
hardware.c parisc: Clean up names in hardware database 2022-08-01 18:43:23 +02:00
head.S parisc: Add runtime check to prevent PA2.0 kernels on PA1.x machines 2022-08-22 11:09:17 +02:00
hpmc.S
inventory.c
irq.c asm-generic: Conditionally enable do_softirq_own_stack() via Kconfig. 2022-09-05 17:20:55 +02:00
jump_label.c jump_label: make initial NOP patching the special case 2022-06-24 09:48:55 +02:00
kexec.c
kexec_file.c
kgdb.c parisc: Drop duplicate kgdb_pdc console 2022-12-18 22:18:49 +01:00
kprobes.c
Makefile kbuild: use obj-y instead extra-y for objects placed at the head 2022-10-02 18:04:05 +09:00
module.c module: replace module_layout with module_memory 2023-03-09 12:55:15 -08:00
pa7300lc.c
pacache.S
parisc_ksyms.c
patch.c
pci-dma.c parisc: Do not initialise statics to 0 2022-08-01 18:43:23 +02:00
pci.c
pdc_chassis.c
pdc_cons.c parisc: Drop locking in pdc console code 2022-12-18 22:18:49 +01:00
pdt.c mm/hwpoison: pass pfn to num_poisoned_pages_*() 2022-11-08 17:37:22 -08:00
perf.c
perf_asm.S
perf_images.h
process.c arch/idle: Change arch_cpu_idle() behavior: always exit with IRQs disabled 2023-01-13 11:48:15 +01:00
processor.c parisc: Show MPE/iX model string at bootup 2022-12-19 16:08:52 +01:00
ptrace.c parisc: Wire up PTRACE_GETREGS/PTRACE_SETREGS for compat case 2023-02-01 21:42:37 +01:00
real2.S parisc: Move pdc_result struct to firmware.c 2022-12-18 22:18:49 +01:00
relocate_kernel.S
setup.c parisc: Fix inconsistent indenting in setup_cmdline() 2022-12-17 13:25:34 +01:00
signal.c
signal32.c
signal32.h
smp.c profile: setup_profiling_timer() is moslty not implemented 2022-07-29 18:12:36 -07:00
stacktrace.c
sys_parisc.c parisc: Align parisc MADV_XXX constants with all other architectures 2022-12-17 23:19:39 +01:00
sys_parisc32.c
syscall.S
time.c
toc.c
toc_asm.S
topology.c parisc: fix a crash with multicore scheduler 2022-06-03 09:54:01 +02:00
traps.c parisc: Convert PDC console to an early console 2022-10-11 12:01:24 +02:00
unaligned.c parisc: Fix exception handler for fldw and fstw instructions 2022-08-21 08:43:09 +02:00
unwind.c
vdso.c treewide: use get_random_u32_below() instead of deprecated function 2022-11-18 02:15:15 +01:00
vmlinux.lds.S objtool/idle: Validate __cpuidle code as noinstr 2023-01-13 11:48:15 +01:00