From: sashiko-bot@kernel.org
To: "Adrian Hunter" <adrian.hunter@intel.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 4/6] perf/x86/intel/pt: Clear TraceEn in hardware in cpu_emergency_stop_pt()
Date: Mon, 02 Nov 2026 08:21:27 +0000 [thread overview]
Message-ID: <sashiko-outbox-193098@kernel.org> (raw)
In-Reply-To: <20261102074039.26983-5-adrian.hunter@intel.com>
> cpu_emergency_stop_pt() stops tracing through pt_event_stop(), which
> assumes the software state accurately reflects whether tracing is
> enabled. That assumption can fail when a crash NMI interrupts
> pt_config_start().
>
> pt_config_start() sets TraceEn in IA32_RTIT_CTL before updating
> event->hw.aux_config. If a crash NMI arrives in that window,
> pt_config_stop() sees TraceEn clear in aux_config and skips the MSR
> write needed to disable tracing. Tracing remains active in hardware.
>
> Alternatively, an earlier NMI in the same window can stop the event
> without restarting it, for example a group throttle calling
> pt_event_stop(event, 0), or a PT PMI for which perf_aux_output_begin()
> fails. pt_config_stop() again skips the write, so the event is stopped
> only in software: TraceEn remains set in IA32_RTIT_CTL, and
> [ ... ]
> Fixes: 8e105a1fc2a0 ("perf/x86/intel/pt: Factor out pt_config_start()")
> Fixes: 25e8920b301c ("perf/x86/intel/pt: Add sampling support")
> Fixes: 08c7454ceb94 ("perf/x86/intel/pt: Add support for pause / resume")
> Fixes: 2e17bf3a469a ("perf/x86/intel/pt: Fix stop/start with no update")
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261102074039.26983-1-adrian.hunter@intel.com?part=4
next prev parent reply other threads:[~2026-11-02 8:21 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 7:40 [PATCH 0/6] perf/x86/intel/pt: Fix tracing across kexec, kdump and suspend Adrian Hunter
2026-11-02 7:40 ` [PATCH 1/6] irq_work: Re-raise pending irq_work after system resume Adrian Hunter
2026-11-02 7:51 ` sashiko-bot
2026-11-02 9:06 ` Peter Zijlstra
2026-11-02 10:54 ` Adrian Hunter
2026-11-02 16:39 ` Sebastian Andrzej Siewior
2026-11-02 7:40 ` [PATCH 2/6] perf/x86/intel/pt: Stop tracing if VMXON has not yet happened Adrian Hunter
2026-11-02 7:59 ` sashiko-bot
2026-11-02 9:57 ` Peter Zijlstra
2026-11-02 11:04 ` Adrian Hunter
2026-11-02 11:07 ` Peter Zijlstra
2026-11-02 7:40 ` [PATCH 3/6] perf/x86/intel/pt: Stop tracing at syscore shutdown Adrian Hunter
2026-11-02 8:05 ` sashiko-bot
2026-11-02 10:04 ` Peter Zijlstra
2026-11-02 10:23 ` Adrian Hunter
2026-11-02 11:01 ` Peter Zijlstra
2026-11-02 16:15 ` Andi Kleen
2026-11-02 16:27 ` Adrian Hunter
2026-11-02 17:45 ` Andi Kleen
2026-11-02 18:13 ` Adrian Hunter
2026-11-02 7:40 ` [PATCH 4/6] perf/x86/intel/pt: Clear TraceEn in hardware in cpu_emergency_stop_pt() Adrian Hunter
2026-11-02 8:21 ` sashiko-bot [this message]
2026-11-02 10:07 ` Peter Zijlstra
2026-11-02 18:41 ` Adrian Hunter
2026-11-02 7:40 ` [PATCH 5/6] perf/x86/intel/pt: Reset stale MSR state on CPU start and resume Adrian Hunter
2026-11-02 8:31 ` sashiko-bot
2026-11-02 7:40 ` [PATCH 6/6] perf/x86/intel/pt: Stop tracing across system suspend Adrian Hunter
2026-11-02 8:59 ` sashiko-bot
2026-11-02 10:10 ` [PATCH 0/6] perf/x86/intel/pt: Fix tracing across kexec, kdump and suspend Peter Zijlstra
2026-11-02 12:22 ` Adrian Hunter
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=sashiko-outbox-193098@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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