public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: perf/core: out-of-line and export perf_allow_cpu/tracepoint()
Date: Mon, 25 May 2026 21:03:40 +1000	[thread overview]
Message-ID: <review-patch1-20260521024904.331912-2-jhubbard@nvidia.com> (raw)
In-Reply-To: <20260521024904.331912-2-jhubbard@nvidia.com>

Patch Review

**Correctness: Good.** The moved function bodies are exact copies of the original static inlines:

```c
int perf_allow_cpu(void)
{
	if (sysctl_perf_event_paranoid > 0 && !perfmon_capable())
		return -EACCES;

	return security_perf_event_open(PERF_SECURITY_CPU);
}
EXPORT_SYMBOL_GPL(perf_allow_cpu);
```

This matches the original inline in the header byte-for-byte (minus `static inline`). Same for `perf_allow_tracepoint()`.

**Placement:** The new functions are placed in `kernel/events/core.c` immediately after `perf_allow_kernel()` at line 14731, which is the right location. `EXPORT_SYMBOL_GPL` is the correct export type, matching `perf_allow_kernel()`.

**Header update:** The declarations change from `static inline` with bodies to `extern int` declarations, placed alongside the existing `extern int perf_allow_kernel(void)`. Clean.

**No issues found.** This patch is a mechanical, safe transformation. Existing built-in callers see no functional difference (the function call overhead for these permission checks is negligible). The commit message correctly references the precedent commit 5e9629d0ae97.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-05-25 11:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-21  2:49 [PATCH 0/2] perf: complete perf_allow_* trio and use in drm/xe John Hubbard
2026-05-21  2:49 ` [PATCH 1/2] perf/core: out-of-line and export perf_allow_cpu/tracepoint() John Hubbard
2026-05-25 11:03   ` Claude Code Review Bot [this message]
2026-05-21  2:49 ` [PATCH 2/2] drm/xe: gate observation streams with perf_allow_cpu() John Hubbard
2026-05-25 11:03   ` Claude review: " Claude Code Review Bot
2026-05-25 11:03 ` Claude review: perf: complete perf_allow_* trio and use in drm/xe Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-05-23  1:33 [PATCH v2 0/2] " John Hubbard
2026-05-23  1:33 ` [PATCH v2 1/2] perf/core: out-of-line and export perf_allow_cpu/tracepoint() John Hubbard
2026-05-25  8:04   ` Claude review: " Claude Code Review Bot

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=review-patch1-20260521024904.331912-2-jhubbard@nvidia.com \
    --to=claude-review@example.com \
    --cc=dri-devel-reviews@example.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