On Sun, 12 Oct 2025 12:34:08 +0900 Masami Hiramatsu (Google) mhiramat@kernel.org wrote:
Use a void pointer and get the offset via offsetof() to keep fortify string from warning about this copy.
Cc: stable@vger.kernel.org Fixes: 64cf7d058a00 ("tracing: Have trace_marker use per-cpu data to read user space") Reported-by: syzbot+9a2ede1643175f350105@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/68e973f5.050a0220.1186a4.0010.GAE@google.com/ Signed-off-by: Steven Rostedt (Google) rostedt@goodmis.org
Ah, fixed already.
Acked-by: Masami Hiramatsu (Google) mhiramat@kernel.org
Actually this was the wrong fix. Before submitting a pull request, I looked to see if there was a better way to handle this and discovered "unsafe_memcpy()" which is the proper solution:
https://lore.kernel.org/all/20251011112032.77be18e4@gandalf.local.home/
-- Steve