Commit df000154 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents 76fcbc9c 67ab5eb7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ config ARM
	select HAVE_EBPF_JIT if !CPU_ENDIAN_BE32
	select HAVE_CONTEXT_TRACKING
	select HAVE_C_RECORDMCOUNT
	select HAVE_BUILDTIME_MCOUNT_SORT
	select HAVE_DEBUG_KMEMLEAK if !XIP_KERNEL
	select HAVE_DMA_CONTIGUOUS if MMU
	select HAVE_DYNAMIC_FTRACE if !XIP_KERNEL && !CPU_ENDIAN_BE32 && MMU
+1 −0
Original line number Diff line number Diff line
@@ -186,6 +186,7 @@ config X86
	select HAVE_CONTEXT_TRACKING_OFFSTACK	if HAVE_CONTEXT_TRACKING
	select HAVE_C_RECORDMCOUNT
	select HAVE_OBJTOOL_MCOUNT		if STACK_VALIDATION
	select HAVE_BUILDTIME_MCOUNT_SORT
	select HAVE_DEBUG_KMEMLEAK
	select HAVE_DMA_CONTIGUOUS
	select HAVE_DYNAMIC_FTRACE
+3 −2
Original line number Diff line number Diff line
@@ -23,7 +23,8 @@

#undef __get_rel_dynamic_array
#define __get_rel_dynamic_array(field)	\
		((void *)(&__entry->__rel_loc_##field) +	\
		((void *)__entry +					\
		 offsetof(typeof(*__entry), __rel_loc_##field) +	\
		 sizeof(__entry->__rel_loc_##field) +			\
		 (__entry->__rel_loc_##field & 0xffff))

+5 −4
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@ TRACE_MAKE_SYSTEM_STR();
	struct trace_event_raw_##name {					\
		struct trace_entry	ent;				\
		tstruct							\
		char			__data[0];			\
		char			__data[];			\
	};								\
									\
	static struct trace_event_class event_class_##name;
@@ -319,7 +319,8 @@ TRACE_MAKE_SYSTEM_STR();

#undef __get_rel_dynamic_array
#define __get_rel_dynamic_array(field)					\
		((void *)(&__entry->__rel_loc_##field) +	\
		((void *)__entry + 					\
		 offsetof(typeof(*__entry), __rel_loc_##field) +	\
		 sizeof(__entry->__rel_loc_##field) +			\
		 (__entry->__rel_loc_##field & 0xffff))

+7 −1
Original line number Diff line number Diff line
@@ -70,10 +70,16 @@ config HAVE_C_RECORDMCOUNT
	help
	  C version of recordmcount available?

config HAVE_BUILDTIME_MCOUNT_SORT
       bool
       help
         An architecture selects this if it sorts the mcount_loc section
	 at build time.

config BUILDTIME_MCOUNT_SORT
       bool
       default y
       depends on BUILDTIME_TABLE_SORT && !S390
       depends on HAVE_BUILDTIME_MCOUNT_SORT && DYNAMIC_FTRACE
       help
         Sort the mcount_loc section at build time.

Loading