diff options
author | Jiri Olsa <jolsa@kernel.org> | 2021-05-05 15:25:29 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2021-05-07 01:28:28 +0200 |
commit | 31379397dcc364a59ce764fabb131b645c43e340 (patch) | |
tree | b8425935d3c9aebeba11671ea58badf599998bd0 /kernel/bpf/verifier.c | |
parent | samples/bpf: Consider frame size in tx_only of xdpsock sample (diff) | |
download | linux-31379397dcc364a59ce764fabb131b645c43e340.tar.xz linux-31379397dcc364a59ce764fabb131b645c43e340.zip |
bpf: Forbid trampoline attach for functions with variable arguments
We can't currently allow to attach functions with variable arguments.
The problem is that we should save all the registers for arguments,
which is probably doable, but if caller uses more than 6 arguments,
we need stack data, which will be wrong, because of the extra stack
frame we do in bpf trampoline, so we could crash.
Also currently there's malformed trampoline code generated for such
functions at the moment as described in:
https://lore.kernel.org/bpf/20210429212834.82621-1-jolsa@kernel.org/
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210505132529.401047-1-jolsa@kernel.org
Diffstat (limited to 'kernel/bpf/verifier.c')
0 files changed, 0 insertions, 0 deletions