From: Steven Rostedt <rostedt@goodmis.org>
To: sashiko-bot@kernel.org
Cc: sashiko-reviews@lists.linux.dev,
"Linux Trace Kernel" <linux-trace-kernel@vger.kernel.org>
Subject: Re: [PATCH v4] tracing/probes: Zero out faulted dereferenced fields
Date: Fri, 20 Nov 2026 15:10:05 -0500 [thread overview]
Message-ID: <20261120151005.7142efbe@gandalf.local.home> (raw)
In-Reply-To: <sashiko-outbox-225971@kernel.org>
On Fri, 20 Nov 2026 19:52:53 +0000
sashiko-bot@kernel.org wrote:
> > - val = lval + sizeof(char *);
> > + /* Only update a non NULL val */
> > + if (val)
> > + val = lval + sizeof(char *);
>
> [Severity: Medium]
> Should this check if (lval) instead of if (val) when advancing through a
> string pointer array?
>
> For FETCH_OP_ST_STRING and FETCH_OP_ST_USTRING arrays, stage 2 saves the
> current array slot address in lval and dereferences that slot into val.
> If the array pointer lval is valid but element i is NULL (or reading it
> faulted), val is 0 while lval is non-zero. Checking if (val) leaves val
> as 0 instead of advancing to lval + sizeof(char *), so jumping back to
> stage2 overwrites lval with 0 and causes all remaining string elements in
> the array to be skipped and recorded as faulted.
Hmm, I'm not sure if it makes much of a difference. If val were to fault,
it is very likely that lval would fault too. But perhaps it should be:
val = lval ? lval + sizeof(char *) : 0;
I'll send a v5.
-- Steve
prev parent reply other threads:[~2026-11-20 20:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 19:30 [PATCH v4] tracing/probes: Zero out faulted dereferenced fields Steven Rostedt
2026-11-20 19:52 ` sashiko-bot
2026-11-20 20:10 ` 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=20261120151005.7142efbe@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=sashiko-bot@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox