From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759460AbdEWPa0 convert rfc822-to-8bit (ORCPT ); Tue, 23 May 2017 11:30:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63267 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751746AbdEWPaX (ORCPT ); Tue, 23 May 2017 11:30:23 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 849A872482 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=dhowells@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 849A872482 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <1495551292.2742620.985957224.3FCF254A@webmail.messagingengine.com> References: <1495551292.2742620.985957224.3FCF254A@webmail.messagingengine.com> <149547014649.10599.12025037906646164347.stgit@warthog.procyon.org.uk> <87lgpoww67.fsf@xmission.com> <1495491733.25946.3.camel@redhat.com> <874lwbraxh.fsf@xmission.com> To: Colin Walters Cc: dhowells@redhat.com, Djalal Harouni , "Eric W. Biederman" , Jeff Layton , trondmy@primarydata.com, Miklos Szeredi , linux-nfs@vger.kernel.org, "linux-kernel" , Alexander Viro , Linux FS Devel , "open list:CONTROL GROUP (CGROUP)" Subject: Re: [RFC][PATCH 0/9] Make containers kernel objects MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3117.1495553419.1@warthog.procyon.org.uk> Content-Transfer-Encoding: 8BIT Date: Tue, 23 May 2017 16:30:19 +0100 Message-ID: <3118.1495553419@warthog.procyon.org.uk> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 23 May 2017 15:30:22 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Colin Walters wrote: > Why not drop the upcall model in favor of having userspace monitor events > via a (more efficient) protocol and react to them on its own? (1) That's not necessarily more efficient. You now have the overhead of a permanently running userspace daemon in every relevant namespace combination. (2) You then have to work out how to route to the appropriate daemon. > It's just generally more flexible Actually, it's less flexible. You can't easily get at the caller's namespaces. > and avoids all of those issues like replicating the seccomp configuration, > etc. So does my container implementation. > Something like inotify/signalfd could be a precedent around having a read()/poll()able > fd. /proc/keys-requests ? > > Then if you create a new user namespace, and open /proc/keys-requests, the > kernel will always write to that instead of calling /sbin/request-key. That's not good enough. You're basically making it one daemon per user namespace and ignoring all the other namespaces. [Also note that the kernel would have to paste a temporary authorisation key into the daemon's session keyring for each key that requires instantiation]. David