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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4655AC433EF for ; Thu, 16 Dec 2021 01:09:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229885AbhLPBJn (ORCPT ); Wed, 15 Dec 2021 20:09:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbhLPBJl (ORCPT ); Wed, 15 Dec 2021 20:09:41 -0500 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CC4BC061574 for ; Wed, 15 Dec 2021 17:09:41 -0800 (PST) Received: by mail-ed1-x532.google.com with SMTP id y13so80779487edd.13 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=c1G6VUxf6/4XUKFAHAoboKbu1BQtQOSV7bY5QeSGC5Cv18sRfVcEYCRECj6ptm6GkN DGDdcFNVBUU9QrWGgv1KcdiHywacfaA2RYNLIplWgwFl8T/iraJ6L69S0hMXnAEY6Fad A3YSuie9ysYjsPZuMne7WjSM/pU2I9Vu6stW2d7JRdEraXavO121rxARuP6KMp6RiV9x aUBP2DCVdjGJEuEdEtPQjHS+nSdAuMb+vOlJK1v+Wlj8kFS9mGI9aN+u5YGDvfl5UeLU s3F8KlPQHeupg+r+9S+ZmIaw9eki46Q97qZY4lmZF1urg93qqI5wOSKFnWyOxkIRiDzt Iy6w== X-Gm-Message-State: AOAM532HaK6aMumsTIFhw3ACase98dyHcNQZVFAy5Sq5Vlj2/ebY5YfG SBYFEcELgM+vkLPMsb9MyKpnAA== 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211215190912.GU1550715@madcap2.tricolour.ca> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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