Lines Matching refs:rold
8748 static bool regs_exact(const struct bpf_reg_state *rold,
8753 struct bpf_reg_state *rold, struct bpf_reg_state *rcur, in maybe_widen_reg() argument
8756 if (rold->type != SCALAR_VALUE) in maybe_widen_reg()
8758 if (rold->type != rcur->type) in maybe_widen_reg()
8760 if (rold->precise || rcur->precise || regs_exact(rold, rcur, idmap)) in maybe_widen_reg()
18292 static bool regs_exact(const struct bpf_reg_state *rold, in regs_exact() argument
18296 return memcmp(rold, rcur, offsetof(struct bpf_reg_state, id)) == 0 && in regs_exact()
18297 check_ids(rold->id, rcur->id, idmap) && in regs_exact()
18298 check_ids(rold->ref_obj_id, rcur->ref_obj_id, idmap); in regs_exact()
18308 static bool regsafe(struct bpf_verifier_env *env, struct bpf_reg_state *rold, in regsafe() argument
18313 return regs_exact(rold, rcur, idmap); in regsafe()
18315 if (!(rold->live & REG_LIVE_READ) && exact == NOT_EXACT) in regsafe()
18318 if (rold->type == NOT_INIT) { in regsafe()
18345 if (rold->type != rcur->type) in regsafe()
18348 switch (base_type(rold->type)) { in regsafe()
18354 return memcmp(rold, rcur, offsetof(struct bpf_reg_state, id)) == 0 && in regsafe()
18355 check_scalar_ids(rold->id, rcur->id, idmap); in regsafe()
18357 if (!rold->precise && exact == NOT_EXACT) in regsafe()
18359 if ((rold->id & BPF_ADD_CONST) != (rcur->id & BPF_ADD_CONST)) in regsafe()
18361 if ((rold->id & BPF_ADD_CONST) && (rold->off != rcur->off)) in regsafe()
18387 return range_within(rold, rcur) && in regsafe()
18388 tnum_in(rold->var_off, rcur->var_off) && in regsafe()
18389 check_scalar_ids(rold->id, rcur->id, idmap); in regsafe()
18398 return memcmp(rold, rcur, offsetof(struct bpf_reg_state, var_off)) == 0 && in regsafe()
18399 range_within(rold, rcur) && in regsafe()
18400 tnum_in(rold->var_off, rcur->var_off) && in regsafe()
18401 check_ids(rold->id, rcur->id, idmap) && in regsafe()
18402 check_ids(rold->ref_obj_id, rcur->ref_obj_id, idmap); in regsafe()
18411 if (rold->range > rcur->range) in regsafe()
18416 if (rold->off != rcur->off) in regsafe()
18419 if (!check_ids(rold->id, rcur->id, idmap)) in regsafe()
18422 return range_within(rold, rcur) && in regsafe()
18423 tnum_in(rold->var_off, rcur->var_off); in regsafe()
18428 return regs_exact(rold, rcur, idmap) && rold->frameno == rcur->frameno; in regsafe()
18432 return regs_exact(rold, rcur, idmap); in regsafe()