bpf/verifier: increase complexity limit to 128k
authorEdward Cree <ecree@solarflare.com>
Mon, 7 Aug 2017 14:30:30 +0000 (15:30 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Aug 2017 00:51:35 +0000 (17:51 -0700)
The more detailed value tracking can reduce the effectiveness of pruning
 for some programs.  So, to avoid rejecting previously valid programs, up
 the limit to 128kinsns.  Hopefully we will be able to bring this back
 down later by improving pruning performance.

Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
kernel/bpf/verifier.c

index 08a6fa0..8160a81 100644 (file)
@@ -140,7 +140,7 @@ struct bpf_verifier_stack_elem {
        struct bpf_verifier_stack_elem *next;
 };
 
-#define BPF_COMPLEXITY_LIMIT_INSNS     98304
+#define BPF_COMPLEXITY_LIMIT_INSNS     131072
 #define BPF_COMPLEXITY_LIMIT_STACK     1024
 
 #define BPF_MAP_PTR_POISON ((void *)0xeB9F + POISON_POINTER_DELTA)