From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexei Starovoitov Subject: Re: [PATCH net] bpf: expose netns inode to bpf programs Date: Sat, 4 Feb 2017 19:10:46 -0800 Message-ID: <20170205031045.GC73775@ast-mbp.thefacebook.com> References: <588A35F8.6050909@fb.com> <588A40D7.9070603@fb.com> <588A4D3C.9070601@fb.com> <87r33fevva.fsf@xmission.com> <20170203230830.GC26227@ast-mbp.thefacebook.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "Eric W. Biederman" , Alexei Starovoitov , Linus Torvalds , "David S . Miller" , Daniel Borkmann , David Ahern , Tejun Heo , Thomas Graf , Network Development To: Andy Lutomirski Return-path: Received: from mail-pf0-f193.google.com ([209.85.192.193]:33157 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751293AbdBEDKw (ORCPT ); Sat, 4 Feb 2017 22:10:52 -0500 Received: by mail-pf0-f193.google.com with SMTP id e4so4337994pfg.0 for ; Sat, 04 Feb 2017 19:10:52 -0800 (PST) Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Sat, Feb 04, 2017 at 09:07:19AM -0800, Andy Lutomirski wrote: > >> can see a namespaced view of the world. For this to work, presumably > >> we need to make sure that eBPF programs that are installed by programs > >> that are in a container don't see traffic that isn't in that > >> container. > > > > such approach will break existing users. > > What existing users? The whole feature has never been in a released kernel. the v3 patch commit log explains the use cases that work across netns. And they would break if netns boundary is suddenly started to be enforced for networking program types. If you're suggesting to limit root netns for cgroup_sock program type only then David explained weeks ago why it's not acceptable for vrf use case which was the main reason to add that program type in the first place. Also it would make one specific bpf program type to be different from all others which will be confusing.