hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/include/linux/moduleloader.h
....@@ -29,6 +29,16 @@
2929 /* Free memory returned from module_alloc. */
3030 void module_memfree(void *module_region);
3131
32
+/* Determines if the section name is an init section (that is only used during
33
+ * module loading).
34
+ */
35
+bool module_init_section(const char *name);
36
+
37
+/* Determines if the section name is an exit section (that is only used during
38
+ * module unloading)
39
+ */
40
+bool module_exit_section(const char *name);
41
+
3242 /*
3343 * Apply the given relocation to the (simplified) ELF. Return -error
3444 * or 0.
....@@ -86,7 +96,8 @@
8696 /* Any cleanup before freeing mod->module_init */
8797 void module_arch_freeing_init(struct module *mod);
8898
89
-#ifdef CONFIG_KASAN
99
+#if (defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS)) && \
100
+ !defined(CONFIG_KASAN_VMALLOC)
90101 #include <linux/kasan.h>
91102 #define MODULE_ALIGN (PAGE_SIZE << KASAN_SHADOW_SCALE_SHIFT)
92103 #else