From: Alexei Starovoitov <a...@fb.com> Date: Tue, 2 May 2017 19:58:14 -0700
> From: Yonghong Song <y...@fb.com> > > With clang/llvm 4.0+, the test case is able to generate > the following pattern: > .... > 440: (b7) r1 = 15 > 441: (05) goto pc+73 > 515: (79) r6 = *(u64 *)(r10 -152) > 516: (bf) r7 = r10 > 517: (07) r7 += -112 > 518: (bf) r2 = r7 > 519: (0f) r2 += r1 > 520: (71) r1 = *(u8 *)(r8 +0) > 521: (73) *(u8 *)(r2 +45) = r1 > .... > > commit 332270fdc8b6 ("bpf: enhance verifier to understand stack > pointer arithmetic") improved verifier to handle such a pattern. > This patch adds a C test case to actually generate such a pattern. > A dummy tracepoint interface is used to load the program > into the kernel. > > Signed-off-by: Yonghong Song <y...@fb.com> > Acked-by: Martin KaFai Lau <ka...@fb.com> > Acked-by: Daniel Borkmann <dan...@iogearbox.net> > Signed-off-by: Alexei Starovoitov <a...@kernel.org> Applied.