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.133.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 EB049C433F5 for ; Wed, 8 Dec 2021 13:06:36 +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-320--RWUmsyOPs2IjOvrUBvngw-1; Wed, 08 Dec 2021 08:06:32 -0500 X-MC-Unique: -RWUmsyOPs2IjOvrUBvngw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 80BE01927803; Wed, 8 Dec 2021 13:06:29 +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 304CB45D70; Wed, 8 Dec 2021 13:06:29 +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 C8E614BB7C; Wed, 8 Dec 2021 13:06:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1B88XVYu004088 for ; Wed, 8 Dec 2021 03:33:31 -0500 Received: by smtp.corp.redhat.com (Postfix) id 008D01121315; Wed, 8 Dec 2021 08:33:31 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast10.extmail.prod.ext.rdu2.redhat.com [10.11.55.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F08AB1121314 for ; Wed, 8 Dec 2021 08:33:28 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.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 060EF1C13D6B for ; Wed, 8 Dec 2021 08:33:28 +0000 (UTC) Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-541-HMAgfFpaM36t-p2Z7uYGfA-3; Wed, 08 Dec 2021 03:33:26 -0500 X-MC-Unique: HMAgfFpaM36t-p2Z7uYGfA-3 Received: by mail-ed1-f44.google.com with SMTP id l25so5657173eda.11 for ; Wed, 08 Dec 2021 00:33:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ezHbFwEHOgtVXrEPyC2/Vvb45wpR1NFY6XpUn36BJXE=; b=Or2kBmYzAuqk+VPU0KnrJIjnFkj1BjDYfIo5uekvBSEOvAZUNQPiPw+LPifI045iHf Hexzf6qgDIVcKvCFo4/LdxL2SEcyFXfOVm/6p88vy+mdpi5Uqg/4UlRRztF3CCr+t6M2 VKM2FMYJFA84iHPLPzRpAKqifnFYbM5H0RQwBVB1ABDRDkygzalonDMRxgZTHq2QRAL8 6zpDfV7MjqEn8oyi+v3J7SxrElG0qvFsaOXo+GJqHNV7oFLhRymIZSP/1jzsXpMbBG2G mU8++paLuhnAIZe5SsqMghC82vMGgdCTCV0mAjEeYtH8ae9YlZXnHL9o+z6yvAnCsll9 +HeA== X-Gm-Message-State: AOAM531JrRlpWJPLV6z512SoxCQXvmXVS6zdLuABdxqVSm7hvEyhPhgN J7gCVnPQmjFqGz2FpWMCENo/GA== X-Google-Smtp-Source: ABdhPJxHqGG5uVa6peGzKP9j9aIy5j3Okpl/7+N6i/8RUzX2jx1jDDBoDhwrbHIhuMk49gm26vKjEw== X-Received: by 2002:a17:906:580a:: with SMTP id m10mr6157826ejq.213.1638952405323; Wed, 08 Dec 2021 00:33:25 -0800 (PST) Received: from localhost ([104.245.96.202]) by smtp.gmail.com with ESMTPSA id f17sm1493865edq.39.2021.12.08.00.33.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Dec 2021 00:33:24 -0800 (PST) From: Leo Yan To: "David S. Miller" , Jakub Kicinski , Leon Romanovsky , Mathieu Poirier , Suzuki K Poulose , Mike Leach , Alexander Shishkin , Jan Harkes , coda@cs.cmu.edu, Paul Moore , Eric Paris , Balbir Singh , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, codalist@telemann.coda.cs.cmu.edu, linux-audit@redhat.com Subject: [PATCH v2 0/7] pid: Introduce helper task_is_in_root_ns() Date: Wed, 8 Dec 2021 16:33:13 +0800 Message-Id: <20211208083320.472503-1-leo.yan@linaro.org> MIME-Version: 1.0 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.78 on 10.11.54.3 X-loop: linux-audit@redhat.com X-Mailman-Approved-At: Wed, 08 Dec 2021 07:54:40 -0500 Cc: Leo Yan 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.11 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit The kernel uses open code to check if a process is in root PID namespace or not in several places. Suggested by Suzuki, this patch set is to create a helper function task_is_in_init_pid_ns() to replace open code. This patch set has been applied on the mainline kernel and built for Arm64 kernel with enabling all relevant modules. Changes from v1: * Renamed helper function from task_is_in_root_ns() to task_is_in_init_pid_ns(). (Leon Romanovsky) * Improved patches' commit logs for more neat. Leo Yan (7): pid: Introduce helper task_is_in_init_pid_ns() coresight: etm3x: Use task_is_in_init_pid_ns() coresight: etm4x: Use task_is_in_init_pid_ns() connector/cn_proc: Use task_is_in_init_pid_ns() coda: Use task_is_in_init_pid_ns() audit: Use task_is_in_init_pid_ns() taskstats: Use task_is_in_init_pid_ns() drivers/connector/cn_proc.c | 2 +- drivers/hwtracing/coresight/coresight-etm3x-sysfs.c | 8 ++++---- drivers/hwtracing/coresight/coresight-etm4x-sysfs.c | 8 ++++---- fs/coda/inode.c | 2 +- fs/coda/psdev.c | 2 +- include/linux/pid_namespace.h | 5 +++++ kernel/audit.c | 2 +- kernel/taskstats.c | 2 +- 8 files changed, 18 insertions(+), 13 deletions(-) -- 2.25.1 -- Linux-audit mailing list Linux-audit@redhat.com https://listman.redhat.com/mailman/listinfo/linux-audit