Re: [RFC PATCH 0/5] Add eBPF hooks for cgroups

2016-08-23 Thread Daniel Mack
On 08/23/2016 11:54 AM, Sargun Dhillon wrote: > On Tue, Aug 23, 2016 at 10:27:28AM +0200, Daniel Mack wrote: >> On 08/22/2016 07:20 PM, Sargun Dhillon wrote: >>> On Mon, Aug 22, 2016 at 06:22:20PM +0200, Daniel Mack wrote: On 08/22/2016 06:06 PM, Pablo Neira Ayuso wrote: >> > This

Re: [RFC PATCH 0/5] Add eBPF hooks for cgroups

2016-08-23 Thread Sargun Dhillon
On Tue, Aug 23, 2016 at 10:27:28AM +0200, Daniel Mack wrote: > On 08/22/2016 07:20 PM, Sargun Dhillon wrote: > > On Mon, Aug 22, 2016 at 06:22:20PM +0200, Daniel Mack wrote: > >> On 08/22/2016 06:06 PM, Pablo Neira Ayuso wrote: > > >>> This patchset also needs an extra egress hook, not yet known

Re: [RFC PATCH 0/5] Add eBPF hooks for cgroups

2016-08-23 Thread Daniel Mack
On 08/22/2016 07:20 PM, Sargun Dhillon wrote: > On Mon, Aug 22, 2016 at 06:22:20PM +0200, Daniel Mack wrote: >> On 08/22/2016 06:06 PM, Pablo Neira Ayuso wrote: >>> This patchset also needs an extra egress hook, not yet known where to >>> be placed, so two hooks in the network stacks in the end,

Re: [RFC PATCH 0/5] Add eBPF hooks for cgroups

2016-08-22 Thread Sargun Dhillon
On Mon, Aug 22, 2016 at 06:22:20PM +0200, Daniel Mack wrote: > On 08/22/2016 06:06 PM, Pablo Neira Ayuso wrote: > > On Fri, Aug 19, 2016 at 07:07:39PM +0200, Thomas Graf wrote: > > >> You brought up multiple tables which reflect the cumulative approach. > >> This sometimes works but has its

Re: [RFC PATCH 0/5] Add eBPF hooks for cgroups

2016-08-22 Thread Daniel Mack
On 08/22/2016 06:06 PM, Pablo Neira Ayuso wrote: > On Fri, Aug 19, 2016 at 07:07:39PM +0200, Thomas Graf wrote: >> You brought up multiple tables which reflect the cumulative approach. >> This sometimes works but has its issues as well. Users must be aware >> of each other and anticipate what

Re: [RFC PATCH 0/5] Add eBPF hooks for cgroups

2016-08-22 Thread Pablo Neira Ayuso
Hi Thomas, On Fri, Aug 19, 2016 at 07:07:39PM +0200, Thomas Graf wrote: > On 08/19/16 at 06:21pm, Pablo Neira Ayuso wrote: > > On Fri, Aug 19, 2016 at 12:35:14PM +0200, Daniel Mack wrote: > > > Also true. A cgroup can currently only hold one bpf program for each > > > direction, and they are

Re: [RFC PATCH 0/5] Add eBPF hooks for cgroups

2016-08-19 Thread Thomas Graf
On 08/19/16 at 06:21pm, Pablo Neira Ayuso wrote: > On Fri, Aug 19, 2016 at 12:35:14PM +0200, Daniel Mack wrote: > > Also true. A cgroup can currently only hold one bpf program for each > > direction, and they are supposed to be set from one controlling instance > > in the system. However, it is

Re: [RFC PATCH 0/5] Add eBPF hooks for cgroups

2016-08-19 Thread Thomas Graf
On 08/19/16 at 06:31pm, Pablo Neira Ayuso wrote: > Why do you need global seccomp policies? The process knows better what > he needs to place in his sandbox, so attaching this from the process > itself makes more sense to me... Anyway, this reminds me to selinux. Two different objectives. The

Re: [RFC PATCH 0/5] Add eBPF hooks for cgroups

2016-08-19 Thread Pablo Neira Ayuso
On Fri, Aug 19, 2016 at 01:20:25PM +0200, Daniel Borkmann wrote: > On 08/19/2016 11:19 AM, Pablo Neira Ayuso wrote: > [...] > > * During the Netfilter Workshop, the main concern to add this new socket > > Don't really know what was discussed exactly at NFWS, but ... Slides are available here:

Re: [RFC PATCH 0/5] Add eBPF hooks for cgroups

2016-08-19 Thread Pablo Neira Ayuso
Hi Daniel, On Fri, Aug 19, 2016 at 12:35:14PM +0200, Daniel Mack wrote: > Hi Pablo, > > On 08/19/2016 11:19 AM, Pablo Neira Ayuso wrote: > > On Wed, Aug 17, 2016 at 04:00:43PM +0200, Daniel Mack wrote: > >> I'd appreciate some feedback on this. Pablo has some remaining concerns > >> about this

Re: [RFC PATCH 0/5] Add eBPF hooks for cgroups

2016-08-19 Thread Alexei Starovoitov
On Fri, Aug 19, 2016 at 11:19:41AM +0200, Pablo Neira Ayuso wrote: > Hi Daniel, > > On Wed, Aug 17, 2016 at 04:00:43PM +0200, Daniel Mack wrote: > > I'd appreciate some feedback on this. Pablo has some remaining concerns > > about this approach, and I'd like to continue the discussion we had > >

Re: [RFC PATCH 0/5] Add eBPF hooks for cgroups

2016-08-19 Thread Daniel Borkmann
On 08/19/2016 11:19 AM, Pablo Neira Ayuso wrote: [...] > * During the Netfilter Workshop, the main concern to add this new socket Don't really know what was discussed exactly at NFWS, but ... >ingress hook was that it is too specific. However this new hook in >the network stack looks

Re: [RFC PATCH 0/5] Add eBPF hooks for cgroups

2016-08-19 Thread Daniel Mack
Hi Pablo, On 08/19/2016 11:19 AM, Pablo Neira Ayuso wrote: > On Wed, Aug 17, 2016 at 04:00:43PM +0200, Daniel Mack wrote: >> I'd appreciate some feedback on this. Pablo has some remaining concerns >> about this approach, and I'd like to continue the discussion we had >> off-list in the light of

[RFC PATCH 0/5] Add eBPF hooks for cgroups

2016-08-17 Thread Daniel Mack
This patch set allows eBPF programs for network filtering and accounting to be attached to cgroups, so that they apply to all sockets of all tasks placed in that cgroup. The logic also allows to be extendeded for other cgroup-based eBPF logic. In short, the patch set adds the following: * A new