]> git.ipfire.org Git - people/ms/linux.git/commit
bpf, x86: Store caller's ip in trampoline stack
authorJiri Olsa <jolsa@redhat.com>
Wed, 14 Jul 2021 09:43:53 +0000 (11:43 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 16 Jul 2021 00:16:06 +0000 (17:16 -0700)
commit7e6f3cd89f04a0a577002d5696288b482109d25c
treedd610c2eeeeab77706fdbe55b881323d4b01dc9e
parent7628317192f590123c615946c432465e817627a8
bpf, x86: Store caller's ip in trampoline stack

Storing caller's ip in trampoline's stack. Trampoline programs
can reach the IP in (ctx - 8) address, so there's no change in
program's arguments interface.

The IP address is takes from [fp + 8], which is return address
from the initial 'call fentry' call to trampoline.

This IP address will be returned via bpf_get_func_ip helper
helper, which is added in following patches.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210714094400.396467-2-jolsa@kernel.org
arch/x86/net/bpf_jit_comp.c
include/linux/bpf.h