Re: [PATCH v4 bpf-next 15/20] bpf: Annotate context types

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On Nov 14, 2019, at 10:57 AM, Alexei Starovoitov <ast@xxxxxxxxxx> wrote:
> 
> Annotate BPF program context types with program-side type and kernel-side type.
> This type information is used by the verifier. btf_get_prog_ctx_type() is
> used in the later patches to verify that BTF type of ctx in BPF program matches to
> kernel expected ctx type. For example, the XDP program type is:
> BPF_PROG_TYPE(BPF_PROG_TYPE_XDP, xdp, struct xdp_md, struct xdp_buff)
> That means that XDP program should be written as:
> int xdp_prog(struct xdp_md *ctx) { ... }
> 
> Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx>

Acked-by: Song Liu <songliubraving@xxxxxx>



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux