Skip to contentSkip to conversation

tracing/fastboot: fix len of func buffer

PATCH In review Frederic Weisbecker 2 participants 2 messages Dec 11, 2008 – Dec 12, 2008 Tracing

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 tracing/fastboot: fix len of func buffer

From: Stephen Rothwell <[email protected]>

Impact: fix possible stack overrun

This is a port of a patch included in the mainline (KSYM_SYMBOL_LEN fixes). The current func len is not large enough to contain the max symbol len, the right size must be KSYM_SYMBOL_LEN.

---

include/trace/boot.h +2 -2
index 6b54537..3ec58b4 100644
@@ -9,7 +9,7 @@
  */
 struct boot_trace_call {
 	pid_t			caller;
-	char			func[KSYM_NAME_LEN];
+	char			func[KSYM_SYMBOL_LEN];
 };
 
 /*
@@ -17,7 +17,7 @@ struct boot_trace_call {
  * while it returns.
  */
 struct boot_trace_ret {
-	char			func[KSYM_NAME_LEN];
+	char			func[KSYM_SYMBOL_LEN];
 	int				result;
 	unsigned long long	duration;		/* nsecs */
 };
Signature · 1 line
1.6.0.4
#1 lore raw
Quoted 10 lines · Frederic Weisbecker

From: Stephen Rothwell <[email protected]>

Impact: fix possible stack overrun

This is a port of a patch included in the mainline (KSYM_SYMBOL_LEN fixes). The current func len is not large enough to contain the max symbol len, the right size must be KSYM_SYMBOL_LEN.

thanks Frederic and Stephen, applied to tip/tracing/fastboot.

Ingo