Received: by 10.223.176.46 with SMTP id f43csp4005517wra; Tue, 23 Jan 2018 02:43:41 -0800 (PST) X-Google-Smtp-Source: AH8x227vVZ6dgWT5J7ou+0PRGDHtfkuOtUGhdBOc7lt0aBCtTUZtAZNkFXbEToLOePRxP+UzL7q7 X-Received: by 2002:a17:902:4101:: with SMTP id e1-v6mr5259221pld.332.1516704221171; Tue, 23 Jan 2018 02:43:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516704221; cv=none; d=google.com; s=arc-20160816; b=g25XDLjDZDfVnIvAYsvXvx0lORJKLDgF8N/ZPp/seWvurGYTPyAdhfmxmReNDFrp6Z JlEkVq4u+bZXfTRJYM/dokZfcOV5JpTlYqnsHa3pA8CuQ/GH4bzBM3GQ6EGKHk5k/R0s rrlfgIl03JL5Bi3GcohXonpermZrhUO0Jeq1ctaHwgCTn04XAY1CoBh+ZavavAQIYXj3 CQ3XI45ND48YSHOiI0pfTmKgrGuIoQjnrMeP/Q2Lj43Dw6xGIRqPqKY9Hcu0/otM5JQU 8HFRhZX3xUSxun/I05b4OZEEXfphcFZ4n1v9NMyOdyE4/p3N+8NlfCuMd//W9BNnmVtJ bG0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=oiFxMUMQlvG8Z9i9pOeA4oh2Sk6gc8LFdOjau8Rz7dE=; b=kTdD9L9FrIs/kEh6NRbfiUTTu8MfJpWKwd2AHdoXgC8LCy0TAs0jyF9zvNjOkKOPYz GubrK/GrY6QDq/Etk7xrSi1Os2JV7ozIj+DcJEL7zNoYKlPFca4fdrn5VczZCQWG1AT5 1rRiSUpMtYaiWhWdd/u2zpRIjPWt0Ejlbd9dzbR/vaVTZg4K8FwXoXIU6WXRA8XXJ92N saG8dzpfWc1IjYcKIvA+AclYScCIcazDHnspZJynNu28v7/STtms6ungCUygRaZxmas1 9EETnEsev2xv+JYUO1KJCcM5CzvT1ZM1WA1mwfobJHuRSmAzSFPlkDmSkm7ufUvujAJ3 mWQA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 16si1265060pfk.394.2018.01.23.02.43.27; Tue, 23 Jan 2018 02:43:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751479AbeAWKmg (ORCPT + 99 others); Tue, 23 Jan 2018 05:42:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35106 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751255AbeAWKmf (ORCPT ); Tue, 23 Jan 2018 05:42:35 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1D4A36014F; Tue, 23 Jan 2018 10:42:35 +0000 (UTC) Received: from localhost (unknown [10.40.205.12]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5C1135D70A; Tue, 23 Jan 2018 10:42:32 +0000 (UTC) Date: Tue, 23 Jan 2018 11:42:30 +0100 From: Jiri Benc To: Wolfgang Bumiller Cc: Christian Brauner , Christian Brauner , davem@davemloft.net, dsahern@gmail.com, fw@strlen.de, daniel@iogearbox.net, lucien.xin@gmail.com, mschiffer@universe-factory.net, jakub.kicinski@netronome.com, vyasevich@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stephen@networkplumber.org Subject: Re: [PATCH net-next 1/1] rtnetlink: request RTM_GETLINK by pid or fd Message-ID: <20180123114230.34b763c1@redhat.com> In-Reply-To: <20180123102658.wll4xb7ewjjy5x55@olga.proxmox.com> References: <20180118202124.21616-1-christian.brauner@ubuntu.com> <20180118202124.21616-2-christian.brauner@ubuntu.com> <20180118212914.74878b82@redhat.com> <20180118205552.jm7shzcojbumax2k@gmail.com> <20180122220046.7b65a98a@redhat.com> <20180122212353.7n6lrruqedfhrwux@gmail.com> <20180122230616.0c457f55@redhat.com> <20180122222540.oqrr3apswopavyta@gmail.com> <20180123103009.41c2a043@redhat.com> <20180123102658.wll4xb7ewjjy5x55@olga.proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 23 Jan 2018 10:42:35 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 23 Jan 2018 11:26:58 +0100, Wolfgang Bumiller wrote: > Even if you know the netnsid, do the mentioned watches work for > nested/child namespaces if eg. a container creates new namespace before > and/or after the watch was established and moves interfaces to these > child namespaces, would you just see them disappear, or can you keep > track of them later on as well? What do you mean by "nested namespaces"? There's no such thing for net name spaces. As for missing API to get netnsid of the netns the interface is moved to, see my previous emails in this thread. This needs to be added. > Even if that works, from what the documentation tells me netlink is an > unreliable protocol, so if my watcher's socket buffer is full, wouldn't > I be losing important tracking information? Sure. But that's fundamentally unfixable independently on netlink, the kernel needs to take an action if a program is not reading its messages. Either some messages get dropped or the program is killed or infinite amount of memory is consumed. This has nothing to do with uAPI design. > I think one possible solution to tracking interfaces would be to have a > unique identifier that never changes (even if it's just a simple > uint64_t incremented whenever an interface is created). But since > they're not local to the current namespace that may require a lot of > extra permission checks (but I'm just speculating here...). You'll get a hard NACK from CRIU folks if you try to propose this. > In any case, IFLA_NET_NS_FD/PID are already there and I had been > wondering previously why they couldn't be used with RTM_GETLINK, it > would just make sense. Those predate netnsids and we can't get rid of them now, since they're part of uAPI. But we can (and should) make sure we don't add more of those. Jiri