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

2019-06-10 Thread Martin Lau
On Mon, Jun 10, 2019 at 12:35:58PM -0700, Stanislav Fomichev wrote: > On 06/10, Martin Lau wrote: > > On Mon, Jun 10, 2019 at 09:34:14AM -0700, Stanislav Fomichev wrote: > > > Implement new BPF_PROG_TYPE_CGROUP_SOCKOPT program type and > > > BPF_CGROUP_{G,S}ETSOCKOPT cgroup hooks. > > > > > > BPF_

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

2019-06-10 Thread Stanislav Fomichev
On 06/10, Martin Lau wrote: > On Mon, Jun 10, 2019 at 09:34:14AM -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 v4 1/8] bpf: implement getsockopt and setsockopt hooks

2019-06-10 Thread Martin Lau
On Mon, Jun 10, 2019 at 09:34:14AM -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 v4 1/8] bpf: implement getsockopt and setsockopt hooks

2019-06-10 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