]> git.ipfire.org Git - thirdparty/linux.git/commit
tracing: Avoid possible signed 64-bit truncation
authorIan Rogers <irogers@google.com>
Thu, 8 Jan 2026 00:26:25 +0000 (16:26 -0800)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Fri, 23 Jan 2026 18:34:30 +0000 (13:34 -0500)
commit00f13e28a9c3acd40f0551cde7e9d2d1a41585bf
tree8821ce9f3b247667b7309d492be93909a14ad733
parent90f9f5d64cae4e72defd96a2a22760173cb3c9ec
tracing: Avoid possible signed 64-bit truncation

64-bit truncation to 32-bit can result in the sign of the truncated
value changing. The cmp_mod_entry is used in bsearch and so the
truncation could result in an invalid search order. This would only
happen were the addresses more than 2GB apart and so unlikely, but
let's fix the potentially broken compare anyway.

Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://patch.msgid.link/20260108002625.333331-1-irogers@google.com
Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace.c