mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Julien Meunier <julien.meunier@nokia.com>
To: Suzuki K Poulose <suzuki.poulose@arm.com>,
	Mike Leach <mike.leach@linaro.org>,
	James Clark <james.clark@linaro.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Leo Yan <leo.yan@linux.dev>
Cc: stable@vger.kernel.org, coresight@lists.linaro.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] coresight: etm4x: Fix PID tracing when perf is run in an init PID namespace
Date: Fri, 25 Oct 2024 19:56:02 +0200	[thread overview]
Message-ID: <33988463-9168-4ac5-9061-8bba6e2eda37@nokia.com> (raw)
In-Reply-To: <b1b17552-646e-42e8-bd00-9c7ae6835612@arm.com>

Hi Suzuki

On 21/10/2024 14:31, Suzuki K Poulose wrote:

> Hi Julien
> 
> 
[...]
> 
> Unfortunately this is not safe. i.e., event->owner is not guaranteed to
> be stable (even NULL or an invalid pointer) (e.g. kernel created events
> or task exit raced event_start on another CPU).

I expected that event->owner was safe, but you are right. During my 
tests, I essentially attached an existing PID executed in an container 
(lxc), so I was not able to detect that race condition. I miss to 
re-validate all the other usage of CoreSight.

> That said, one thing to note is that the ETM4x driver parses the event
> config in each "event_start" call back, instead of doing once during the
> event_init. If we move this to a onetime parsing at the event_init, with
> additional checks in place (e.g, !is_kernel_event()), we may be able to
> solve it.
Thanks for this suggestion, I will try this approach and provide a v3.

Regards,
Julien

      reply	other threads:[~2024-10-25 17:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-25 13:13 [PATCH] " 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
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 [this message]

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=33988463-9168-4ac5-9061-8bba6e2eda37@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@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®