[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1428368070.2705.12.camel@pluto.fritz.box>
Date: Tue, 07 Apr 2015 08:54:30 +0800
From: Ian Kent <raven@...maw.net>
To: David Howells <dhowells@...hat.com>
Cc: Kernel Mailing List <linux-kernel@...r.kernel.org>,
Oleg Nesterov <onestero@...hat.com>,
Trond Myklebust <trond.myklebust@...marydata.com>,
"J. Bruce Fields" <bfields@...ldses.org>,
Benjamin Coddington <bcodding@...hat.com>,
Al Viro <viro@...IV.linux.org.uk>,
Jeff Layton <jeff.layton@...marydata.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>
Subject: Re: [RFC PATCH 5 7/7] KEYS: exec request key within service thread
of key creator
On Thu, 2015-04-02 at 13:58 +0100, David Howells wrote:
> Ian Kent <raven@...maw.net> 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.
OK.
>
> > + umh_wq_put_token(key->umh_token);
>
> Does gc.c need an extra #include for this?
Umm ... you'd think so, wonder how it compiled without kmod.h ....
>
> > + /* 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?
Perhaps checking the pid namespace would make more sense?
>
> > - 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...
Yeah, not really worth the additional function. IIRC there are no other
callers of call_usermodehelper_keys().
>
> David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists