From: sashiko-bot@kernel.org
To: "Jiwoo Kim" <arpe1618@gmail.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH] perf/x86/intel: Don't allow extended register sampling for BTS events
Date: Sat, 14 Nov 2026 06:44:47 +0000 [thread overview]
Message-ID: <sashiko-outbox-214232@kernel.org> (raw)
In-Reply-To: <20261114062249.1301-1-arpe1618@gmail.com>
> x86_pmu_hw_config() accepts extended (XMM) register sampling in
> REGS_USER for events without precise_ip, and the same goes for the SIMD
> register fields. The BTS event is such an event, and
> intel_pmu_bts_config() does not reject it.
>
> For a sample taken in the PMI handler, x86_pmu_update_perf_regs() copies
> the user registers into the per-CPU x86_user_regs, which is a struct
> x86_perf_regs. That is what perf_reg_value() and perf_simd_reg_value()
> expect: they use container_of() on the sampled struct pt_regs to reach
> the fields that follow it.
>
> intel_pmu_drain_bts_buffer() does not call x86_pmu_update_perf_regs().
> It passes zeroed on-stack registers to perf_prepare_sample(), so the
> generic perf_sample_regs_user() takes the user registers from
> perf_get_regs_user(). That returns task_pt_regs(current), or on x86_64,
> [ ... ]
> patch and its changelog. It has not been reproduced, and the change
> has only been compile-tested.
>
> Fixes: edd9aec51213 ("perf/x86: Enable XMM register sampling for REGS_USER case")
> Signed-off-by: Jiwoo Kim <arpe1618@gmail.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261114062249.1301-1-arpe1618@gmail.com?part=1
prev parent reply other threads:[~2026-11-14 6:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 6:22 [PATCH] perf/x86/intel: Don't allow extended register sampling for BTS events Jiwoo Kim
2026-11-14 6:44 ` sashiko-bot [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=sashiko-outbox-214232@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=arpe1618@gmail.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