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
..
alpha tty: the rest, stop using tty_schedule_flip()
arc arc: iounmap() arg is volatile
arm ARM: dts: imx6sx: add missing properties for sram
arm64 arm64: errata: Remove AES hwcap for COMPAT tasks
c6x kbuild: rename LDFLAGS to KBUILD_LDFLAGS
h8300 h8300: fix PREEMPTION build, TI_PRE_COUNT undefined
hexagon hexagon: export raw I/O routines for modules
ia64 ia64, processor: fix -Wincompatible-pointer-types in ia64_get_irr()
m68k m68k: use fallback for random_get_entropy() instead of zero
microblaze microblaze: Prevent the overflow of the start
mips MIPS: BCM47XX: Cast memcmp() of function to (void *)
nds32 nds32: fix access_ok() checks in get/put_user
nios2 nios2: add force_successful_syscall_return()
openrisc openrisc: start CPU timer early in boot
parisc parisc: Add runtime check to prevent PA2.0 kernels on PA1.x machines
powerpc powerpc: Fix SPE Power ISA properties for e500v1 platforms
riscv riscv: fix build with binutils 2.38
s390 s390/futex: add missing EX_TABLE entry to __futex_atomic_op()
sh sh: machvec: Use char[] for section boundaries
sparc sparc: use fallback for random_get_entropy() instead of zero
um UM: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK
unicore32 mm: convert return type of handle_mm_fault() caller to vm_fault_t
x86 x86/unwind/orc: Fix unreliable stack dump with gcov
xtensa xtensa: Fix refcount leak bug in time.c
.gitignore arch: Ignore arch/i386 and arch/x86_64
Kconfig x86: Make ARCH_USE_MEMREMAP_PROT a generic Kconfig symbol