Re: [PATCH bpf-next v2 1/6] bpf: Introduce pseudo_btf_id

2020-09-13 Thread Hao Luo
Andrii, Sorry for the late reply. Your suggestions are concrete and helpful. I can apply them in v3. Thanks! Hao On Fri, Sep 4, 2020 at 12:05 PM Andrii Nakryiko wrote: > > On Thu, Sep 3, 2020 at 3:34 PM Hao Luo wrote: > > > > Pseudo_btf_id is a type of ld_imm insn that associates a btf_id to a

Re: [PATCH bpf-next v2 1/6] bpf: Introduce pseudo_btf_id

2020-09-04 Thread Andrii Nakryiko
On Thu, Sep 3, 2020 at 3:34 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 store

[PATCH bpf-next v2 1/6] bpf: Introduce pseudo_btf_id

2020-09-03 Thread Hao Luo
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]'s imm field and marks the dst_reg as PTR