Received: by 10.223.164.221 with SMTP id h29csp1700521wrb; Wed, 1 Nov 2017 22:41:44 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TETG1YkGcY7DaIrmnheX7imUlTB2ULwgctBS8ZILf5WeRhAaeuJV++atoyydDu6bSwn9i+ X-Received: by 10.98.236.24 with SMTP id k24mr2492459pfh.220.1509601304027; Wed, 01 Nov 2017 22:41:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509601303; cv=none; d=google.com; s=arc-20160816; b=0Of51xDa/QhWsoD9fC9XlAwPFhw0QEYNEL9paQcDMStJZgg7pRWIeozZZ8CeYI63oz zcwHsScB8q5YNT1LUoX3U4j1z57z0fkyw40VayIahsPqhlMD/4myG+PAnM/mcbT6I4fU 87Cdtlft5faE08RdRjJSi0ltH1tRVy7RGKavlntDw7WOFatlAh0zu0o5FzsBMSTAXwEq t+peyHxe/NScYPZpuGpZIpbwn+DEMzNrlNMlLrrQaZB/UDNLrjPhPE4UvQwKmK2iAvFt Dp8dmYWeRJiVBQzU28i20fTaiuUWyBe9GttWt+TYc3yi+fWhIpgqhcJwSfmfiPIV2tdD 9+FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:arc-authentication-results; bh=1u3VF0XblFsAnCKY4WZCERHLaZui+p2/B3WxJTlalCg=; b=Jpp23RsZWdU91ExJ5GodNAWUN57W2ebKYP8RwfOUYJtZs67JX28JnT3VHFZGQmjkgM tntf5c0pok2+bm5gsa0KuvZQPVGil6Xoz6Tcu2w5WG1b5dtV650m/d20+lkJFdcCKM8T 2OyPA4tBai1jEEu7GLRmgtPtAtT3jtYQJzQyRtCp39iJ07sWiNszYDOUWwdvD8UcYB9Z d9xO+FmYFM8rGfDEuq/50fNqoNgpxKlPbp4zqyxViu7QfaJdO94D++HrAM/A5Zab2xlQ u25URX/Ax3FYU4BB809KSjMluFROlAwSTqCcWROB74A1//wKHsArOcwEDFjDMucyHBgJ 7Tzw== 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 q15si1482113pli.661.2017.11.01.22.41.28; Wed, 01 Nov 2017 22:41:43 -0700 (PDT) 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 S1751587AbdKBFku (ORCPT + 99 others); Thu, 2 Nov 2017 01:40:50 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:11918 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750786AbdKBFkt (ORCPT ); Thu, 2 Nov 2017 01:40:49 -0400 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="29835160" Received: from localhost (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 02 Nov 2017 13:40:47 +0800 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (unknown [10.167.33.85]) by cn.fujitsu.com (Postfix) with ESMTP id 277A4482D017; Thu, 2 Nov 2017 13:40:49 +0800 (CST) Received: from localhost.localdomain (10.167.226.73) by G08CNEXCHPEKD03.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server id 14.3.361.1; Thu, 2 Nov 2017 13:40:47 +0800 Subject: Re: [PATCH 0/3] Make core_pattern support namespace To: References: <1501655849-9149-1-git-send-email-caosf.fnst@cn.fujitsu.com> CC: , , , , , , From: =?UTF-8?B?5pu55qCR54O9?= Message-ID: <59FAB020.1040404@cn.fujitsu.com> Date: Thu, 2 Nov 2017 13:41:52 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1501655849-9149-1-git-send-email-caosf.fnst@cn.fujitsu.com> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-yoursite-MailScanner-ID: 277A4482D017.A5CB2 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 ping �� 2017��08��02�� 14:37, Cao Shufeng �: > 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. > > Test: > 1: Pass a test script for each function of this patchset > ## TEST IN HOST ## > [root@kerneldev dumptest]# ./test_host > Set file core_pattern: OK > ./test_host: line 41: 2366 Segmentation fault (core dumped) "$SCRI= > PT_BASE_DIR"/make_dump > Checking dumpfile: OK > Set file core_pattern: OK > ./test_host: line 41: 2369 Segmentation fault (core dumped) "$SCRI= > PT_BASE_DIR"/make_dump > Checking dump_pipe triggered: OK > Checking rootfs: OK > Checking dumpfile: OK > Checking namespace: OK > Checking process list: OK > Checking capabilities: OK > > ## TEST IN GUEST ## > # ./test > Segmentation fault (core dumped) > Checking dump_pipe triggered: OK > Checking rootfs: OK > Checking dumpfile: OK > Checking namespace: OK > Checking process list: OK > Checking cg pids: OK > Checking capabilities: OK > [ 64.940734] make_dump[2432]: segfault at 0 ip 000000000040049d sp 000= > 07ffc4af025f0 error 6 in make_dump[400000+a6000] > # > 2: Pass other test(which is not easy to do in script) by hand. > > 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. > > 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/kmod.h | 5 ++ > include/linux/pid_namespace.h | 3 + > init/do_mounts_initrd.c | 3 +- > kernel/kmod.c | 56 +++++++++++++--- > kernel/pid.c | 2 + > kernel/pid_namespace.c | 2 + > kernel/sysctl.c | 50 ++++++++++++-- > lib/kobject_uevent.c | 3 +- > security/keys/request_key.c | 4 +- > 11 files changed, 253 insertions(+), 27 deletions(-) > From 1574602196574871570@xxx Wed Aug 02 07:07:53 +0000 2017 X-GM-THRID: 1574600345417689154 X-Gmail-Labels: Inbox,Category Forums