Lines Matching defs:rold
8847 static bool regs_exact(const struct bpf_reg_state *rold,
8852 struct bpf_reg_state *rold, struct bpf_reg_state *rcur,
8855 if (rold->type != SCALAR_VALUE)
8857 if (rold->type != rcur->type)
8859 if (rold->precise || rcur->precise || regs_exact(rold, rcur, idmap))
18656 static bool regs_exact(const struct bpf_reg_state *rold,
18660 return memcmp(rold, rcur, offsetof(struct bpf_reg_state, id)) == 0 &&
18661 check_ids(rold->id, rcur->id, idmap) &&
18662 check_ids(rold->ref_obj_id, rcur->ref_obj_id, idmap);
18671 /* Returns true if (rold safe implies rcur safe) */
18672 static bool regsafe(struct bpf_verifier_env *env, struct bpf_reg_state *rold,
18677 return regs_exact(rold, rcur, idmap);
18679 if (rold->type == NOT_INIT) {
18706 if (rold->type != rcur->type)
18709 switch (base_type(rold->type)) {
18715 return memcmp(rold, rcur, offsetof(struct bpf_reg_state, id)) == 0 &&
18716 check_scalar_ids(rold->id, rcur->id, idmap);
18718 if (!rold->precise && exact == NOT_EXACT)
18720 if ((rold->id & BPF_ADD_CONST) != (rcur->id & BPF_ADD_CONST))
18722 if ((rold->id & BPF_ADD_CONST) && (rold->off != rcur->off))
18748 return range_within(rold, rcur) &&
18749 tnum_in(rold->var_off, rcur->var_off) &&
18750 check_scalar_ids(rold->id, rcur->id, idmap);
18759 return memcmp(rold, rcur, offsetof(struct bpf_reg_state, var_off)) == 0 &&
18760 range_within(rold, rcur) &&
18761 tnum_in(rold->var_off, rcur->var_off) &&
18762 check_ids(rold->id, rcur->id, idmap) &&
18763 check_ids(rold->ref_obj_id, rcur->ref_obj_id, idmap);
18772 if (rold->range > rcur->range)
18777 if (rold->off != rcur->off)
18780 if (!check_ids(rold->id, rcur->id, idmap))
18783 return range_within(rold, rcur) &&
18784 tnum_in(rold->var_off, rcur->var_off);
18789 return regs_exact(rold, rcur, idmap) && rold->frameno == rcur->frameno;
18793 return regs_exact(rold, rcur, idmap);