]> git.baikalelectronics.ru Git - kernel.git/commit
tracing/probes: Use struct_size() instead of defining custom macros
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Tue, 17 Aug 2021 03:43:00 +0000 (23:43 -0400)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Wed, 18 Aug 2021 22:13:52 +0000 (18:13 -0400)
commita9a49536367bdded9b9398b7549154e0ecd40e48
treea230776bf5c0e8f861dc3221f266c888eb2bedb3
parentd24ee1321281346b07fcffa9f2844723f90f2729
tracing/probes: Use struct_size() instead of defining custom macros

Remove SIZEOF_TRACE_KPROBE() and SIZEOF_TRACE_UPROBE() and use
struct_size() as that's what it is made for. No need to have custom
macros. Especially since struct_size() has some extra memory checks for
correctness.

Link: https://lkml.kernel.org/r/20210817035027.795000217@goodmis.org
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace_kprobe.c
kernel/trace/trace_uprobe.c