s390/ftrace: generate traced function stack frame
Vasily Gorbik authored
[ Upstream commit 45f7a0da ]

Currently backtrace from ftraced function does not contain ftraced
function itself. e.g. for "path_openat":

arch_stack_walk+0x15c/0x2d8
stack_trace_save+0x50/0x68
stack_trace_call+0x15e/0x3d8
ftrace_graph_caller+0x0/0x1c <-- ftrace code
do_filp_open+0x7c/0xe8 <-- ftraced function caller
do_open_execat+0x76/0x1b8
open_exec+0x52/0x78
load_elf_binary+0x180/0x1160
search_binary_handler+0x8e/0x288
load_script+0x2a8/0x2b8
search_binary_handler+0x8e/0x288
__do_execve_file.isra.39+0x6fa/0xb40
__s390x_sys_execve+0x56/0x68
system_call+0xdc/0x2d8

Ftraced function is expected in the backtrace by ftrace kselftests, which
are now failing. It would also be nice to have it for clarity reasons.

"ftrace_caller" itself is called without stack frame allocated for it
and does not store its caller (ftraced function). Instead it simply
allocates a stack frame for "ftrace_trace_function" and sets backchain
to point ...
843eb0a8
Name Last commit Last update
..
alpha mm: introduce MADV_PAGEOUT
arc ARC: [plat-axs10x]: Add missing multicast filter number to GMAC node
arm ARM: dts: rockchip: add reg property to brcmf sub node for rk3188-bqedison2qc
arm64 arm64: dts: ti: k3-j721e-main: Add missing power-domains for smmu
c6x mm: consolidate pgtable_cache_init() and pgd_cache_init()
csky Merge tag 'csky-for-linus-5.4-rc1' of git://github.com/c-sky/csky-linux
h8300 mm: consolidate pgtable_cache_init() and pgd_cache_init()
hexagon hexagon: work around compiler crash
ia64 mm/memory_hotplug: shrink zones when offlining memory
m68k mm: treewide: clarify pgtable_page_{ctor,dtor}() naming
microblaze Merge branch 'akpm' (patches from Andrew)
mips MIPS: Loongson: Fix potential NULL dereference in loongson3_platform_init()
nds32 asm-generic/nds32: don't redefine cacheflush primitives
nios2 Merge tag 'nios2-v5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2
openrisc mm: treewide: clarify pgtable_page_{ctor,dtor}() naming
parisc parisc: Use proper printk format for resource_size_t
powerpc KVM: PPC: Remove set but not used variable 'ra', 'rs', 'rt'
riscv riscv, bpf: Fix broken BPF tail calls
s390 s390/ftrace: generate traced function stack frame
sh pinctrl: sh-pfc: sh7269: Fix CAN function GPIOs
sparc sparc: Add .exit.data section.
um Revert "um: Enable CONFIG_CONSTRUCTORS"
unicore32 mm: treewide: clarify pgtable_page_{ctor,dtor}() naming
x86 x86/decoder: Add TEST opcode to Group3-2
xtensa xtensa: Implement copy_thread_tls
.gitignore arch: Ignore arch/i386 and arch/x86_64
Kconfig mm/mmu_gather: invalidate TLB correctly on batch allocation failure and flush