aboutsummaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorChris Zankel2014-11-10 00:05:43 -0800
committerChris Zankel2014-11-10 00:05:43 -0800
commitaeb589734251aaf4c28d80d0efb5da01dc0ce868 (patch)
treeea1ee0a54d4c24221a1e80cd07e899f8b34a6920 /samples
parent66acb0216d5ae1f29fe76c5a192547664c5c0159 (diff)
parent206c5f60a3d902bc4b56dab2de3e88de5eb06108 (diff)
Merge tag 'v3.18-rc4' into for_next
Linux 3.18-rc4
Diffstat (limited to 'samples')
-rw-r--r--samples/bpf/test_verifier.c11
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),