]> Git Repo - J-linux.git/commitdiff
Merge tag 'locking-core-2022-08-01' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <[email protected]>
Mon, 1 Aug 2022 19:15:27 +0000 (12:15 -0700)
committerLinus Torvalds <[email protected]>
Mon, 1 Aug 2022 19:15:27 +0000 (12:15 -0700)
Pull locking updates from Ingo Molnar:
 "This was a fairly quiet cycle for the locking subsystem:

   - lockdep: Fix a handful of the more complex lockdep_init_map_*()
     primitives that can lose the lock_type & cause false reports. No
     such mishap was observed in the wild.

   - jump_label improvements: simplify the cross-arch support of initial
     NOP patching by making it arch-specific code (used on MIPS only),
     and remove the s390 initial NOP patching that was superfluous"

* tag 'locking-core-2022-08-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  locking/lockdep: Fix lockdep_init_map_*() confusion
  jump_label: make initial NOP patching the special case
  jump_label: mips: move module NOP patching into arch code
  jump_label: s390: avoid pointless initial NOP patching

1  2 
arch/x86/kernel/module.c

diff --combined arch/x86/kernel/module.c
index 67828d97338902b7fe3aca46bf297b369c00ee01,95b9cf25d4bdcc97911da3c8ab9dc6b33c90f491..b1abf663417cdef7eff8f58fbbdfa3732a8ff6c9
@@@ -253,7 -253,7 +253,7 @@@ int module_finalize(const Elf_Ehdr *hdr
  {
        const Elf_Shdr *s, *text = NULL, *alt = NULL, *locks = NULL,
                *para = NULL, *orc = NULL, *orc_ip = NULL,
 -              *retpolines = NULL, *ibt_endbr = NULL;
 +              *retpolines = NULL, *returns = NULL, *ibt_endbr = NULL;
        char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
  
        for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) {
                        orc_ip = s;
                if (!strcmp(".retpoline_sites", secstrings + s->sh_name))
                        retpolines = s;
 +              if (!strcmp(".return_sites", secstrings + s->sh_name))
 +                      returns = s;
                if (!strcmp(".ibt_endbr_seal", secstrings + s->sh_name))
                        ibt_endbr = s;
        }
                void *rseg = (void *)retpolines->sh_addr;
                apply_retpolines(rseg, rseg + retpolines->sh_size);
        }
 +      if (returns) {
 +              void *rseg = (void *)returns->sh_addr;
 +              apply_returns(rseg, rseg + returns->sh_size);
 +      }
        if (alt) {
                /* patch .altinstructions */
                void *aseg = (void *)alt->sh_addr;
                                            tseg, tseg + text->sh_size);
        }
  
-       /* make jump label nops */
-       jump_label_apply_nops(me);
        if (orc && orc_ip)
                unwind_module_init(me, (void *)orc_ip->sh_addr, orc_ip->sh_size,
                                   (void *)orc->sh_addr, orc->sh_size);
This page took 0.108371 seconds and 4 git commands to generate.