Showing the changes to kernel (2 of 208 files). Show all
Unified · Split
| @@ -2454,6 +2454,7 @@ static bool states_equal(struct bpf_verifier_env *env, · 2453 unmodified lines | |||
| 2454 | struct bpf_verifier_state *old, | 2454 | struct bpf_verifier_state *old, |
| 2455 | struct bpf_verifier_state *cur) | 2455 | struct bpf_verifier_state *cur) |
| 2456 | { | 2456 | { |
| 2457 | bool varlen_map_access = env->varlen_map_value_access; | ||
| 2457 | struct bpf_reg_state *rold, *rcur; | 2458 | struct bpf_reg_state *rold, *rcur; |
| 2458 | int i; | 2459 | int i; |
| 2459 | 2460 | ||
| @@ -2467,12 +2468,17 @@ static bool states_equal(struct bpf_verifier_env *env, · 7 unmodified lines | |||
| 2467 | /* If the ranges were not the same, but everything else was and | 2468 | /* If the ranges were not the same, but everything else was and |
| 2468 | * we didn't do a variable access into a map then we are a-ok. | 2469 | * we didn't do a variable access into a map then we are a-ok. |
| 2469 | */ | 2470 | */ |
| 2470 | if (!env->varlen_map_value_access && | 2471 | if (!varlen_map_access && |
| 2471 | rold->type == rcur->type && rold->imm == rcur->imm) | 2472 | rold->type == rcur->type && rold->imm == rcur->imm) |
| 2472 | continue; | 2473 | continue; |
| 2473 | 2474 | ||
| 2475 | /* If we didn't map access then again we don't care about the | ||
| 2476 | * mismatched range values and it's ok if our old type was | ||
| 2477 | * UNKNOWN and we didn't go to a NOT_INIT'ed reg. | ||
| 2478 | */ | ||
| 2474 | if (rold->type == NOT_INIT || | 2479 | if (rold->type == NOT_INIT || |
| 2475 | (rold->type == UNKNOWN_VALUE && rcur->type != NOT_INIT)) | 2480 | (!varlen_map_access && rold->type == UNKNOWN_VALUE && |
| 2481 | rcur->type != NOT_INIT)) | ||
| 2476 | continue; | 2482 | continue; |
| 2477 | 2483 | ||
| 2478 | if (rold->type == PTR_TO_PACKET && rcur->type == PTR_TO_PACKET && | 2484 | if (rold->type == PTR_TO_PACKET && rcur->type == PTR_TO_PACKET && |
| @@ -1301,8 +1301,9 @@ static int check_version(Elf_Shdr *sechdrs, · 1300 unmodified lines | |||
| 1301 | goto bad_version; | 1301 | goto bad_version; |
| 1302 | } | 1302 | } |
| 1303 | 1303 | ||
| 1304 | pr_warn("%s: no symbol version for %s\n", mod->name, symname); | 1304 | /* Broken toolchain. Warn once, then let it go.. */ |
| 1305 | return 0; | 1305 | pr_warn_once("%s: no symbol version for %s\n", mod->name, symname); |
| 1306 | return 1; | ||
| 1306 | 1307 | ||
| 1307 | bad_version: | 1308 | bad_version: |
| 1308 | pr_warn("%s: disagrees about version of symbol %s\n", | 1309 | pr_warn("%s: disagrees about version of symbol %s\n", |