On Tue, Aug 25, 2020 at 11:29 AM KP Singh <kpsingh@xxxxxxxxxxxx> wrote: > > From: KP Singh <kpsingh@xxxxxxxxxx> > > # v9 -> v10 > > - Added NULL check for inode_storage_ptr before calling > bpf_local_storage_update > - Removed an extraneous include > - Rebased and added Acks / Signoff. Hmm. Though it looks good I cannot apply it, because test_progs -t map_ptr is broken: 2225: (18) r2 = 0xffffc900004e5004 2227: (b4) w1 = 58 2228: (63) *(u32 *)(r2 +0) = r1 R0=map_value(id=0,off=0,ks=4,vs=4,imm=0) R1_w=inv58 R2_w=map_value(id=0,off=4,ks=4,vs=8,imm=0) R3=inv49 R4=inv63 R5=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff)) R6_w=inv0 R7=invP8 R8=map_ptr(id=0,off=0,ks=4,vs=4,imm=0) R10=? ; VERIFY_TYPE(BPF_MAP_TYPE_SK_STORAGE, check_sk_storage); 2229: (18) r1 = 0xffffc900004e5000 2231: (b4) w3 = 24 2232: (63) *(u32 *)(r1 +0) = r3 R0=map_value(id=0,off=0,ks=4,vs=4,imm=0) R1_w=map_value(id=0,off=0,ks=4,vs=8,imm=0) R2_w=map_value(id=0,off=4,ks=4,vs=8,imm=0) R3_w=inv24 R4=inv63 R5=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff)) R6_w=inv0 R7=invP8 R8=map_pt? 2233: (18) r3 = 0xffff8881f03f7000 ; VERIFY(indirect->map_type == direct->map_type); 2235: (85) call unknown#195896080 invalid func unknown#195896080 processed 4678 insns (limit 1000000) max_states_per_insn 9 total_states 240 peak_states 178 mark_read 11 libbpf: -- END LOG -- libbpf: failed to load program 'cgroup_skb/egress' libbpf: failed to load object 'map_ptr_kern' libbpf: failed to load BPF skeleton 'map_ptr_kern': -4007 test_map_ptr:FAIL:skel_open_load open_load failed #43 map_ptr:FAIL Above 'invalid func unknown#195896080' happens when libbpf fails to do a relocation at runtime. Please debug. It's certainly caused by this set, but not sure why.