]> asedeno.scripts.mit.edu Git - linux.git/commit
bpf: add support for bpf_call to interpreter
authorAlexei Starovoitov <ast@fb.com>
Fri, 15 Dec 2017 01:55:13 +0000 (17:55 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Sun, 17 Dec 2017 19:34:36 +0000 (20:34 +0100)
commit1ea47e01ad6ea0fe99697c54c2413d81dd21fe32
tree059896b103b90563e4eb4d3947200de1a6a2c283
parentb0b04fc49e3b97a6039b9b658798efdcda71478d
bpf: add support for bpf_call to interpreter

though bpf_call is still the same call instruction and
calling convention 'bpf to bpf' and 'bpf to helper' is the same
the interpreter has to oparate on 'struct bpf_insn *'.
To distinguish these two cases add a kernel internal opcode and
mark call insns with it.
This opcode is seen by interpreter only. JITs will never see it.
Also add tiny bit of debug code to aid interpreter debugging.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
include/linux/bpf.h
include/linux/filter.h
kernel/bpf/core.c
kernel/bpf/verifier.c