mm/execmem, arch: convert remaining overrides of module_alloc to execmem
authorMike Rapoport (IBM) <rppt@kernel.org>
Sun, 5 May 2024 16:06:20 +0000 (19:06 +0300)
committerLuis Chamberlain <mcgrof@kernel.org>
Tue, 14 May 2024 07:31:43 +0000 (00:31 -0700)
commit223b5e57d0d50b0c07b933350dbcde92018d3080
tree981296818e5988d0677d868b66b5fa90fea24e5b
parentf6bec26c0a7364d3506a3e12dab7c228ef32bd65
mm/execmem, arch: convert remaining overrides of module_alloc to execmem

Extend execmem parameters to accommodate more complex overrides of
module_alloc() by architectures.

This includes specification of a fallback range required by arm, arm64
and powerpc, EXECMEM_MODULE_DATA type required by powerpc, support for
allocation of KASAN shadow required by s390 and x86 and support for
late initialization of execmem required by arm64.

The core implementation of execmem_alloc() takes care of suppressing
warnings when the initial allocation fails but there is a fallback range
defined.

Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Acked-by: Song Liu <song@kernel.org>
Tested-by: Liviu Dudau <liviu@dudau.co.uk>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
arch/Kconfig
arch/arm/kernel/module.c
arch/arm64/Kconfig
arch/arm64/kernel/module.c
arch/powerpc/kernel/module.c
arch/s390/kernel/module.c
arch/x86/kernel/module.c
include/linux/execmem.h
include/linux/moduleloader.h
kernel/module/main.c
mm/execmem.c