summaryrefslogtreecommitdiffstats
path: root/kernel/module/internal.h
diff options
context:
space:
mode:
authorAaron Tomlin <atomlin@redhat.com>2022-03-22 15:03:32 +0100
committerLuis Chamberlain <mcgrof@kernel.org>2022-04-05 17:41:13 +0200
commit8ab4ed08a24f88359f22439e37cac65c95cf6ac2 (patch)
treeebc06d72ee93e7a0a73af8c10ed24c13ebe7ed2e /kernel/module/internal.h
parentmodule: Move all into module/ (diff)
downloadlinux-8ab4ed08a24f88359f22439e37cac65c95cf6ac2.tar.xz
linux-8ab4ed08a24f88359f22439e37cac65c95cf6ac2.zip
module: Simple refactor in preparation for split
No functional change. This patch makes it possible to move non-essential code out of core module code. Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Aaron Tomlin <atomlin@redhat.com> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'kernel/module/internal.h')
-rw-r--r--kernel/module/internal.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/kernel/module/internal.h b/kernel/module/internal.h
index 8c381c99062f..ea8c4c02614c 100644
--- a/kernel/module/internal.h
+++ b/kernel/module/internal.h
@@ -7,6 +7,27 @@
#include <linux/elf.h>
#include <asm/module.h>
+#include <linux/mutex.h>
+
+#ifndef ARCH_SHF_SMALL
+#define ARCH_SHF_SMALL 0
+#endif
+
+/* If this is set, the section belongs in the init part of the module */
+#define INIT_OFFSET_MASK (1UL << (BITS_PER_LONG - 1))
+/* Maximum number of characters written by module_flags() */
+#define MODULE_FLAGS_BUF_SIZE (TAINT_FLAGS_COUNT + 4)
+
+extern struct mutex module_mutex;
+extern struct list_head modules;
+
+/* Provided by the linker */
+extern const struct kernel_symbol __start___ksymtab[];
+extern const struct kernel_symbol __stop___ksymtab[];
+extern const struct kernel_symbol __start___ksymtab_gpl[];
+extern const struct kernel_symbol __stop___ksymtab_gpl[];
+extern const s32 __start___kcrctab[];
+extern const s32 __start___kcrctab_gpl[];
struct load_info {
const char *name;