]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: sockmap sample use clang flag, -target bpf
authorJohn Fastabend <john.fastabend@gmail.com>
Mon, 23 Apr 2018 19:11:08 +0000 (12:11 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 23 Apr 2018 21:42:21 +0000 (23:42 +0200)
commit837c53c8e5cddcea1ea479791ad13bc869f73794
treec17538540373636c82bf497211adf60562cf1c7b
parent0437c346ffade249eca1d8d1d15e01bc6af2517e
bpf: sockmap sample use clang flag, -target bpf

Per Documentation/bpf/bpf_devel_QA.txt add the -target flag to the
sockmap Makefile. Relevant text quoted here,

   Otherwise, you can use bpf target. Additionally, you _must_ use
   bpf target when:

 - Your program uses data structures with pointer or long / unsigned
   long types that interface with BPF helpers or context data
   structures. Access into these structures is verified by the BPF
   verifier and may result in verification failures if the native
   architecture is not aligned with the BPF architecture, e.g. 64-bit.
   An example of this is BPF_PROG_TYPE_SK_MSG require '-target bpf'

Fixes: 6be658f05d40 ("bpf: sockmap sample program")
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
samples/sockmap/Makefile