linux/kernel/module/strict_rwx.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Module strict rwx
 *
 * Copyright (C) 2015 Rusty Russell
 */

#include <linux/module.h>
#include <linux/mm.h>
#include <linux/vmalloc.h>
#include <linux/set_memory.h>
#include "internal.h"

static int module_set_memory(const struct module *mod, enum mod_mem_type type,
			     int (*set_memory)(unsigned long start, int num_pages))
{}

/*
 * Since some arches are moving towards PAGE_KERNEL module allocations instead
 * of PAGE_KERNEL_EXEC, keep module_enable_x() independent of
 * CONFIG_STRICT_MODULE_RWX because they are needed regardless of whether we
 * are strict.
 */
int module_enable_text_rox(const struct module *mod)
{}

int module_enable_rodata_ro(const struct module *mod, bool after_init)
{}

int module_enable_data_nx(const struct module *mod)
{}

int module_enforce_rwx_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
				char *secstrings, struct module *mod)
{}