Re: [PATCH bpf-next v1 1/8] bpf: Introduce pseudo_btf_id

2020-08-24 Thread Yonghong Song
On 8/24/20 5:05 PM, Hao Luo wrote: Yonghong, An update on this thread. I successfully reproduced this issue on a 8.2.0 gcc compiler, It looks like gcc 4.9 did not have this issue. I was also using clang which did not show this bug. It seems having a DW_AT_specification that refers to another

Re: [PATCH bpf-next v1 1/8] bpf: Introduce pseudo_btf_id

2020-08-20 Thread Alexei Starovoitov
On Wed, Aug 19, 2020 at 03:40:23PM -0700, Hao Luo wrote: > + > /* verify BPF_LD_IMM64 instruction */ > static int check_ld_imm(struct bpf_verifier_env *env, struct bpf_insn *insn) > { > @@ -7234,6 +7296,9 @@ static int check_ld_imm(struct bpf_verifier_env *env, > struct bpf_insn *insn) >

Re: [PATCH bpf-next v1 1/8] bpf: Introduce pseudo_btf_id

2020-08-20 Thread Yonghong Song
On 8/19/20 3:40 PM, Hao Luo wrote: Pseudo_btf_id is a type of ld_imm insn that associates a btf_id to a ksym so that further dereferences on the ksym can use the BTF info to validate accesses. Internally, when seeing a pseudo_btf_id ld insn, the verifier reads the btf_id stored in the insn[0]'

Re: [PATCH bpf-next v1 1/8] bpf: Introduce pseudo_btf_id

2020-08-20 Thread Yonghong Song
On 8/19/20 3:40 PM, Hao Luo wrote: Pseudo_btf_id is a type of ld_imm insn that associates a btf_id to a ksym so that further dereferences on the ksym can use the BTF info to validate accesses. Internally, when seeing a pseudo_btf_id ld insn, the verifier reads the btf_id stored in the insn[0]'