linux/arch/arm64/kernel
Prakash Gupta bb53c820c5 arm64: stacktrace: avoid listing stacktrace functions in stacktrace
The stacktraces always begin as follows:

  [<c00117b4>] save_stack_trace_tsk+0x0/0x98
  [<c0011870>] save_stack_trace+0x24/0x28
  ...

This is because the stack trace code includes the stack frames for
itself.  This is incorrect behaviour, and also leads to "skip" doing the
wrong thing (which is the number of stack frames to avoid recording.)

Perversely, it does the right thing when passed a non-current thread.
Fix this by ensuring that we have a known constant number of frames
above the main stack trace function, and always skip these.

This was fixed for arch arm by commit 3683f44c42 ("ARM: stacktrace:
avoid listing stacktrace functions in stacktrace")

Link: http://lkml.kernel.org/r/1504078343-28754-1-git-send-email-guptap@codeaurora.org
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-09-13 18:53:16 -07:00
..
probes arm64: introduce separated bits for mm_context_t flags 2017-08-22 18:13:04 +01:00
vdso arm64/vdso: Fix nsec handling for CLOCK_MONOTONIC_RAW 2017-06-20 10:41:51 +02:00
.gitignore
acpi_numa.c
acpi_parking_protocol.c arm64: fix endianness annotation in acpi_parking_protocol.c 2017-06-29 11:33:15 +01:00
acpi.c ACPI / boot: Correct address space of __acpi_map_table() 2017-07-24 22:47:56 +02:00
alternative.c arm64: fix endianness annotation for __apply_alternatives()/get_alt_insn() 2017-06-29 16:32:43 +01:00
arm64ksyms.c
armv8_deprecated.c
asm-offsets.c arm64: unwind: reference pt_regs via embedded stack frame 2017-08-09 14:07:13 +01:00
cacheinfo.c
cpu_errata.c arm64: Add workaround for Cavium Thunder erratum 30115 2017-06-15 09:45:04 +01:00
cpu_ops.c arm64: Convert to using %pOF instead of full_name 2017-07-20 10:28:41 +01:00
cpu-reset.h
cpu-reset.S
cpufeature.c arm64: Implement pmem API support 2017-08-09 12:15:45 +01:00
cpuidle.c
cpuinfo.c arm64: Expose DC CVAP to userspace 2017-08-09 11:00:35 +01:00
crash_dump.c
debug-monitors.c arm64: fix endianness annotation for debug-monitors.c 2017-06-29 11:02:41 +01:00
efi-entry.S
efi-header.S
efi.c efi/arm: Enable DMI/SMBIOS 2017-06-05 17:50:44 +02:00
entry32.S
entry-fpsimd.S arm64: neon: Remove support for nested or hardirq kernel-mode NEON 2017-08-04 15:00:57 +01:00
entry-ftrace.S
entry.S Merge branch 'arm64/vmap-stack' of git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux into for-next/core 2017-08-15 18:40:58 +01:00
fpsimd.c arm64: fpsimd: Prevent registers leaking across exec 2017-08-22 18:15:42 +01:00
ftrace-mod.S arm64: ftrace: add support for far branches to dynamic ftrace 2017-06-07 11:52:02 +01:00
ftrace.c arm64: ftrace: fix !CONFIG_ARM64_MODULE_PLTS kernels 2017-06-23 18:21:13 +01:00
head.S arm64 updates for 4.14: 2017-09-05 09:53:37 -07:00
hibernate-asm.S
hibernate.c arm64: Move PTE_RDONLY bit handling out of set_pte_at() 2017-08-21 11:12:50 +01:00
hw_breakpoint.c
hyp-stub.S
image.h
insn.c arm64 updates for 4.13: 2017-07-05 17:09:27 -07:00
io.c
irq.c arm64: add basic VMAP_STACK support 2017-08-15 18:36:04 +01:00
jump_label.c
kaslr.c arm64: kaslr: Adjust the offset to avoid Image across alignment boundary 2017-08-22 18:15:42 +01:00
kgdb.c
kuser32.S
machine_kexec.c arm64: kexec: have own crash_smp_send_stop() for crash dump for nonpanic cores 2017-08-21 18:01:04 +01:00
Makefile arm64: ftrace: add support for far branches to dynamic ftrace 2017-06-07 11:52:02 +01:00
module-plts.c
module.c arm64: fix endianness annotation for reloc_insn_movw() & reloc_insn_imm() 2017-06-29 11:09:39 +01:00
module.lds
paravirt.c
pci.c PCI: Add a generic weak pcibios_align_resource() 2017-08-02 14:53:16 -05:00
perf_callchain.c arm64: unwind: remove sp from struct stackframe 2017-08-09 14:10:29 +01:00
perf_event.c arm64: perf: add support for Cortex-A35 2017-08-10 17:46:49 +01:00
perf_regs.c
process.c arm64 updates for 4.14: 2017-09-05 09:53:37 -07:00
psci.c
ptrace.c Merge branch 'arm64/vmap-stack' of git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux into for-next/core 2017-08-15 18:40:58 +01:00
reloc_test_core.c
reloc_test_syms.S
relocate_kernel.S
return_address.c arm64: unwind: remove sp from struct stackframe 2017-08-09 14:10:29 +01:00
setup.c arm64: check return value of of_flat_dt_get_machine_name 2017-05-30 11:07:42 +01:00
signal32.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2017-09-11 18:34:47 -07:00
signal.c arm64 updates for 4.14: 2017-09-05 09:53:37 -07:00
sleep.S
smccc-call.S
smp_spin_table.c
smp.c treewide: make "nr_cpu_ids" unsigned 2017-09-08 18:26:48 -07:00
stacktrace.c arm64: stacktrace: avoid listing stacktrace functions in stacktrace 2017-09-13 18:53:16 -07:00
suspend.c
sys32.c
sys_compat.c
sys.c
time.c arm64: unwind: remove sp from struct stackframe 2017-08-09 14:10:29 +01:00
topology.c arm64: Convert to using %pOF instead of full_name 2017-07-20 10:28:41 +01:00
trace-events-emulation.h
traps.c Merge branch 'arm64/vmap-stack' of git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux into for-next/core 2017-08-15 18:40:58 +01:00
vdso.c arm64/vdso: Support mremap() for vDSO 2017-08-09 12:16:28 +01:00
vmlinux.lds.S arm64: add basic VMAP_STACK support 2017-08-15 18:36:04 +01:00