Skip to contentSkip to conversation

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

PATCH New Joel Fernandes (Google) 1 participant 1 message Jan 2, 2020 Tracing

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

Cc Antonio Borneo <[email protected]>
---
 include/trace/events/preemptirq.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
include/trace/events/preemptirq.h +4 -4
index 95fba0471e5b..3f249e150c0c 100644
@@ -18,13 +18,13 @@ DECLARE_EVENT_CLASS(preemptirq_template,
 	TP_ARGS(ip, parent_ip),
 
 	TP_STRUCT__entry(
-		__field(u32, caller_offs)
-		__field(u32, parent_offs)
+		__field(s32, caller_offs)
+		__field(s32, parent_offs)
 	),
 
 	TP_fast_assign(
-		__entry->caller_offs = (u32)(ip - (unsigned long)_stext);
-		__entry->parent_offs = (u32)(parent_ip - (unsigned long)_stext);
+		__entry->caller_offs = (s32)(ip - (unsigned long)_stext);
+		__entry->parent_offs = (s32)(parent_ip - (unsigned long)_stext);
 	),
 
 	TP_printk("caller=%pS parent=%pS",
Signature · 1 line
2.24.1.735.g03f4e72817-goog