From: Namhyung Kim <namhyung@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Leo Yan <leo.yan@arm.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
James Clark <james.clark@linaro.org>,
Mike Leach <mike.leach@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Robert Walker <robert.walker@arm.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] perf cs-etm: Initialize the Thumb instruction buffer
Date: Wed, 25 Nov 2026 11:14:37 -0800 [thread overview]
Message-ID: <awczncL6fSXxX9NZ@google.com> (raw)
In-Reply-To: <CAP-5=fXrP+FSmv35KgvwDkNED921X60W3BWiMYHmLV-AzSG4BA@mail.gmail.com>
On Fri, Nov 13, 2026 at 08:30:59AM -0800, Ian Rogers wrote:
> On Fri, Nov 13, 2026 at 2:55 AM Leo Yan <leo.yan@arm.com> wrote:
> >
> > cs_etm__frontend_mem_access() can return zero or a short read without
> > fully initializing instrBytes. cs_etm__t32_instr_size() nevertheless
> > inspects its second byte. With CORESIGHT=1 and -O3, GCC 15.2.0 reports:
> >
> > error: 'instrBytes' may be used uninitialized
> >
> > Zero-initialize the buffer to avoid reading uninitialized stack data
> > when instruction memory is unavailable and fix the build failure.
> >
> > Reported-by: Ian Rogers <irogers@google.com>
> > Closes: https://lore.kernel.org/linux-perf-users/20261030-perf_cs_etm_fix_non_taken-v3-0-7629b52ab047@arm.com/T/#m64fb81c665214b79883d9be815b40ac5f6669628
> > Fixes: a7ee4d625ede ("perf cs-etm: Support for ARM A32/T32 instruction sets in CoreSight trace")
> > Signed-off-by: Leo Yan <leo.yan@arm.com>
>
> Reviewed-by: Ian Rogers <irogers@google.com>
Applied this one to perf-tools-next, thanks!
Best regards
Namhyung
next prev parent reply other threads:[~2026-11-25 19:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 10:54 [PATCH 0/3] perf cs-etm: Fix GCC 15 build failure Leo Yan
2026-11-13 10:54 ` [PATCH 1/3] perf cs-etm: Initialize the Thumb instruction buffer Leo Yan
2026-11-13 16:30 ` Ian Rogers
2026-11-25 19:14 ` Namhyung Kim [this message]
2026-11-13 10:54 ` [PATCH 2/3] perf cs-etm: Use the packet instruction size for stack events Leo Yan
2026-11-13 10:54 ` [PATCH 3/3] perf cs-etm: Check frontend instruction reads Leo Yan
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=awczncL6fSXxX9NZ@google.com \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=coresight@lists.linaro.org \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=leo.yan@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mike.leach@arm.com \
--cc=robert.walker@arm.com \
--cc=suzuki.poulose@arm.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
all inboxes | Powered by JetHome®