From: sashiko-bot@kernel.org
To: "Kyle Zeng" <kylebot@openai.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH] perf/core: Check kernel access for text poke and ksymbol events
Date: Tue, 06 Oct 2026 23:02:52 +0000 [thread overview]
Message-ID: <sashiko-outbox-162501@kernel.org> (raw)
In-Reply-To: <20261006225248.54708-1-kylebot@openai.com>
> PERF_RECORD_TEXT_POKE contains kernel text addresses and the old and new
> instruction bytes. PERF_RECORD_KSYMBOL similarly exposes kernel symbol
> addresses. Both records are delivered independently of exclude_kernel,
> but perf_event_open() does not check kernel access when their respective
> attributes are requested.
>
> With perf_event_paranoid=2, an unprivileged task can therefore open a
> user-only software event with text_poke set and observe kernel text
> patches. Opening and closing permitted counting-only tracepoint events
> can produce these records through static-call updates, disclosing
> relocated kernel text and branch targets.
>
> Include ksymbol and text_poke in the existing perf_allow_kernel() check.
> This authorizes the source event before allocation, also covering
> inherited events and output redirection, while retaining the existing
> sideband behavior for callers allowed to observe the kernel.
>
> Fixes: e17d43b93e54 ("perf: Add perf text poke event")
> Fixes: 76193a94522f ("perf, bpf: Introduce PERF_RECORD_KSYMBOL")
> Assisted-by: Codex:gpt-6-astra
> Signed-off-by: Kyle Zeng <kylebot@openai.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261006225248.54708-1-kylebot@openai.com?part=1
prev parent reply other threads:[~2026-10-06 23:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-06 22:52 [PATCH] perf/core: Check kernel access for text poke and ksymbol events Kyle Zeng
2026-10-06 23:02 ` 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-162501@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=kylebot@openai.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