From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754326AbbCaDOw (ORCPT ); Mon, 30 Mar 2015 23:14:52 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:48305 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754286AbbCaDOt (ORCPT ); Mon, 30 Mar 2015 23:14:49 -0400 X-Sasl-enc: 2uK9azeiQnTi0bbxDuWI9GJQPd9bwvH/WPpgV93XlbaF 1427771688 Subject: [RFC PATCH v5 0/7] Another attempt at contained helper execution From: Ian Kent To: Kernel Mailing List Cc: David Howells , Oleg Nesterov , Trond Myklebust , "J. Bruce Fields" , Benjamin Coddington , Al Viro , Jeff Layton , "Eric W. Biederman" Date: Tue, 31 Mar 2015 11:14:34 +0800 Message-ID: <20150331030340.10464.30272.stgit@pluto.fritz.box> User-Agent: StGit/0.17-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Following Eric's comments and in light of the most recent nfs and keys patches here is yet another attempt at the basis of contained usermode helper execution. Initially I thought that creating threads to be used when executing a helper wouldn't be feasible because the number of threads would be far too large but the recent nfs and keys patches make me think that's probably not the case. There's more work to do on this, namely identifying already existing threads for a requested environment, error handling for environments that have gone away due to summary execution and similar. But I'd like to get feedback as to whether I'm on the right track and what I might be missing before spending more time on it. --- Ian Kent (7): kmod - add workqueue service thread store kmod - teach usermodehelper to use service workqueues nfsd - use service thread if not executing in init namespace nfs - cache_lib use service thread if not executing in init namespace nfs - objlayout use service thread if not executing in init namespace KEYS - use correct memory allocation flag in call_usermodehelper_keys() KEYS: exec request key within service thread of key creator fs/nfs/cache_lib.c | 7 + fs/nfs/objlayout/objlayout.c | 14 +++ fs/nfsd/netns.h | 3 + fs/nfsd/nfs4recover.c | 48 ++++++--- fs/nfsd/nfsctl.c | 6 + include/linux/key.h | 3 + include/linux/kmod.h | 8 ++ include/linux/sunrpc/cache.h | 2 kernel/kmod.c | 217 ++++++++++++++++++++++++++++++++++++++++-- net/sunrpc/cache.c | 5 + security/keys/gc.c | 2 security/keys/key.c | 5 + security/keys/request_key.c | 38 ++++++- 13 files changed, 323 insertions(+), 35 deletions(-) -- Ian