Commit bf44f488 authored by Joel Fernandes (Google)'s avatar Joel Fernandes (Google) Committed by Steven Rostedt (VMware)

tracing: Change offset type to s32 in preempt/irq tracepoints

Discussion in the below link reported that symbols in modules can appear
to be before _stext on ARM architecture, causing wrapping with the
offsets of this tracepoint. Change the offset type to s32 to fix this.

Link: http://lore.kernel.org/r/20191127154428.191095-1-antonio.borneo@st.com
Link: http://lkml.kernel.org/r/20200102194625.226436-1-joel@joelfernandes.org

Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: David Sterba <dsterba@suse.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Mike Rapoport <rppt@linux.ibm.com>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Antonio Borneo <antonio.borneo@st.com>
Cc: stable@vger.kernel.org
Fixes: d5915816 ("tracing: Add support for preempt and irq enable/disable events")
Signed-off-by: default avatarJoel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
parent e31f7939
...@@ -18,13 +18,13 @@ DECLARE_EVENT_CLASS(preemptirq_template, ...@@ -18,13 +18,13 @@ DECLARE_EVENT_CLASS(preemptirq_template,
TP_ARGS(ip, parent_ip), TP_ARGS(ip, parent_ip),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(u32, caller_offs) __field(s32, caller_offs)
__field(u32, parent_offs) __field(s32, parent_offs)
), ),
TP_fast_assign( TP_fast_assign(
__entry->caller_offs = (u32)(ip - (unsigned long)_stext); __entry->caller_offs = (s32)(ip - (unsigned long)_stext);
__entry->parent_offs = (u32)(parent_ip - (unsigned long)_stext); __entry->parent_offs = (s32)(parent_ip - (unsigned long)_stext);
), ),
TP_printk("caller=%pS parent=%pS", TP_printk("caller=%pS parent=%pS",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment