mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 14:12:06 +00:00
0cc2dc4902
execmem does not depend on modules, on the contrary modules use execmem. To make execmem available when CONFIG_MODULES=n, for instance for kprobes, split execmem_params initialization out from arch/*/kernel/module.c and compile it when CONFIG_EXECMEM=y Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
22 lines
417 B
C
22 lines
417 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#include <linux/mm.h>
|
|
#include <linux/execmem.h>
|
|
|
|
static struct execmem_info execmem_info __ro_after_init;
|
|
|
|
struct execmem_info __init *execmem_arch_setup(void)
|
|
{
|
|
execmem_info = (struct execmem_info){
|
|
.ranges = {
|
|
[EXECMEM_DEFAULT] = {
|
|
.start = MODULES_VADDR,
|
|
.end = MODULES_END,
|
|
.pgprot = PAGE_KERNEL,
|
|
.alignment = 1,
|
|
},
|
|
},
|
|
};
|
|
|
|
return &execmem_info;
|
|
}
|