From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 40387C433EF for ; Thu, 16 Dec 2021 01:11:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4ngG6WKHFRa2CcOLyNMb1eSja4QAbuMXYZDEgR+TqKo=; b=z2b+cEKD/nAmut 9WjPg6E+fuasRs5YKteXPzsRHieznCf1bD0J5QUTctvyIUCjB8KdxnI/uERQow+XW4TtVwtFMSYfE 2+C8YBzHtmiG0cyJCOi89XRa70I5oWS4rhwzH1DwBTxVTtvY0ku3kpfN9nio5tMLghiPfE/iXL7lo +fn0GiqLSn6j5ymOZS4vMgJVl7DTGM1Lo70nE7P9YMttdvkRDvpuviz9b+hqERY6Llj8w7svEnSZ3 W/8LDbN9O+WwHWxBurEmRh5NsMUquiTBJLR26Q9vpSpGpUeKr+3nEjERJx52eqqkLfuoNJsNEsPec CcmNGZkQ8nor2wtNhLQg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxfHG-003DrO-Ga; Thu, 16 Dec 2021 01:09:46 +0000 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxfHC-003Dqc-Hv for linux-arm-kernel@lists.infradead.org; Thu, 16 Dec 2021 01:09:44 +0000 Received: by mail-ed1-x52e.google.com with SMTP id o20so81355885eds.10 for ; Wed, 15 Dec 2021 17:09:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=FHIyIUHgABGRTpG8w7V67GIZKBgX3nHebqZRmIuJJJY=; b=xZviC8IdrUmSlO817ivxgFljCM7DPxP71a+pj6RNWpAcJDq7U/W1OtAw7pzbHfr4Mr EEo7yepTBLG6hHAPdgAHpv5oxct3PqaNyzAIlEBnjoGUMAKWTg54SH+iwWxSblIOPgBN MLrpVdIVEcLzErvfAhNjanJCOA6kUsTsVMqQY8Oo6Xq0Ys4Xrh1dltPo7eEdRpqZuLVL Un07rN7ToSrdssNbUFUHd2CitTECcv+Qd3EC0Qiu7QhJ9C1AEaJ9yv47RhHHpJnCfecc 64+qrXWe0ypE9Yvo/5um3Guype3ZY4pI1UnIBki/egbTrjfixsGbfnkwmkXhF7j5zoE8 w1bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=FHIyIUHgABGRTpG8w7V67GIZKBgX3nHebqZRmIuJJJY=; b=vKGp2pGl5RJ3ZFMbWhs8EBUzTjT44tCPt0KYXEmhEZoH/FqAdktS6qKtQFodpvx8e5 3LDxa5IslvQGmeFEcsJ0vCSU8EXNuH4XQRTrti3Sixd3QbWA4ntex6xSTJDTxdVIiGF7 ewazqDGvf+7CFoS0Aj+T5ary6YNLF+JXKFJtvBTApUY9UYU7LzBi3nm8u15iufQbDDhH Ndz/SoSlxOtFXf3SHPtU3Jg6MFzVFtKspN0IdYfO9HWjKRzF81DLP2wzBG5xmKGV2X+U e8bTLK0rFbtMYRiAFzAy4/tLwyaRILmt+cXeZSPRvkE5usjV2rUzTBeGRUbEneQp8U5O HBwg== X-Gm-Message-State: AOAM531Ku1lVFEzWxrCwSjDToGwT//Dd2c64w4O3TtAtT5x/cBvIazMs 27CgyTmaWX8FYJmctZTe7FWM6A== X-Google-Smtp-Source: ABdhPJyPpOoG+ITA8Qth7yHRJ0UTqZ40dsEmeR20fRaqJI6zWCUv/9fRlYGxnAJU6IyVVjyjP3sWkg== X-Received: by 2002:a17:907:72cf:: with SMTP id du15mr13282231ejc.167.1639616979968; Wed, 15 Dec 2021 17:09:39 -0800 (PST) Received: from leoy-ThinkPad-X240s ([104.245.96.202]) by smtp.gmail.com with ESMTPSA id s16sm1615656edt.30.2021.12.15.17.09.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Dec 2021 17:09:39 -0800 (PST) Date: Thu, 16 Dec 2021 09:09:32 +0800 From: Leo Yan To: Richard Guy Briggs Cc: Paul Moore , codalist@telemann.coda.cs.cmu.edu, Jan Harkes , Leon Romanovsky , Mathieu Poirier , Suzuki K Poulose , Alexander Shishkin , netdev@vger.kernel.org, Balbir Singh , linux-kernel@vger.kernel.org, Eric Paris , coda@cs.cmu.edu, linux-audit@redhat.com, coresight@lists.linaro.org, Jakub Kicinski , "David S. Miller" , linux-arm-kernel@lists.infradead.org, Mike Leach Subject: Re: [PATCH v2 6/7] audit: Use task_is_in_init_pid_ns() Message-ID: <20211216010932.GA2313631@leoy-ThinkPad-X240s> References: <20211208083320.472503-1-leo.yan@linaro.org> <20211208083320.472503-7-leo.yan@linaro.org> <20211215190912.GU1550715@madcap2.tricolour.ca> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211215190912.GU1550715@madcap2.tricolour.ca> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211215_170942_625942_28E0E192 X-CRM114-Status: GOOD ( 18.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Dec 15, 2021 at 02:09:12PM -0500, Richard Guy Briggs wrote: > On 2021-12-14 17:35, Paul Moore wrote: > > On Wed, Dec 8, 2021 at 3:33 AM Leo Yan wrote: > > > > > > Replace open code with task_is_in_init_pid_ns() for checking root PID > > > namespace. > > > > > > Signed-off-by: Leo Yan > > > --- > > > kernel/audit.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > I'm not sure how necessary this is, but it looks correct to me. > > I had the same thought. I looks correct to me. I could see the value > if it permitted init_pid_ns to not be global. Just for a background info, we need to check root PID namespace in some drivers [1], to avoid introducing more open codes, we decided to refactor with helper task_is_in_init_pid_ns(). [1] https://lore.kernel.org/lkml/20211213121323.1887180-1-leo.yan@linaro.org/ > > Acked-by: Paul Moore > > Reviewed-by: Richard Guy Briggs Thanks for review, Paul and Richard. Leo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel