From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753261AbbDBM6S (ORCPT ); Thu, 2 Apr 2015 08:58:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59831 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752666AbbDBM6P (ORCPT ); Thu, 2 Apr 2015 08:58:15 -0400 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: <20150331031533.10464.1615.stgit@pluto.fritz.box> References: <20150331031533.10464.1615.stgit@pluto.fritz.box> <20150331030340.10464.30272.stgit@pluto.fritz.box> To: Ian Kent Cc: dhowells@redhat.com, Kernel Mailing List , Oleg Nesterov , Trond Myklebust , "J. Bruce Fields" , Benjamin Coddington , Al Viro , Jeff Layton , "Eric W. Biederman" Subject: Re: [RFC PATCH 5 7/7] KEYS: exec request key within service thread of key creator MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <18930.1427979484.1@warthog.procyon.org.uk> Date: Thu, 02 Apr 2015 13:58:04 +0100 Message-ID: <18931.1427979484@warthog.procyon.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ian Kent wrote: > + > + /* Namespace token */ > + int umh_token; If you could put it after data_len so that all the smaller-than-wordsize fields are together for better packing. > + umh_wq_put_token(key->umh_token); Does gc.c need an extra #include for this? > + /* If running within a container use the container namespace */ > + if (current->nsproxy->net_ns != &init_net) > + key->umh_token = umh_wq_get_token(0, "keys"); So keys live in the networking namespace? > - ret = call_usermodehelper_keys(argv[0], argv, envp, keyring, > - UMH_WAIT_PROC); > + /* If running within a container use the container namespace */ > + if (key->umh_token) > + ret = call_usermodehelper_keys_service(argv[0], argv, envp, > + keyring, key->umh_token, > + UMH_WAIT_PROC); > + else > + ret = call_usermodehelper_keys(argv[0], argv, envp, > + keyring, UMH_WAIT_PROC); call_usermodehelper_keys_service() would appear to be superfluous. If key->umh_token is 0, you call call_usermodehelper_keys() which then calls call_usermodehelper_keys_service() with a 0 token... David