PTR_TO_BTF_ID
PTR_TO_BTF_ID_OR_NULL = PTR_MAYBE_NULL | PTR_TO_BTF_ID,
return base_type(type) == PTR_TO_BTF_ID && type_flag(type) & MEM_ALLOC;
info->reg_type = PTR_TRUSTED | PTR_TO_BTF_ID | PTR_MAYBE_NULL;
info->reg_type = PTR_TRUSTED | PTR_TO_BTF_ID;
info->reg_type = PTR_TO_BTF_ID;
return PTR_TO_BTF_ID;
[PTR_TO_BTF_ID] = "ptr_",
if (base_type(type) == PTR_TO_BTF_ID)
if (base_type(t) == PTR_TO_BTF_ID)
callee->regs[BPF_REG_2].type = PTR_TO_BTF_ID;
regs[BPF_REG_0].type = PTR_TO_BTF_ID | MEM_ALLOC | MEM_RCU;
regs[BPF_REG_0].type = PTR_TO_BTF_ID | ret_flag;
regs[BPF_REG_0].type = PTR_TO_BTF_ID | ret_flag;
if ((base_type(reg->type) == PTR_TO_BTF_ID || reg2btf_ids[base_type(reg->type)])) {
if (base_type(reg->type) == PTR_TO_BTF_ID) {
case PTR_TO_BTF_ID | MEM_ALLOC:
if (reg->type == (PTR_TO_BTF_ID | MEM_ALLOC)) {
} else if (reg->type == (PTR_TO_BTF_ID | MEM_ALLOC | MEM_PERCPU)) {
reg->type != (PTR_TO_BTF_ID | MEM_ALLOC)) {
if (reg->type == (PTR_TO_BTF_ID | MEM_ALLOC) && !reg->ref_obj_id) {
reg->type != (PTR_TO_BTF_ID | MEM_ALLOC)) {
if (reg->type == (PTR_TO_BTF_ID | MEM_ALLOC) && !reg->ref_obj_id) {
if (reg->type != (PTR_TO_BTF_ID | MEM_ALLOC)) {
if (reg->type != (PTR_TO_BTF_ID | MEM_ALLOC)) {
if ((base_type(reg->type) != PTR_TO_BTF_ID ||
if (reg->type != PTR_TO_MAP_VALUE && reg->type != (PTR_TO_BTF_ID | MEM_ALLOC)) {
regs[BPF_REG_0].type = PTR_TO_BTF_ID | MEM_ALLOC;
regs[BPF_REG_0].type = PTR_TO_BTF_ID | MEM_ALLOC;
regs[BPF_REG_0].type = PTR_TO_BTF_ID | PTR_TRUSTED;
regs[BPF_REG_0].type = PTR_TO_BTF_ID | PTR_UNTRUSTED;
enum bpf_reg_type type = PTR_TO_BTF_ID;
case PTR_TO_BTF_ID:
base_type(src_reg->type) != PTR_TO_BTF_ID &&
base_type(dst_reg->type) != PTR_TO_BTF_ID) {
case PTR_TO_BTF_ID:
case PTR_TO_BTF_ID:
case PTR_TO_BTF_ID:
merged_type = PTR_TO_BTF_ID;
aux->btf_var.reg_type = PTR_TO_BTF_ID | MEM_PERCPU;
aux->btf_var.reg_type = PTR_TO_BTF_ID;
case PTR_TO_BTF_ID:
case PTR_TO_BTF_ID | PTR_UNTRUSTED:
case PTR_TO_BTF_ID | MEM_ALLOC | PTR_UNTRUSTED:
regs[regno].type = PTR_TO_BTF_ID | MEM_ALLOC;
reg->type = PTR_TO_BTF_ID;
case PTR_TO_BTF_ID:
regs[regno].type = PTR_TO_BTF_ID | flag;
(type == PTR_TO_BTF_ID && is_trusted_reg(reg)) ||
case PTR_TO_BTF_ID:
if (base_type(reg->type) != PTR_TO_BTF_ID || (type_flag(reg->type) & ~perm_flags))
verbose(env, "expected=%s%s", reg_type_str(env, PTR_TO_BTF_ID), targ_name);
verbose(env, " or %s%s\n", reg_type_str(env, PTR_TO_BTF_ID | PTR_UNTRUSTED),
ret = mark_btf_ld_reg(env, cur_regs(env), value_regno, PTR_TO_BTF_ID,
if (base_type(info->reg_type) == PTR_TO_BTF_ID) {
if (ret != PTR_TO_BTF_ID) {
ret = mark_btf_ld_reg(env, &map_reg, 0, PTR_TO_BTF_ID,
if (base_type(info.reg_type) == PTR_TO_BTF_ID) {
} else if (base_type(reg->type) == PTR_TO_BTF_ID &&
case PTR_TO_BTF_ID:
PTR_TO_BTF_ID,
PTR_TO_BTF_ID | PTR_TRUSTED,
PTR_TO_BTF_ID | PTR_TRUSTED,
PTR_TO_BTF_ID | MEM_ALLOC,
PTR_TO_BTF_ID,
PTR_TO_BTF_ID | PTR_TRUSTED,
PTR_TO_BTF_ID | MEM_RCU,
PTR_TO_BTF_ID | MEM_PERCPU,
PTR_TO_BTF_ID | MEM_PERCPU | MEM_RCU,
PTR_TO_BTF_ID | MEM_PERCPU | PTR_TRUSTED,
PTR_TO_BTF_ID | MEM_ALLOC
if (base_type(reg->type) != PTR_TO_BTF_ID)
case PTR_TO_BTF_ID:
case PTR_TO_BTF_ID | PTR_TRUSTED:
case PTR_TO_BTF_ID | PTR_TRUSTED | PTR_MAYBE_NULL:
case PTR_TO_BTF_ID | MEM_RCU:
case PTR_TO_BTF_ID | PTR_MAYBE_NULL:
case PTR_TO_BTF_ID | PTR_MAYBE_NULL | MEM_RCU:
case PTR_TO_BTF_ID | MEM_ALLOC:
case PTR_TO_BTF_ID | MEM_PERCPU | MEM_ALLOC:
case PTR_TO_BTF_ID | MEM_PERCPU:
case PTR_TO_BTF_ID | MEM_PERCPU | MEM_RCU:
case PTR_TO_BTF_ID | MEM_PERCPU | PTR_TRUSTED:
case PTR_TO_BTF_ID:
case PTR_TO_BTF_ID | MEM_ALLOC:
case PTR_TO_BTF_ID | PTR_TRUSTED:
case PTR_TO_BTF_ID | MEM_RCU:
case PTR_TO_BTF_ID | MEM_ALLOC | NON_OWN_REF:
case PTR_TO_BTF_ID | MEM_ALLOC | NON_OWN_REF | MEM_RCU:
if (base_type(info->reg_type) == PTR_TO_BTF_ID &&
info->reg_type = PTR_TO_BTF_ID | PTR_TRUSTED;
info->reg_type = PTR_TO_BTF_ID | PTR_TRUSTED;