Re: [PATCH bpf-next v3 1/8] bpf: implement getsockopt and setsockopt hooks

2019-06-10 Thread Stanislav Fomichev
On 06/08, Martin Lau wrote: > On Fri, Jun 07, 2019 at 09:29:13AM -0700, Stanislav Fomichev wrote: > > Implement new BPF_PROG_TYPE_CGROUP_SOCKOPT program type and > > BPF_CGROUP_{G,S}ETSOCKOPT cgroup hooks. > > > > BPF_CGROUP_SETSOCKOPT get a read-only view of the setsockopt arguments. > > BPF_CGRO

Re: [PATCH bpf-next v3 1/8] bpf: implement getsockopt and setsockopt hooks

2019-06-08 Thread Martin Lau
On Fri, Jun 07, 2019 at 09:29:13AM -0700, Stanislav Fomichev wrote: > Implement new BPF_PROG_TYPE_CGROUP_SOCKOPT program type and > BPF_CGROUP_{G,S}ETSOCKOPT cgroup hooks. > > BPF_CGROUP_SETSOCKOPT get a read-only view of the setsockopt arguments. > BPF_CGROUP_GETSOCKOPT can modify the supplied bu

[PATCH bpf-next v3 1/8] bpf: implement getsockopt and setsockopt hooks

2019-06-07 Thread Stanislav Fomichev
Implement new BPF_PROG_TYPE_CGROUP_SOCKOPT program type and BPF_CGROUP_{G,S}ETSOCKOPT cgroup hooks. BPF_CGROUP_SETSOCKOPT get a read-only view of the setsockopt arguments. BPF_CGROUP_GETSOCKOPT can modify the supplied buffer. Both of them reuse existing PTR_TO_PACKET{,_END} infrastructure. The bu