aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/bpf/verifier.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-12-03 11:46:54 -0500
committerDavid S. Miller <davem@davemloft.net>2016-12-03 12:29:53 -0500
commit2745529ac7358fdac72e6b388da2e934bd9da82c (patch)
tree245bb05b1a18189c5a5212db914c70a636d8267a /kernel/bpf/verifier.c
parentab17cb1fea82b346bdecd4f2d7f0e84e80f847af (diff)
parent8dc0f265d39a3933f4c1f846c7c694f12a2ab88a (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Couple conflicts resolved here: 1) In the MACB driver, a bug fix to properly initialize the RX tail pointer properly overlapped with some changes to support variable sized rings. 2) In XGBE we had a "CONFIG_PM" --> "CONFIG_PM_SLEEP" fix overlapping with a reorganization of the driver to support ACPI, OF, as well as PCI variants of the chip. 3) In 'net' we had several probe error path bug fixes to the stmmac driver, meanwhile a lot of this code was cleaned up and reorganized in 'net-next'. 4) The cls_flower classifier obtained a helper function in 'net-next' called __fl_delete() and this overlapped with Daniel Borkamann's bug fix to use RCU for object destruction in 'net'. It also overlapped with Jiri's change to guard the rhashtable_remove_fast() call with a check against tc_skip_sw(). 5) In mlx4, a revert bug fix in 'net' overlapped with some unrelated changes in 'net-next'. 6) In geneve, a stale header pointer after pskb_expand_head() bug fix in 'net' overlapped with a large reorganization of the same code in 'net-next'. Since the 'net-next' code no longer had the bug in question, there was nothing to do other than to simply take the 'net-next' hunks. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/bpf/verifier.c')
-rw-r--r--kernel/bpf/verifier.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 8135cb1077ee..0e742210750e 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -2508,6 +2508,7 @@ static bool states_equal(struct bpf_verifier_env *env,
2508 struct bpf_verifier_state *old, 2508 struct bpf_verifier_state *old,
2509 struct bpf_verifier_state *cur) 2509 struct bpf_verifier_state *cur)
2510{ 2510{
2511 bool varlen_map_access = env->varlen_map_value_access;
2511 struct bpf_reg_state *rold, *rcur; 2512 struct bpf_reg_state *rold, *rcur;
2512 int i; 2513 int i;
2513 2514
@@ -2521,12 +2522,17 @@ static bool states_equal(struct bpf_verifier_env *env,
2521 /* If the ranges were not the same, but everything else was and 2522 /* If the ranges were not the same, but everything else was and
2522 * we didn't do a variable access into a map then we are a-ok. 2523 * we didn't do a variable access into a map then we are a-ok.
2523 */ 2524 */
2524 if (!env->varlen_map_value_access && 2525 if (!varlen_map_access &&
2525 rold->type == rcur->type && rold->imm == rcur->imm) 2526 rold->type == rcur->type && rold->imm == rcur->imm)
2526 continue; 2527 continue;
2527 2528
2529 /* If we didn't map access then again we don't care about the
2530 * mismatched range values and it's ok if our old type was
2531 * UNKNOWN and we didn't go to a NOT_INIT'ed reg.
2532 */
2528 if (rold->type == NOT_INIT || 2533 if (rold->type == NOT_INIT ||
2529 (rold->type == UNKNOWN_VALUE && rcur->type != NOT_INIT)) 2534 (!varlen_map_access && rold->type == UNKNOWN_VALUE &&
2535 rcur->type != NOT_INIT))
2530 continue; 2536 continue;
2531 2537
2532 if (rold->type == PTR_TO_PACKET && rcur->type == PTR_TO_PACKET && 2538 if (rold->type == PTR_TO_PACKET && rcur->type == PTR_TO_PACKET &&