All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Gu Bin" <gubin@cmss.chinamobile.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH] perf evsel: fix buffer offset when building the EPERM error string
Date: Wed, 04 Nov 2026 10:43:51 +0000	[thread overview]
Message-ID: <sashiko-outbox-197115@kernel.org> (raw)
In-Reply-To: <20261104103607.1903-1-gubin@cmss.chinamobile.com>

> When building the EPERM error string, the scnprintf() that emits "No
> permission to enable %s event" uses (msg, size) instead of (msg +
> printed, size - printed) like every other line in this case, overwriting
> the "Access to performance monitoring..." preamble and truncating the
> following hint. The message shown to the user for a failed open with
> EPERM is therefore garbled: the preamble is lost and stale bytes from
> the overwritten content remain in the buffer.
> 
> Use the correct offset and remaining size.
> 
> Fixes: c1034eb06920 ("perf tool: Make perf tool aware of SELinux access control")
> Signed-off-by: Gu Bin <gubin@cmss.chinamobile.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261104103607.1903-1-gubin@cmss.chinamobile.com?part=1


      reply	other threads:[~2026-11-04 10:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 10:36 [PATCH] perf evsel: fix buffer offset when building the EPERM error string Gu Bin
2026-11-04 10:43 ` 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-197115@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=gubin@cmss.chinamobile.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.