@@ -44,6 +44,7 @@
MODULE_AUTHOR("Manuel Estrada Sainz");
MODULE_DESCRIPTION("Multi purpose firmware loading support");
MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS(CORE_FS_READ);
struct firmware_cache {
/* firmware_buf instance will be added into the below list */
@@ -1008,7 +1008,7 @@ int kernel_read_file_from_path(const char *path, void **buf, loff_t *size,
fput(file);
return ret;
}
-EXPORT_SYMBOL_GPL(kernel_read_file_from_path);
+EXPORT_SYMBOL_NS_GPL(kernel_read_file_from_path, CORE_FS_READ);
int kernel_read_file_from_path_initns(const char *path, void **buf,
loff_t *size, loff_t max_size,
@@ -1034,7 +1034,7 @@ int kernel_read_file_from_path_initns(const char *path, void **buf,
fput(file);
return ret;
}
-EXPORT_SYMBOL_GPL(kernel_read_file_from_path_initns);
+EXPORT_SYMBOL_NS_GPL(kernel_read_file_from_path_initns, CORE_FS_READ);
int kernel_read_file_from_fd(int fd, void **buf, loff_t *size, loff_t max_size,
enum kernel_read_file_id id)
@@ -1050,7 +1050,7 @@ int kernel_read_file_from_fd(int fd, void **buf, loff_t *size, loff_t max_size,
fdput(f);
return ret;
}
-EXPORT_SYMBOL_GPL(kernel_read_file_from_fd);
+EXPORT_SYMBOL_NS_GPL(kernel_read_file_from_fd, CORE_FS_READ);
ssize_t read_code(struct file *file, unsigned long addr, loff_t pos, size_t len)
{
@@ -28,6 +28,8 @@
#include <linux/vmalloc.h>
#include "kexec_internal.h"
+MODULE_IMPORT_NS(CORE_FS_READ);
+
static int kexec_calculate_store_digests(struct kimage *image);
/*
@@ -60,6 +60,7 @@
#include "module-internal.h"
MODULE_IMPORT_NS(SECURITY_READ);
+MODULE_IMPORT_NS(CORE_FS_READ);
#define CREATE_TRACE_POINTS
#include <trace/events/module.h>
@@ -13,11 +13,14 @@
#include <linux/key-type.h>
#include <linux/digsig.h>
#include <linux/vmalloc.h>
+#include <linux/module.h>
#include <crypto/public_key.h>
#include <keys/system_keyring.h>
#include "integrity.h"
+MODULE_IMPORT_NS(CORE_FS_READ);
+
static struct key *keyring[INTEGRITY_KEYRING_MAX];
static const char * const keyring_name[INTEGRITY_KEYRING_MAX] = {
@@ -20,6 +20,9 @@
#include <linux/rcupdate.h>
#include <linux/parser.h>
#include <linux/vmalloc.h>
+#include <linux/module.h>
+
+MODULE_IMPORT_NS(CORE_FS_READ);
#include "ima.h"
@@ -28,6 +28,8 @@
#include "ima.h"
+MODULE_IMPORT_NS(CORE_FS_READ);
+
#ifdef CONFIG_IMA_APPRAISE
int ima_appraise = IMA_APPRAISE_ENFORCE;
#else
@@ -17,6 +17,8 @@
#include <linux/sched.h> /* current */
#include <linux/string_helpers.h>
+MODULE_IMPORT_NS(CORE_FS_READ);
+
static void report_load(const char *origin, struct file *file, char *operation)
{
char *cmdline, *pathname;
@@ -29,6 +29,8 @@
#include <linux/msg.h>
#include <net/flow.h>
+MODULE_IMPORT_NS(CORE_FS_READ);
+
#define MAX_LSM_EVM_XATTR 2
/* How many LSMs were built into the kernel? */
@@ -103,6 +103,8 @@
#include "audit.h"
#include "avc_ss.h"
+MODULE_IMPORT_NS(CORE_FS_READ);
+
struct selinux_state selinux_state;
/* SECMARK reference count */
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> --- drivers/base/firmware_loader/main.c | 1 + fs/exec.c | 6 +++--- kernel/kexec_file.c | 2 ++ kernel/module.c | 1 + security/integrity/digsig.c | 3 +++ security/integrity/ima/ima_fs.c | 3 +++ security/integrity/ima/ima_main.c | 2 ++ security/loadpin/loadpin.c | 2 ++ security/security.c | 2 ++ security/selinux/hooks.c | 2 ++ 10 files changed, 21 insertions(+), 3 deletions(-)