Pulltracing fixes from Steven Rostedt: - Limit mcount build time sorting to only those archs that we know it works for. - Fix memory leak in error path of histogram setup - Fix and clean up rel_loc array out of bounds issue - tools/rtla documentation fixes - Fix issues with histogram logic * tag 'trace-v5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Don't inc err_log entry count if entry allocation fails tracing: Propagate is_signed to expression tracing: Fix smatch warning for do while check in event_hist_trigger_parse() tracing: Fix smatch warning for null glob in event_hist_trigger_parse() tools/tracing: Update Makefile to build rtla rtla: Make doc build optional tracing/perf: Avoid -Warray-bounds warning for __rel_loc macro tracing: Avoid -Warray-bounds warning for __rel_loc macro tracing/histogram: Fix a potential memory leak for kstrdup() ftrace: Have architectures opt-in for mcount build time sorting
Showing the changes to include/trace (2 of 10 files). Show all
Unified · Split
| @@ -23,8 +23,9 @@ · 22 unmodified lines | ||
| 23 | 23 | |
| 24 | 24 | #undef __get_rel_dynamic_array |
| 25 | 25 | #define __get_rel_dynamic_array(field) \ |
| 26 | − ((void *)(&__entry->__rel_loc_##field) + \ | |
| 27 | − sizeof(__entry->__rel_loc_##field) + \ | |
| 26 | + ((void *)__entry + \ | |
| 27 | + offsetof(typeof(*__entry), __rel_loc_##field) + \ | |
| 28 | + sizeof(__entry->__rel_loc_##field) + \ | |
| 28 | 29 | (__entry->__rel_loc_##field & 0xffff)) |
| 29 | 30 | |
| 30 | 31 | #undef __get_rel_dynamic_array_len |
| @@ -128,7 +128,7 @@ TRACE_MAKE_SYSTEM_STR(); · 127 unmodified lines | ||
| 128 | 128 | struct trace_event_raw_##name { \ |
| 129 | 129 | struct trace_entry ent; \ |
| 130 | 130 | tstruct \ |
| 131 | − char __data[0]; \ | |
| 131 | + char __data[]; \ | |
| 132 | 132 | }; \ |
| 133 | 133 | \ |
| 134 | 134 | static struct trace_event_class event_class_##name; |
| @@ -318,9 +318,10 @@ TRACE_MAKE_SYSTEM_STR(); · 183 unmodified lines | ||
| 318 | 318 | #define __get_str(field) ((char *)__get_dynamic_array(field)) |
| 319 | 319 | |
| 320 | 320 | #undef __get_rel_dynamic_array |
| 321 | −#define __get_rel_dynamic_array(field) \ | |
| 322 | − ((void *)(&__entry->__rel_loc_##field) + \ | |
| 323 | − sizeof(__entry->__rel_loc_##field) + \ | |
| 321 | +#define __get_rel_dynamic_array(field) \ | |
| 322 | + ((void *)__entry + \ | |
| 323 | + offsetof(typeof(*__entry), __rel_loc_##field) + \ | |
| 324 | + sizeof(__entry->__rel_loc_##field) + \ | |
| 324 | 325 | (__entry->__rel_loc_##field & 0xffff)) |
| 325 | 326 | |
| 326 | 327 | #undef __get_rel_dynamic_array_len |