mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
jump_label: mips: move module NOP patching into arch code
MIPS is the only remaining architecture that needs to patch jump label NOP encodings to initialize them at load time. So let's move the module patching part of that from generic code into arch/mips, and drop it from the others. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20220615154142.1574619-3-ardb@kernel.org
This commit is contained in:
committed by
Peter Zijlstra
parent
0c3b61e00a
commit
fdfd42892f
@@ -21,6 +21,7 @@
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/jump_label.h>
|
||||
|
||||
extern void jump_label_apply_nops(struct module *mod);
|
||||
|
||||
struct mips_hi16 {
|
||||
struct mips_hi16 *next;
|
||||
@@ -428,8 +429,8 @@ int module_finalize(const Elf_Ehdr *hdr,
|
||||
const Elf_Shdr *s;
|
||||
char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
|
||||
|
||||
/* Make jump label nops. */
|
||||
jump_label_apply_nops(me);
|
||||
if (IS_ENABLED(CONFIG_JUMP_LABEL))
|
||||
jump_label_apply_nops(me);
|
||||
|
||||
INIT_LIST_HEAD(&me->arch.dbe_list);
|
||||
for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) {
|
||||
|
||||
Reference in New Issue
Block a user