--- zzzz-none-000/linux-4.9.276/arch/mips/kernel/module.c 2021-07-20 14:21:16.000000000 +0000 +++ falcon-5530-750/linux-4.9.276/arch/mips/kernel/module.c 2023-04-05 08:19:00.000000000 +0000 @@ -34,6 +34,7 @@ #include #include /* MODULE_START */ +#include struct mips_hi16 { struct mips_hi16 *next; @@ -45,12 +46,14 @@ static DEFINE_SPINLOCK(dbe_lock); #ifdef MODULE_START + void *module_alloc(unsigned long size) { return __vmalloc_node_range(size, 1, MODULE_START, MODULE_END, GFP_KERNEL, PAGE_KERNEL, 0, NUMA_NO_NODE, __builtin_return_address(0)); } + #endif int apply_r_mips_none(struct module *me, u32 *location, Elf_Addr v) @@ -60,7 +63,7 @@ static int apply_r_mips_32_rel(struct module *me, u32 *location, Elf_Addr v) { - *location += v; + put_unaligned(get_unaligned(location) + v, location); return 0; }