From: Steven Rostedt <rostedt@goodmis.org>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: linux-trace-kernel@vger.kernel.org
Subject: Re: [bug report] tracing: Have persistent trace instances save module addresses
Date: Thu, 13 Mar 2025 07:15:37 -0400 [thread overview]
Message-ID: <20250313071537.19ad59df@batman.local.home> (raw)
In-Reply-To: <44c5deaa-b094-4852-90f9-52f3fb10e67a@stanley.mountain>
On Thu, 13 Mar 2025 11:50:12 +0300
Dan Carpenter <dan.carpenter@linaro.org> wrote:
> 9421 tscratch = ring_buffer_meta_scratch(buf->buffer, &scratch_size);
> --> 9422 setup_trace_scratch(tr, tscratch, scratch_size);
>
> If ring_buffer_alloc_range() fails then scratch_size is uninitialized.
> This is "harmless". According to the C standard, it's undefined but in
> the kernel we would allow it if setup_trace_scratch() is inlined. Which
> it probably will be. The other thing is that if it's not inline the
> UBSan detector will complain about these.
>
> The compiler basically always initializes stack variables to zero these
> days so adding an "= 0;" doesn't change runtime at all.
Sure.
-- Steve
prev parent reply other threads:[~2025-03-13 11:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-13 8:50 [bug report] tracing: Have persistent trace instances save module addresses Dan Carpenter
2025-03-13 11:15 ` Steven Rostedt [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=20250313071537.19ad59df@batman.local.home \
--to=rostedt@goodmis.org \
--cc=dan.carpenter@linaro.org \
--cc=linux-trace-kernel@vger.kernel.org \
/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