linux/arch/powerpc
Christophe Leroy 66c4b551dc powerpc/32: Clear on-stack exception marker upon exception return
commit 9580b71b5a upstream.

Clear the on-stack STACK_FRAME_REGS_MARKER on exception exit in order
to avoid confusing stacktrace like the one below.

  Call Trace:
  [c0e9dca0] [c01c42a0] print_address_description+0x64/0x2bc (unreliable)
  [c0e9dcd0] [c01c4684] kasan_report+0xfc/0x180
  [c0e9dd10] [c0895130] memchr+0x24/0x74
  [c0e9dd30] [c00a9e38] msg_print_text+0x124/0x574
  [c0e9dde0] [c00ab710] console_unlock+0x114/0x4f8
  [c0e9de40] [c00adc60] vprintk_emit+0x188/0x1c4
  --- interrupt: c0e9df00 at 0x400f330
      LR = init_stack+0x1f00/0x2000
  [c0e9de80] [c00ae3c4] printk+0xa8/0xcc (unreliable)
  [c0e9df20] [c0c27e44] early_irq_init+0x38/0x108
  [c0e9df50] [c0c15434] start_kernel+0x310/0x488
  [c0e9dff0] [00003484] 0x3484

With this patch the trace becomes:

  Call Trace:
  [c0e9dca0] [c01c42c0] print_address_description+0x64/0x2bc (unreliable)
  [c0e9dcd0] [c01c46a4] kasan_report+0xfc/0x180
  [c0e9dd10] [c0895150] memchr+0x24/0x74
  [c0e9dd30] [c00a9e58] msg_print_text+0x124/0x574
  [c0e9dde0] [c00ab730] console_unlock+0x114/0x4f8
  [c0e9de40] [c00adc80] vprintk_emit+0x188/0x1c4
  [c0e9de80] [c00ae3e4] printk+0xa8/0xcc
  [c0e9df20] [c0c27e44] early_irq_init+0x38/0x108
  [c0e9df50] [c0c15434] start_kernel+0x310/0x488
  [c0e9dff0] [00003484] 0x3484

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2019-07-09 22:04:10 +01:00
..
boot powerpc: Fix COFF zImage booting on old powermacs 2019-02-11 17:54:13 +00:00
configs powerpc/configs: Don't enable PPC_EARLY_DEBUG in defconfigs 2019-04-04 16:14:01 +01:00
crypto crypto: add missing crypto module aliases 2015-02-04 10:57:50 +00:00
include locking/static_keys: Add a new static_key interface 2019-05-22 23:15:05 +01:00
kernel powerpc/32: Clear on-stack exception marker upon exception return 2019-07-09 22:04:10 +01:00
kvm KVM: Protect device ops->create and list_add with kvm->lock 2019-03-25 17:32:35 +00:00
lib powerpc/lib: Fix the feature fixup tests to actually work 2018-11-20 18:04:53 +00:00
math-emu powerpc: Correct emulated mtfsf instruction 2014-04-07 10:33:11 +10:00
mm powerpc/mm/hash: Handle mmap_min_addr correctly in get_unmapped_area topdown search 2019-07-09 22:04:07 +01:00
net net: filter: make JITs zero A for SKF_AD_ALU_XOR_X 2016-01-25 10:44:05 +00:00
oprofile cpufreq: remove unused notifier: CPUFREQ_{SUSPENDCHANGE|RESUMECHANGE} 2014-03-19 14:10:24 +01:00
perf powerpc/perf: Dereference BHRB entries safely 2018-03-03 15:51:58 +00:00
platforms powerpc/powernv: Make opal log only readable by root 2019-07-09 22:04:08 +01:00
sysdev powerpc: Fix size calculation using resource_size() 2018-12-16 22:08:41 +00:00
xmon powerpc/xmon: Fix another endiannes issue in RTAS call from xmon 2015-02-04 10:58:05 +00:00
Kconfig powerpc/bpf/jit: Disable classic BPF JIT on ppc64le 2016-08-22 22:38:18 +01:00
Kconfig.debug powerpc/powernv: Remove OPAL v1 takeover 2014-06-25 13:10:47 +10:00
Makefile powerpc/e500mc: Set assembler machine type to e500mc 2018-11-20 18:05:17 +00:00
relocs_check.pl Fix warning typo "CONFIG_RELCOATABLE" 2013-05-29 15:11:30 +02:00