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 10157C433EF for ; Fri, 25 Feb 2022 13:56:42 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:To:Subject:MIME-Version: Date:Message-ID:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=yyfTX3sjTXRxa9H5H4Jst9SRrBzHDQ0HDwbDp0CZB9c=; b=5EorNt/aUKqlOnZA4I2O9kUDkD KdsnljEqed4cdfBozgH4/Vrddl5PRycmkB/ckNMXPyYynb/IfJ9BGdSVTbVJomzvp4MS/tg/ti1Nv I9kFE2+Cf8FAnMdwWdgaO2XQf3DwsBAb0dQ642FQhuy0PNeUh1pcIJmTifJ50f6K1GfXipTpfdrsD zcwTIBZcz/3WHtuGO5jsRD0xstB+8Bdsmp2xC0XemeS5E3xNuzKr59Kr5HNfASpzljRh+qGwsUVai AL1eqseEtjMsl+ZVIgCR24mFca89vfLEHsp7d6LHzRD1VesIw5eegHL2m3IcGDmg1IS7B+ig79l9C c+63c4Bg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nNb43-005GVx-Lg; Fri, 25 Feb 2022 13:55:20 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nNb1M-005FW8-Lr for linux-arm-kernel@lists.infradead.org; Fri, 25 Feb 2022 13:52:34 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F41BB106F; Fri, 25 Feb 2022 05:52:29 -0800 (PST) Received: from [10.57.90.208] (unknown [10.57.90.208]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D2AC33F5A1; Fri, 25 Feb 2022 05:52:28 -0800 (PST) Message-ID: <5f56c04f-f132-a200-4acc-7b151f7abce1@arm.com> Date: Fri, 25 Feb 2022 13:52:27 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [PATCH v2 RESEND 0/4] coresight: etm: Correct PID tracing for non-root namespace To: Leo Yan , Mathieu Poirier , Mike Leach , Alexander Shishkin , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20220204152403.71775-1-leo.yan@linaro.org> From: Suzuki K Poulose In-Reply-To: <20220204152403.71775-1-leo.yan@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220225_055232_865158_FD74F274 X-CRM114-Status: GOOD ( 17.06 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 04/02/2022 15:23, Leo Yan wrote: > If a profiling program runs in a non-root PID namespace and CoreSight > driver enables PID tracing (with contextID), it can lead to mismatching > issue between the context ID traced in hardware (from the root > namespace) and the PIDs gathered by profiling tool (e.g. perf) in its > non-root namespace. > > CoreSight driver has tried to address this issue for the contextID > related interfaces under sysfs, but it misses to prevent user to set > VMID (virtual contextID) for kernel runs in EL2 with VHE; furthermore, > it misses to handle the case when the profiling tool runs in the > non-root PID namespace. > > For this reason, this patch series is to correct contextID tracing for > non-root namespace. After applied this patchset, patch 02 doesn't > permit users to access virtual contextID via sysfs nodes in the non-root > PID namespace, patch 03 and 04 stop to trace PID packet for non-root PID > namespace. > > This patch series has been rebased on the mainline kernel and applied > cleanly on latest commit dcb85f85fa6f ("gcc-plugins/stackleak: Use > noinstr in favor of notrace"). > > > Leo Yan (4): > coresight: etm4x: Add lock for reading virtual context ID comparator > coresight: etm4x: Don't use virtual contextID for non-root PID > namespace > coresight: etm4x: Don't trace PID for non-root PID namespace > coresight: etm3x: Don't trace PID for non-root PID namespace > > .../coresight/coresight-etm3x-core.c | 4 +++ > .../coresight/coresight-etm4x-core.c | 10 +++++-- > .../coresight/coresight-etm4x-sysfs.c | 30 +++++++++++++++++++ > 3 files changed, 42 insertions(+), 2 deletions(-) > I have queued the series to coresight/next. Kind regards Suzuki _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel