linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Kuan-Wei Chiu <visitorckw@gmail.com>
Cc: suzuki.poulose@arm.com, mike.leach@linaro.org,
	james.clark@linaro.org, alexander.shishkin@linux.intel.com,
	mathieu.poirier@linaro.org, leo.yan@arm.com, Al.Grant@arm.com,
	jserv@ccns.ncku.edu.tw, marscheng@google.com,
	ericchancf@google.com, milesjiang@google.com, nickpan@google.com,
	coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] coresight: etm3x: Fix cntr_val_show() to match cntr_val_store() behavior
Date: Mon, 1 Dec 2025 11:14:03 +0100	[thread overview]
Message-ID: <2025120149-broadways-upon-ad72@gregkh> (raw)
In-Reply-To: <20251201095228.1905489-1-visitorckw@gmail.com>

On Mon, Dec 01, 2025 at 09:52:28AM +0000, Kuan-Wei Chiu wrote:
> The cntr_val_show() function was intended to print the values of all
> counters using a loop. However, due to a buffer overwrite issue with
> sprintf(), it effectively only displayed the value of the last counter.
> 
> The companion function, cntr_val_store(), allows users to modify a
> specific counter selected by 'cntr_idx'. To maintain consistency
> between read and write operations and to align with the ETM4x driver
> behavior, modify cntr_val_show() to report only the value of the
> currently selected counter.
> 
> This change removes the loop and the "counter %d:" prefix, printing
> only the hexadecimal value. It also adopts sysfs_emit() for standard
> sysfs output formatting.
> 
> Fixes: a939fc5a71ad ("coresight-etm: add CoreSight ETM/PTM driver")
> Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
> ---
> Build test only.
> 
> Changes in v2:
> - Redesigned the fix to match cntr_val_store() logic (display only the
>   currently selected counter) instead of attempting to list all
>   counters.
> - Removed the loop and the "counter %d:" prefix.
> - Switched from sprintf() to sysfs_emit().
> - Refactored control flow to use a single return point.
> 
> v1: https://lore.kernel.org/lkml/20251121002350.1166758-1-visitorckw@gmail.com/
> 
>  .../hwtracing/coresight/coresight-etm3x-sysfs.c   | 15 ++++-----------
>  1 file changed, 4 insertions(+), 11 deletions(-)
> 

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- You have marked a patch with a "Fixes:" tag for a commit that is in an
  older released kernel, yet you do not have a cc: stable line in the
  signed-off-by area at all, which means that the patch will not be
  applied to any older kernel releases.  To properly fix this, please
  follow the documented rules in the
  Documentation/process/stable-kernel-rules.rst file for how to resolve
  this.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot


  reply	other threads:[~2025-12-01 10:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-01  9:52 [PATCH v2] coresight: etm3x: Fix cntr_val_show() to match cntr_val_store() behavior Kuan-Wei Chiu
2025-12-01 10:14 ` Greg KH [this message]
2025-12-01 10:25 ` James Clark
2025-12-01 10:39   ` Kuan-Wei Chiu

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=2025120149-broadways-upon-ad72@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=Al.Grant@arm.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=coresight@lists.linaro.org \
    --cc=ericchancf@google.com \
    --cc=james.clark@linaro.org \
    --cc=jserv@ccns.ncku.edu.tw \
    --cc=leo.yan@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marscheng@google.com \
    --cc=mathieu.poirier@linaro.org \
    --cc=mike.leach@linaro.org \
    --cc=milesjiang@google.com \
    --cc=nickpan@google.com \
    --cc=suzuki.poulose@arm.com \
    --cc=visitorckw@gmail.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;
as well as URLs for NNTP newsgroup(s).