From: Steven Rostedt <rostedt@goodmis.org>
To: Ian Rogers <irogers@google.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH v1] tracing: Avoid possible signed 64-bit truncation
Date: Wed, 7 Jan 2026 14:26:32 -0500 [thread overview]
Message-ID: <20260107142632.0dec5b10@gandalf.local.home> (raw)
In-Reply-To: <20251209213135.13eb68f4@fedora>
On Tue, 9 Dec 2025 21:31:35 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:
> > ---
> > kernel/trace/trace.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> > index d1e527cf2aae..e6a80cbe9326 100644
> > --- a/kernel/trace/trace.c
> > +++ b/kernel/trace/trace.c
> > @@ -6057,8 +6057,10 @@ static int cmp_mod_entry(const void *key, const void *pivot)
> >
> > if (addr >= ent[0].mod_addr && addr < ent[1].mod_addr)
> > return 0;
> > + else if (addr > ent->mod_addr)
> > + return 1;
> > else
> > - return addr - ent->mod_addr;
> > + return -1;
>
> Could we still keep this down to a single if check?
>
> if (addr < ent->mod_addr)
> return -1;
>
> return addr >= ent[1].mod_addr;
Care to send a v2?
-- Steve
next prev parent reply other threads:[~2026-01-07 19:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-09 22:40 [PATCH v1] tracing: Avoid possible signed 64-bit truncation Ian Rogers
2025-12-10 2:31 ` Steven Rostedt
2026-01-07 19:26 ` Steven Rostedt [this message]
2026-01-07 19:40 ` Ian Rogers
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=20260107142632.0dec5b10@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=irogers@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@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