Received: by 10.223.164.202 with SMTP id h10csp5957501wrb; Tue, 21 Nov 2017 19:24:56 -0800 (PST) X-Google-Smtp-Source: AGs4zMYVXYRu/eQZEIaA+0W+QeIUDwwVIhyHptQqibANStFq3H8fEfoe5mklwbWHYqDl9TyBlvc6 X-Received: by 10.84.236.12 with SMTP id q12mr19898744plk.314.1511321096229; Tue, 21 Nov 2017 19:24:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511321096; cv=none; d=google.com; s=arc-20160816; b=hJs24oMpOtnttp/mlDA65ap1l4hAafUSPSmvZcOHOUDjzmtfN1LGQaknWEXTlXDecZ H7zujxHQF7pDwUYSS4S1mpFUbtDgoGyEWVqO6pv9Dtp2ahZ1AGCbSGGxXsnIkyWya/vu VCZfOLU9Ur4+ccdStQHPcdM9SQ1MBKG6PJUpgfmoEkew1fb7ZCh81qSK2IJj0REOriRu XZ01IC1LW4qqlde8L06Lymi9uluNZ2Vzv2+weFw1LWSOEEftGM0Hu8ybp9huJYIUE/vY 8CJuOxzxr1t3o4lVnMLSQNLONYdXB0uORQyamP4m2xkOQRGQvG0GIlH6xWHR+XcewBub lPvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=ewuE0DwX4pE18zCN0zcELUcUEdqxrROStlwmukwtgbI=; b=OqgzAL0GKW/dV2CkNeiw7cqbe3Ge3SVg30day7SLWnbJLIU1ccTaXRBlRDbPN8XAB9 1LhtBj7igMDnS61QuRttiEvYLaLqCVhKWrtvKTC7SoBH8pyh6FzQSkseiwrxgQX3eeA6 9cdhmmkwGna1HDJ0Lubb4B+3T7fkY5D7xHEwR9eheI7HvuL8s9CmmUTH9PPi9XkzwyXF 35t1CT3WFj8MBE9uTCZT11FgMZN583+70buXChSD9m+yX4tISOBTEFd1mG75T3hMq7kh k9rY7A3kOgiWtO66Pcc3J6jBaYcDz0SqGuoPJsYjBWNhDKpxEwhWK418+1yS0UuikRDh P7rA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a90si6608645plc.323.2017.11.21.19.24.45; Tue, 21 Nov 2017 19:24:56 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751807AbdKVDXy (ORCPT + 76 others); Tue, 21 Nov 2017 22:23:54 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:36868 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751770AbdKVDXw (ORCPT ); Tue, 21 Nov 2017 22:23:52 -0500 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="30360592" Received: from bogon (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 22 Nov 2017 11:23:51 +0800 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (unknown [10.167.33.85]) by cn.fujitsu.com (Postfix) with ESMTP id 6C4D8487F167; Wed, 22 Nov 2017 11:23:47 +0800 (CST) Received: from localhost.localdomain (10.167.226.73) by G08CNEXCHPEKD03.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 22 Nov 2017 11:23:47 +0800 From: Cao Shufeng To: CC: , , , , , , , , , Subject: [PATCH_v4.1 0/3] Make core_pattern support namespace Date: Wed, 22 Nov 2017 11:24:15 +0800 Message-ID: <1511321058-6089-1-git-send-email-caosf.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1501655849-9149-1-git-send-email-caosf.fnst@cn.fujitsu.com> References: <1501655849-9149-1-git-send-email-caosf.fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.167.226.73] X-yoursite-MailScanner-ID: 6C4D8487F167.AC9E0 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: caosf.fnst@cn.fujitsu.com X-Spam-Status: No Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset includes following function points: 1: Let usermodehelper function possible to set pid namespace done by: [PATCH_v4.1 1/3] Make call_usermodehelper_exec possible to set namespaces 2: Let pipe_type core_pattern write dump into container's rootfs done by: [PATCH_v4.1 2/3] Limit dump_pipe program's permission to init for container 3: Make separate core_pattern setting for each container done by: [PATCH_v4.1 3/3] Make core_pattern support namespace 4: Compatibility with current system also included in: [PATCH_v4.1 3/3] Make core_pattern support namespace If container hadn't change core_pattern setting, it will keep same setting with host. Changelog v3.1-v4: 1. remove extra fork pointed out by: Andrei Vagin 2: Rebase on top of v4.9-rc8. 3: Rebase on top of v4.12. 3: Rebase on top of v4.14. Changelog v3-v3.1: 1. Switch "pwd" of pipe program to container's root fs. 2. Rebase on top of v4.9-rc1. Changelog v2->v3: 1: Fix problem of setting pid namespace, pointed out by: Andrei Vagin Changelog v1(RFC)->v2: 1: Add [PATCH 2/2] which was todo in [RFC v1]. 2: Pass a test script for each function. 3: Rebase on top of v4.7. Suggested-by: Eric W. Biederman Suggested-by: KOSAKI Motohiro Signed-off-by: Cao Shufeng Cao Shufeng (3): Make call_usermodehelper_exec possible to set namespaces Limit dump_pipe program's permission to init for container Make core_pattern support namespace fs/coredump.c | 150 +++++++++++++++++++++++++++++++++++++++--- include/linux/binfmts.h | 2 + include/linux/pid_namespace.h | 3 + include/linux/umh.h | 5 ++ init/do_mounts_initrd.c | 3 +- kernel/kmod.c | 3 +- kernel/pid.c | 2 + kernel/pid_namespace.c | 2 + kernel/sysctl.c | 50 ++++++++++++-- kernel/umh.c | 51 +++++++++++--- security/keys/request_key.c | 4 +- 11 files changed, 250 insertions(+), 25 deletions(-) -- 2.1.0 From 1584733915118306260@xxx Wed Nov 22 03:07:13 +0000 2017 X-GM-THRID: 1574600345417689154 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread