diff options
author | Mark Brown <broonie@kernel.org> | 2014-11-26 20:37:57 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-26 20:37:57 +0000 |
commit | cf2394f70cf7774a107fbaa1ef5010db4bd69baa (patch) | |
tree | e79e3e479d04213a67ecd47b31c7db648b0313c2 /samples/bpf/test_verifier.c | |
parent | 45fc84c668ba6cc08cbae74042be838bf9283d98 (diff) | |
parent | 206c5f60a3d902bc4b56dab2de3e88de5eb06108 (diff) |
Merge tag 'v3.18-rc4' into regulator-max77802
Linux 3.18-rc4
Diffstat (limited to 'samples/bpf/test_verifier.c')
-rw-r--r-- | samples/bpf/test_verifier.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/samples/bpf/test_verifier.c b/samples/bpf/test_verifier.c index f44ef11f65a7..eb4bec0ad8af 100644 --- a/samples/bpf/test_verifier.c +++ b/samples/bpf/test_verifier.c @@ -209,6 +209,17 @@ static struct bpf_test tests[] = { .result = REJECT, }, { + "program doesn't init R0 before exit in all branches", + .insns = { + BPF_JMP_IMM(BPF_JGE, BPF_REG_1, 0, 2), + BPF_MOV64_IMM(BPF_REG_0, 1), + BPF_ALU64_IMM(BPF_ADD, BPF_REG_0, 2), + BPF_EXIT_INSN(), + }, + .errstr = "R0 !read_ok", + .result = REJECT, + }, + { "stack out of bounds", .insns = { BPF_ST_MEM(BPF_DW, BPF_REG_10, 8, 0), |