linux-stable/arch/x86
Steven Rostedt (VMware) 02a474ca26 ftrace/x86: Allow for arguments to be passed in to ftrace_regs by default
Currently, the only way to get access to the registers of a function via a
ftrace callback is to set the "FL_SAVE_REGS" bit in the ftrace_ops. But as this
saves all regs as if a breakpoint were to trigger (for use with kprobes), it
is expensive.

The regs are already saved on the stack for the default ftrace callbacks, as
that is required otherwise a function being traced will get the wrong
arguments and possibly crash. And on x86, the arguments are already stored
where they would be on a pt_regs structure to use that code for both the
regs version of a callback, it makes sense to pass that information always
to all functions.

If an architecture does this (as x86_64 now does), it is to set
HAVE_DYNAMIC_FTRACE_WITH_ARGS, and this will let the generic code that it
could have access to arguments without having to set the flags.

This also includes having the stack pointer being saved, which could be used
for accessing arguments on the stack, as well as having the function graph
tracer not require its own trampoline!

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2020-11-13 12:14:59 -05:00
..
boot treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
configs * A defconfig fix, from Daniel Díaz. 2020-09-20 15:06:43 -07:00
crypto crypto: x86/poly1305 - add back a needed assignment 2020-10-24 09:38:32 +11:00
entry A couple of x86 fixes which missed rc1 due to my stupidity: 2020-10-27 14:39:29 -07:00
events These are the performance events changes for v5.10: 2020-10-12 14:14:35 -07:00
hyperv x86/hyperv: Remove aliases with X64 in their name 2020-09-28 09:01:07 +00:00
ia32 x86: remove address space overrides using set_fs() 2020-09-08 22:21:36 -04:00
include ftrace/x86: Allow for arguments to be passed in to ftrace_regs by default 2020-11-13 12:14:59 -05:00
kernel ftrace/x86: Allow for arguments to be passed in to ftrace_regs by default 2020-11-13 12:14:59 -05:00
kvm KVM: vmx: remove unused variable 2020-10-31 11:38:43 -04:00
lib Merge branch 'work.set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2020-10-22 09:59:21 -07:00
math-emu treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
mm treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
net bpf: x64: Do not emit sub/add 0, %rsp when !stack_depth 2020-09-29 16:47:39 -07:00
oprofile
pci pci-v5.10-changes 2020-10-22 12:41:00 -07:00
platform treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
power Kbuild updates for v5.9 2020-08-09 14:10:26 -07:00
purgatory treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
ras
realmode x86/head/64: Don't call verify_cpu() on starting APs 2020-09-09 11:33:20 +02:00
tools x86/insn: Make inat-tables.c suitable for pre-decompression code 2020-09-07 19:45:24 +02:00
um arch/um: partially revert the conversion to __section() macro 2020-10-26 15:39:37 -07:00
video
xen treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
.gitignore
Kbuild
Kconfig ftrace/x86: Allow for arguments to be passed in to ftrace_regs by default 2020-11-13 12:14:59 -05:00
Kconfig.assembler
Kconfig.cpu
Kconfig.debug x86, powerpc: Rename memcpy_mcsafe() to copy_mc_to_{user, kernel}() 2020-10-06 11:18:04 +02:00
Makefile x86/build: Warn on orphan section placement 2020-09-03 10:28:36 +02:00
Makefile.um
Makefile_32.cpu