Merge tag 'powerpc-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 19 Dec 2022 13:13:33 +0000 (07:13 -0600)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 19 Dec 2022 13:13:33 +0000 (07:13 -0600)
Pull powerpc updates from Michael Ellerman:

 - Add powerpc qspinlock implementation optimised for large system
   scalability and paravirt. See the merge message for more details

 - Enable objtool to be built on powerpc to generate mcount locations

 - Use a temporary mm for code patching with the Radix MMU, so the
   writable mapping is restricted to the patching CPU

 - Add an option to build the 64-bit big-endian kernel with the ELFv2
   ABI

 - Sanitise user registers on interrupt entry on 64-bit Book3S

 - Many other small features and fixes

Thanks to Aboorva Devarajan, Angel Iglesias, Benjamin Gray, Bjorn
Helgaas, Bo Liu, Chen Lifu, Christoph Hellwig, Christophe JAILLET,
Christophe Leroy, Christopher M. Riedl, Colin Ian King, Deming Wang,
Disha Goel, Dmitry Torokhov, Finn Thain, Geert Uytterhoeven, Gustavo A.
R. Silva, Haowen Bai, Joel Stanley, Jordan Niethe, Julia Lawall, Kajol
Jain, Laurent Dufour, Li zeming, Miaoqian Lin, Michael Jeanson, Nathan
Lynch, Naveen N. Rao, Nayna Jain, Nicholas Miehlbradt, Nicholas Piggin,
Pali Rohár, Randy Dunlap, Rohan McLure, Russell Currey, Sathvika
Vasireddy, Shaomin Deng, Stephen Kitt, Stephen Rothwell, Thomas
Weißschuh, Tiezhu Yang, Uwe Kleine-König, Xie Shaowen, Xiu Jianfeng,
XueBing Chen, Yang Yingliang, Zhang Jiaming, ruanjinjie, Jessica Yu,
and Wolfram Sang.

* tag 'powerpc-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (181 commits)
  powerpc/code-patching: Fix oops with DEBUG_VM enabled
  powerpc/qspinlock: Fix 32-bit build
  powerpc/prom: Fix 32-bit build
  powerpc/rtas: mandate RTAS syscall filtering
  powerpc/rtas: define pr_fmt and convert printk call sites
  powerpc/rtas: clean up includes
  powerpc/rtas: clean up rtas_error_log_max initialization
  powerpc/pseries/eeh: use correct API for error log size
  powerpc/rtas: avoid scheduling in rtas_os_term()
  powerpc/rtas: avoid device tree lookups in rtas_os_term()
  powerpc/rtasd: use correct OF API for event scan rate
  powerpc/rtas: document rtas_call()
  powerpc/pseries: unregister VPA when hot unplugging a CPU
  powerpc/pseries: reset the RCU watchdogs after a LPM
  powerpc: Take in account addition CPU node when building kexec FDT
  powerpc: export the CPU node count
  powerpc/cpuidle: Set CPUIDLE_FLAG_POLLING for snooze state
  powerpc/dts/fsl: Fix pca954x i2c-mux node names
  cxl: Remove unnecessary cxl_pci_window_alignment()
  selftests/powerpc: Fix resource leaks
  ...

18 files changed:
1  2 
Documentation/admin-guide/kernel-parameters.txt
Makefile
arch/powerpc/include/asm/ftrace.h
arch/powerpc/include/asm/nohash/32/pgtable.h
arch/powerpc/kernel/kprobes.c
arch/powerpc/kernel/process.c
arch/powerpc/kexec/file_load_64.c
arch/powerpc/kvm/book3s_64_mmu_hv.c
arch/x86/Kconfig
kernel/module/main.c
kernel/trace/Kconfig
scripts/Makefile.lib
tools/objtool/arch/x86/decode.c
tools/objtool/builtin-check.c
tools/objtool/check.c
tools/objtool/elf.c
tools/objtool/include/objtool/builtin.h
tools/objtool/include/objtool/elf.h

diff --cc Makefile
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index b28ac83bd9f0802c73aff6c336e48a819ed1b61f,658f541c2782768c716185d76829ffd3006a0200..4a4a5f67c1a6c68a60c624fd687bf6adf367cb2c
@@@ -254,10 -254,11 +254,13 @@@ objtool := $(objtree)/tools/objtool/obj
  
  objtool-args-$(CONFIG_HAVE_JUMP_LABEL_HACK)           += --hacks=jump_label
  objtool-args-$(CONFIG_HAVE_NOINSTR_HACK)              += --hacks=noinstr
 +objtool-args-$(CONFIG_CALL_DEPTH_TRACKING)            += --hacks=skylake
  objtool-args-$(CONFIG_X86_KERNEL_IBT)                 += --ibt
 +objtool-args-$(CONFIG_FINEIBT)                                += --cfi
  objtool-args-$(CONFIG_FTRACE_MCOUNT_USE_OBJTOOL)      += --mcount
+ ifdef CONFIG_FTRACE_MCOUNT_USE_OBJTOOL
+ objtool-args-$(CONFIG_HAVE_OBJTOOL_NOP_MCOUNT)                += --mnop
+ endif
  objtool-args-$(CONFIG_UNWINDER_ORC)                   += --orc
  objtool-args-$(CONFIG_RETPOLINE)                      += --retpoline
  objtool-args-$(CONFIG_RETHUNK)                                += --rethunk
Simple merge
Simple merge
index 14130ab86227f367d4533c1ae3e3b6efc7bb0bb6,7580c66ca5c8e51394d48f9eea2e42c835431f50..4350be739f4fac504657fe76d4b8c93da1d244b7
@@@ -204,7 -207,7 +204,7 @@@ static bool __dead_end_function(struct 
                return false;
  
        insn = find_insn(file, func->sec, func->offset);
-       if (!insn_func(insn))
 -      if (!insn || !insn->func)
++      if (!insn || !insn_func(insn))
                return false;
  
        func_for_each_insn(file, func, insn) {
@@@ -861,73 -850,11 +861,73 @@@ static int create_ibt_endbr_seal_sectio
        return 0;
  }
  
 +static int create_cfi_sections(struct objtool_file *file)
 +{
 +      struct section *sec, *s;
 +      struct symbol *sym;
 +      unsigned int *loc;
 +      int idx;
 +
 +      sec = find_section_by_name(file->elf, ".cfi_sites");
 +      if (sec) {
 +              INIT_LIST_HEAD(&file->call_list);
 +              WARN("file already has .cfi_sites section, skipping");
 +              return 0;
 +      }
 +
 +      idx = 0;
 +      for_each_sec(file, s) {
 +              if (!s->text)
 +                      continue;
 +
 +              list_for_each_entry(sym, &s->symbol_list, list) {
 +                      if (sym->type != STT_FUNC)
 +                              continue;
 +
 +                      if (strncmp(sym->name, "__cfi_", 6))
 +                              continue;
 +
 +                      idx++;
 +              }
 +      }
 +
 +      sec = elf_create_section(file->elf, ".cfi_sites", 0, sizeof(unsigned int), idx);
 +      if (!sec)
 +              return -1;
 +
 +      idx = 0;
 +      for_each_sec(file, s) {
 +              if (!s->text)
 +                      continue;
 +
 +              list_for_each_entry(sym, &s->symbol_list, list) {
 +                      if (sym->type != STT_FUNC)
 +                              continue;
 +
 +                      if (strncmp(sym->name, "__cfi_", 6))
 +                              continue;
 +
 +                      loc = (unsigned int *)sec->data->d_buf + idx;
 +                      memset(loc, 0, sizeof(unsigned int));
 +
 +                      if (elf_add_reloc_to_insn(file->elf, sec,
 +                                                idx * sizeof(unsigned int),
 +                                                R_X86_64_PC32,
 +                                                s, sym->offset))
 +                              return -1;
 +
 +                      idx++;
 +              }
 +      }
 +
 +      return 0;
 +}
 +
  static int create_mcount_loc_sections(struct objtool_file *file)
  {
-       struct section *sec;
-       unsigned long *loc;
+       int addrsize = elf_class_addrsize(file->elf);
        struct instruction *insn;
+       struct section *sec;
        int idx;
  
        sec = find_section_by_name(file->elf, "__mcount_loc");
Simple merge
Simple merge