bpf: add a test case in bpf selftests
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
....
which the previous verifier patch tries to handle.
The test prog load success indicates verifier is able to
handle that.
clang/llvm version used in testing:
ok: 3.9; bad: 4.0/5.0
Signed-off-by: Yonghong Song <yhs@fb.com>
3 files changed