Skip to content

Commit bf44f48

Browse files
joelagnelrostedt
authored andcommitted
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: d591581 ("tracing: Add support for preempt and irq enable/disable events") Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
1 parent e31f793 commit bf44f48

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎include/trace/events/preemptirq.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ DECLARE_EVENT_CLASS(preemptirq_template,
1818
TP_ARGS(ip, parent_ip),
1919

2020
TP_STRUCT__entry(
21-
__field(u32, caller_offs)
22-
__field(u32, parent_offs)
21+
__field(s32, caller_offs)
22+
__field(s32, parent_offs)
2323
),
2424

2525
TP_fast_assign(
26-
__entry->caller_offs = (u32)(ip - (unsigned long)_stext);
27-
__entry->parent_offs = (u32)(parent_ip - (unsigned long)_stext);
26+
__entry->caller_offs = (s32)(ip - (unsigned long)_stext);
27+
__entry->parent_offs = (s32)(parent_ip - (unsigned long)_stext);
2828
),
2929

3030
TP_printk("caller=%pS parent=%pS",

0 commit comments

Comments
 (0)