x86/unwind/orc: Fix unreliable stack dump with gcov
Chen Zhongjin authored
[ Upstream commit 230db824 ]

When a console stack dump is initiated with CONFIG_GCOV_PROFILE_ALL
enabled, show_trace_log_lvl() gets out of sync with the ORC unwinder,
causing the stack trace to show all text addresses as unreliable:

  # echo l > /proc/sysrq-trigger
  [  477.521031] sysrq: Show backtrace of all active CPUs
  [  477.523813] NMI backtrace for cpu 0
  [  477.524492] CPU: 0 PID: 1021 Comm: bash Not tainted 6.0.0 #65
  [  477.525295] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.0-1.fc36 04/01/2014
  [  477.526439] Call Trace:
  [  477.526854]  <TASK>
  [  477.527216]  ? dump_stack_lvl+0xc7/0x114
  [  477.527801]  ? dump_stack+0x13/0x1f
  [  477.528331]  ? nmi_cpu_backtrace.cold+0xb5/0x10d
  [  477.528998]  ? lapic_can_unplug_cpu+0xa0/0xa0
  [  477.529641]  ? nmi_trigger_cpumask_backtrace+0x16a/0x1f0
  [  477.530393]  ? arch_trigger_cpumask_backtrace+0x1d/0x30
  [  477.531136]  ? sysrq_handle_s...
47be0127
Name Last commit Last update
..
boot x86: link vdso and boot with -z noexecstack --no-warn-rwx-segments
configs x86/defconfig: Enable CONFIG_USB_XHCI_HCD=y
crypto crypto: x86/crc32c - fix building with clang ias
entry x86: link vdso and boot with -z noexecstack --no-warn-rwx-segments
events perf/amd/ibs: Use interrupt regs ip for stack unwinding
hyperv x86/hyperv: Fix NULL deref in set_hv_tscchange_cb() if Hyper-V setup fails
ia32 x86/ia32: Fix ia32_restore_sigcontext() AC leak
include x86/hyperv: Fix 'struct hv_enlightened_vmcs' definition
kernel x86/unwind/orc: Fix unreliable stack dump with gcov
kvm KVM: nVMX: Unconditionally purge queued/injected events on nested "exit"
lib x86/delay: Fix the wrong asm constraint in delay_loop()
math-emu x86: math-emu: Fix up 'cmp' insn for clang ias
mm x86/numa: Use cpumask_available instead of hardcoded NULL check
net bpf: Introduce BPF nospec instruction for mitigating Spectre v4
oprofile x86/oprofile: Fix bogus GCC-8 warning in nmi_setup()
pci x86/pci/xen: Disable PCI/MSI[-X] masking for XEN_HVM guests
platform x86/olpc: fix 'logical not is only applied to the left hand side'
power x86/cpu: Load microcode during restore_processor_state()
purgatory x86/purgatory: Disable various profiling and sanitizing options
ras License cleanup: add SPDX GPL-2.0 license identifier to files with no license
realmode x86/64/mm: Map all kernel memory into trampoline_pgd
tools x86/tools: Fix objdump version check again
um um: Cleanup compiler warning in arch/x86/um/tls_32.c
video x86/video: Don't assume all FB devices are PCI devices
xen xen: delay xen_hvm_init_time_ops() if kdump is boot on vcpu>=32
.gitignore
Kbuild
Kconfig
Kconfig.cpu
Kconfig.debug
Makefile
Makefile.um
Makefile_32.cpu