From: Julien Meunier <julien.meunier@nokia.com>
To: Suzuki K Poulose <suzuki.poulose@arm.com>,
Leo Yan <leo.yan@arm.com>, Leo Yan <leo.yan@linux.dev>
Cc: Mike Leach <mike.leach@linaro.org>,
James Clark <james.clark@linaro.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
stable@vger.kernel.org, coresight@lists.linaro.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] coresight: etm4x: Fix PID tracing when perf is run in an init PID namespace
Date: Tue, 8 Oct 2024 15:18:01 +0200 [thread overview]
Message-ID: <b923dcf3-1fbf-440e-9b45-9c6535d6a28b@nokia.com> (raw)
In-Reply-To: <c519631b-e02f-438c-a61f-68fa97583668@arm.com>
On 08/10/2024 11:59, Suzuki K Poulose wrote:
> On 08/10/2024 07:52, Leo Yan wrote:
>> On 10/7/2024 9:05 PM, Leo Yan wrote:
[...]
>>
>> I thought again and found I was wrong with above conclusion. This
>> patch is a
>> good fixing for the perf running in root namespace to profile programs in
>> non-root namespace. Sorry for noise.
>>
>> Maybe it is good to improve a bit comments to avoid confusion. See below.
>>
>> [...]
>>
>>>> diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/
>>>> drivers/hwtracing/coresight/coresight-etm4x-core.c
>>>> index bf01f01964cf..8365307b1aec 100644
>>>> --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c
>>>> +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c
>>>> @@ -695,7 +695,7 @@ static int etm4_parse_event_config(struct
>>>> coresight_device *csdev,
>>>>
>>>> /* Only trace contextID when runs in root PID namespace */
>>
>> We can claim the requirement for the *tool* running in root PID namespae.
>>
>> /* Only trace contextID when the tool runs in root PID namespace */
>
> minor nit: I wouldn't call "tool". Let keep it "event owner".
>
> /* Only trace contextID when the event owner is in root PID
> namespace */
>
>
> Julien,
>
> Please could you respin the patch with the comments addressed.
Sure, I will send a v2 with comments updated.
>
> Kind regards
> Suzuki
>
>
>>
>>
>>>> if ((attr->config & BIT(ETM_OPT_CTXTID)) &&
>>>> - task_is_in_init_pid_ns(current))
>>>> + task_is_in_init_pid_ns(event->owner))
>>>> /* bit[6], Context ID tracing bit */
>>>> config->cfg |= TRCCONFIGR_CID;
>>>>
>>>> @@ -710,7 +710,7 @@ static int etm4_parse_event_config(struct
>>>> coresight_device *csdev,
>>>> goto out;
>>>> }
>>>> /* Only trace virtual contextID when runs in root PID
>>>> namespace */
>>
>> Ditto.
>>
>> /* Only trace virtual contextID when the tool runs in root PID
>> namespace */
>>
>> With above change:
>>
>> Reviewed-by: Leo Yan <leo.yan@arm.com>
Regards,
Julien
next prev parent reply other threads:[~2024-10-08 13:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-25 13:13 Julien Meunier
2024-10-07 12:38 ` Suzuki K Poulose
2024-10-07 20:05 ` Leo Yan
2024-10-08 6:52 ` Leo Yan
2024-10-08 9:59 ` Suzuki K Poulose
2024-10-08 13:18 ` Julien Meunier [this message]
2024-10-08 20:02 ` [PATCH v2] " Julien Meunier
2024-10-13 14:55 ` Leo Yan
2024-10-21 12:31 ` Suzuki K Poulose
2024-10-25 17:56 ` Julien Meunier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b923dcf3-1fbf-440e-9b45-9c6535d6a28b@nokia.com \
--to=julien.meunier@nokia.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=coresight@lists.linaro.org \
--cc=james.clark@linaro.org \
--cc=leo.yan@arm.com \
--cc=leo.yan@linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.leach@linaro.org \
--cc=stable@vger.kernel.org \
--cc=suzuki.poulose@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®