On Fri, Nov 04, 2022 at 12:39:55AM +0530, Kumar Kartikeya Dwivedi wrote: > > -enum bpf_kptr_type { > - BPF_KPTR_UNREF, > - BPF_KPTR_REF, > +enum btf_field_type { > + BPF_KPTR_UNREF = (1 << 2), > + BPF_KPTR_REF = (1 << 3), > + BPF_KPTR = BPF_KPTR_UNREF | BPF_KPTR_REF, > }; ... > + for (i = 0; i < sizeof(map->record->field_mask) * 8; i++) { > + switch (map->record->field_mask & (1 << i)) { > + case 0: > + continue; > + case BPF_KPTR_UNREF: > + case BPF_KPTR_REF: > + if (map->map_type != BPF_MAP_TYPE_HASH && > + map->map_type != BPF_MAP_TYPE_LRU_HASH && > + map->map_type != BPF_MAP_TYPE_ARRAY && > + map->map_type != BPF_MAP_TYPE_PERCPU_ARRAY) { > + ret = -EOPNOTSUPP; > + goto free_map_tab; > + } > + break; > + default: > + /* Fail if map_type checks are missing for a field type */ > + ret = -EOPNOTSUPP; > + goto free_map_tab; > + } With this patch alone this is also wrong. And it breaks bisect. Please make sure to do a full vmtest.sh for every patch in the series.