]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Document sockmap '-target bpf' requirement for PROG_TYPE_SK_MSG
authorJohn Fastabend <john.fastabend@gmail.com>
Mon, 23 Apr 2018 19:11:02 +0000 (12:11 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 23 Apr 2018 21:42:21 +0000 (23:42 +0200)
commit87b9d81f921fee511ecd81988de23af2b4b72e2a
treef806288e530b2d6623b599123bea3d229a37d68d
parentcb5a6f0901f9bb1d8f2476adec147ca24f4e6070
bpf: Document sockmap '-target bpf' requirement for PROG_TYPE_SK_MSG

BPF_PROG_TYPE_SK_MSG programs use a 'void *' for both data and the
data_end pointers. Additionally, the verifier ensures that every
accesses into the values is a __u64 read. This correctly maps on
to the BPF 64-bit architecture.

However, to ensure that when building on 32bit architectures that
clang uses correct types the '-target bpf' option _must_ be
specified. To make this clear add a note to the Documentation.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Documentation/bpf/bpf_devel_QA.txt