| .. | .. |
|---|
| 29 | 29 | /* Free memory returned from module_alloc. */ |
|---|
| 30 | 30 | void module_memfree(void *module_region); |
|---|
| 31 | 31 | |
|---|
| 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 | + |
|---|
| 32 | 42 | /* |
|---|
| 33 | 43 | * Apply the given relocation to the (simplified) ELF. Return -error |
|---|
| 34 | 44 | * or 0. |
|---|
| .. | .. |
|---|
| 86 | 96 | /* Any cleanup before freeing mod->module_init */ |
|---|
| 87 | 97 | void module_arch_freeing_init(struct module *mod); |
|---|
| 88 | 98 | |
|---|
| 89 | | -#ifdef CONFIG_KASAN |
|---|
| 99 | +#if (defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS)) && \ |
|---|
| 100 | + !defined(CONFIG_KASAN_VMALLOC) |
|---|
| 90 | 101 | #include <linux/kasan.h> |
|---|
| 91 | 102 | #define MODULE_ALIGN (PAGE_SIZE << KASAN_SHADOW_SCALE_SHIFT) |
|---|
| 92 | 103 | #else |
|---|