Thread (67 messages) 67 messages, 12 authors, 2019-11-12

Re: [PATCH v3 bpf-next 14/18] bpf: Compare BTF types of functions arguments with actual types

From: Andrii Nakryiko <hidden>
Date: 2019-11-08 23:47:07
Also in: bpf

On Thu, Nov 7, 2019 at 10:42 PM Alexei Starovoitov [off-list ref] wrote:
Make the verifier check that BTF types of function arguments match actual types
passed into top-level BPF program and into BPF-to-BPF calls. If types match
such BPF programs and sub-programs will have full support of BPF trampoline. If
types mismatch the trampoline has to be conservative. It has to save/restore
all 5 program arguments and assume 64-bit scalars. If FENTRY/FEXIT program is
attached to this program in the future such FENTRY/FEXIT program will be able
to follow pointers only via bpf_probe_read_kernel().

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
---
Acked-by: Andrii Nakryiko <redacted>
 include/linux/bpf.h          |   8 +++
 include/linux/bpf_verifier.h |   1 +
 kernel/bpf/btf.c             | 117 +++++++++++++++++++++++++++++++++++
 kernel/bpf/syscall.c         |   1 +
 kernel/bpf/verifier.c        |  18 +++++-
 5 files changed, 142 insertions(+), 3 deletions(-)
[...]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help