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 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 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 us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 EF657C433EF for ; Thu, 16 Dec 2021 17:03:26 +0000 (UTC) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-13-Rax8Oq9ZMSqdmQe15uhFuw-1; Thu, 16 Dec 2021 12:03:22 -0500 X-MC-Unique: Rax8Oq9ZMSqdmQe15uhFuw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8AE901006AA6; Thu, 16 Dec 2021 17:03:17 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5D8075F905; Thu, 16 Dec 2021 17:03:15 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 0E4D64BB7C; Thu, 16 Dec 2021 17:03:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1BG19hZo026935 for ; Wed, 15 Dec 2021 20:09:43 -0500 Received: by smtp.corp.redhat.com (Postfix) id E3416401E7A; Thu, 16 Dec 2021 01:09:42 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DF601401471 for ; Thu, 16 Dec 2021 01:09:42 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C6017805B0A for ; Thu, 16 Dec 2021 01:09:42 +0000 (UTC) Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-578-W18XsLAUMzScHpdkPjYGwA-1; Wed, 15 Dec 2021 20:09:41 -0500 X-MC-Unique: W18XsLAUMzScHpdkPjYGwA-1 Received: by mail-ed1-f43.google.com with SMTP id z29so933856edl.7 for ; Wed, 15 Dec 2021 17:09:41 -0800 (PST) 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=3RWPks+yHvj/FWIVBDxikTrQdXoDCp5NNAnnQn26mkU15QhGubI4+w7ZV96PqHJmtK ORStaJLKfHyN2uVhj02gjhNLcKyhbb7ZK7B4wSGdVGzuvuhI2oqx4JBx6e8ZvsG/SkAr bZw9N7s+znP6EkrOhd3bN09FjLq7JEpfWyvsmqWExVP+klQ722cjM4lg9VHao4GZzIYC lB+PNusy9Z9oI54gSyfI5+gDszbvUM14aChEOKXmji7AMxbG6sTuazP1LE5nObhxKaex RuhGdtOVyaes80DwWZU0iG+OCaU97S+C2ycWiSyTcfqN8QxdREtIHfr7wYHqiZ7wycSX DG9w== X-Gm-Message-State: AOAM530+Hrcclo5r+gs7LcCFRnu3avBTKh4nbhVWjuZ/1y/IC7Lu06Oz kipNnaj6k6McFwngKdt7tHGaeQ== 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 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 In-Reply-To: <20211215190912.GU1550715@madcap2.tricolour.ca> X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-loop: linux-audit@redhat.com X-Mailman-Approved-At: Thu, 16 Dec 2021 12:03:01 -0500 Cc: codalist@telemann.coda.cs.cmu.edu, Jan Harkes , Mathieu Poirier , Suzuki K Poulose , Alexander Shishkin , netdev@vger.kernel.org, Balbir Singh , linux-kernel@vger.kernel.org, Eric Paris , "David S. Miller" , coda@cs.cmu.edu, linux-audit@redhat.com, Jakub Kicinski , Mike Leach , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, Leon Romanovsky X-BeenThere: linux-audit@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Linux Audit Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=linux-audit-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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-audit mailing list Linux-audit@redhat.com https://listman.redhat.com/mailman/listinfo/linux-audit