samples/bpf: fix sockex2 example
authorAlexei Starovoitov <ast@fb.com>
Wed, 23 Nov 2016 00:52:08 +0000 (16:52 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 Nov 2016 21:04:52 +0000 (16:04 -0500)
commitd2b024d32d6e6f704633a8a474bd883cf9e25254
tree94f9aacde15016c8541a2da9067d751db4ca9c71
parente3f42f8453902d1520dcdc9909731f274c6d52c1
samples/bpf: fix sockex2 example

since llvm commit "Do not expand UNDEF SDNode during insn selection lowering"
llvm will generate code that uses uninitialized registers for cases
where C code is actually uses uninitialized data.
So this sockex2 example is technically broken.
Fix it by initializing on the stack variable fully.
Also increase verifier buffer limit, since verifier output
may not fit in 64k for this sockex2 code depending on llvm version.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
samples/bpf/libbpf.h
samples/bpf/sockex2_kern.c