public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ftrace: enable format arguments checking
@ 2008-12-20  9:15 Lai Jiangshan
  2008-12-24  3:24 ` Lai Jiangshan
  2008-12-24  3:42 ` Steven Rostedt
  0 siblings, 2 replies; 6+ messages in thread
From: Lai Jiangshan @ 2008-12-20  9:15 UTC (permalink / raw)
  To: Steven Rostedt, Ingo Molnar, Linux Kernel Mailing List


format arguments checking for ftrace_printk() is __printf(1, 2),
not __printf(1, 0).

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 9c5bc6b..0c71788 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -210,7 +210,7 @@ extern void ftrace_dump(void);
 static inline void
 ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { }
 static inline int
-ftrace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 0)));
+ftrace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
 
 static inline int
 ftrace_printk(const char *fmt, ...)



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] ftrace: enable format arguments checking
  2008-12-20  9:15 [PATCH] ftrace: enable format arguments checking Lai Jiangshan
@ 2008-12-24  3:24 ` Lai Jiangshan
  2008-12-24  3:36   ` Steven Rostedt
  2008-12-24  3:42 ` Steven Rostedt
  1 sibling, 1 reply; 6+ messages in thread
From: Lai Jiangshan @ 2008-12-24  3:24 UTC (permalink / raw)
  To: Steven Rostedt, Ingo Molnar, Linux Kernel Mailing List

Lai Jiangshan wrote:
> format arguments checking for ftrace_printk() is __printf(1, 2),
> not __printf(1, 0).
> 
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
> ---
> diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
> index 9c5bc6b..0c71788 100644
> --- a/include/linux/ftrace.h
> +++ b/include/linux/ftrace.h
> @@ -210,7 +210,7 @@ extern void ftrace_dump(void);
>  static inline void
>  ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { }
>  static inline int
> -ftrace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 0)));

Hi, Steven Rostedt
	Did you notice this patch?
	This patch changed a char in a line: s/0/2/. It enables the format checking.

	Lai.

> +ftrace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
>  
>  static inline int
>  ftrace_printk(const char *fmt, ...)
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 
> 
> 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ftrace: enable format arguments checking
  2008-12-24  3:24 ` Lai Jiangshan
@ 2008-12-24  3:36   ` Steven Rostedt
  0 siblings, 0 replies; 6+ messages in thread
From: Steven Rostedt @ 2008-12-24  3:36 UTC (permalink / raw)
  To: Lai Jiangshan; +Cc: Ingo Molnar, Linux Kernel Mailing List


On Wed, 24 Dec 2008, Lai Jiangshan wrote:

> Lai Jiangshan wrote:
> > format arguments checking for ftrace_printk() is __printf(1, 2),
> > not __printf(1, 0).
> > 
> > Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
> > ---
> > diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
> > index 9c5bc6b..0c71788 100644
> > --- a/include/linux/ftrace.h
> > +++ b/include/linux/ftrace.h
> > @@ -210,7 +210,7 @@ extern void ftrace_dump(void);
> >  static inline void
> >  ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { }
> >  static inline int
> > -ftrace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 0)));
> 
> Hi, Steven Rostedt
> 	Did you notice this patch?
> 	This patch changed a char in a line: s/0/2/. It enables the format checking.
> 
> 	Lai.
> 
> > +ftrace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
> >  
> >  static inline int
> >  ftrace_printk(const char *fmt, ...)
> > 

Ah yes, sorry, I'm rushing to get some other things done because I'll be 
on holiday tomorrow through to Jan 5th.

I'll pull it into the rest of my next series.

-- Steve


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ftrace: enable format arguments checking
  2008-12-20  9:15 [PATCH] ftrace: enable format arguments checking Lai Jiangshan
  2008-12-24  3:24 ` Lai Jiangshan
@ 2008-12-24  3:42 ` Steven Rostedt
  2008-12-24  3:46   ` Lai Jiangshan
  1 sibling, 1 reply; 6+ messages in thread
From: Steven Rostedt @ 2008-12-24  3:42 UTC (permalink / raw)
  To: Lai Jiangshan; +Cc: Ingo Molnar, Linux Kernel Mailing List


On Sat, 20 Dec 2008, Lai Jiangshan wrote:

Could you resubmit with a "Impact" line.

Thanks,

-- Steve

> 
> format arguments checking for ftrace_printk() is __printf(1, 2),
> not __printf(1, 0).
> 
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
> ---
> diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
> index 9c5bc6b..0c71788 100644
> --- a/include/linux/ftrace.h
> +++ b/include/linux/ftrace.h
> @@ -210,7 +210,7 @@ extern void ftrace_dump(void);
>  static inline void
>  ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { }
>  static inline int
> -ftrace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 0)));
> +ftrace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
>  
>  static inline int
>  ftrace_printk(const char *fmt, ...)
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ftrace: enable format arguments checking
  2008-12-24  3:42 ` Steven Rostedt
@ 2008-12-24  3:46   ` Lai Jiangshan
  2008-12-24  4:15     ` Steven Rostedt
  0 siblings, 1 reply; 6+ messages in thread
From: Lai Jiangshan @ 2008-12-24  3:46 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Ingo Molnar, Linux Kernel Mailing List

Steven Rostedt wrote:
> On Sat, 20 Dec 2008, Lai Jiangshan wrote:
> 
> Could you resubmit with a "Impact" line.
> 
> Thanks,
> 

Impact: check format for ftrace_printk() when CONFIG_TRACING=n

format arguments checking for ftrace_printk() is __printf(1, 2),
not __printf(1, 0).

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 9c5bc6b..0c71788 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -210,7 +210,7 @@ extern void ftrace_dump(void);
 static inline void
 ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { }
 static inline int
-ftrace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 0)));
+ftrace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
 
 static inline int
 ftrace_printk(const char *fmt, ...)


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] ftrace: enable format arguments checking
  2008-12-24  3:46   ` Lai Jiangshan
@ 2008-12-24  4:15     ` Steven Rostedt
  0 siblings, 0 replies; 6+ messages in thread
From: Steven Rostedt @ 2008-12-24  4:15 UTC (permalink / raw)
  To: Lai Jiangshan; +Cc: Ingo Molnar, Linux Kernel Mailing List


On Wed, 24 Dec 2008, Lai Jiangshan wrote:

> Steven Rostedt wrote:
> > On Sat, 20 Dec 2008, Lai Jiangshan wrote:
> > 
> > Could you resubmit with a "Impact" line.
> > 
> > Thanks,
> > 
> 
> Impact: check format for ftrace_printk() when CONFIG_TRACING=n
> 
> format arguments checking for ftrace_printk() is __printf(1, 2),
> not __printf(1, 0).
> 
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>

Ingo already pulled this.

Thanks anyway.

-- Steve


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-12-24  4:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-20  9:15 [PATCH] ftrace: enable format arguments checking Lai Jiangshan
2008-12-24  3:24 ` Lai Jiangshan
2008-12-24  3:36   ` Steven Rostedt
2008-12-24  3:42 ` Steven Rostedt
2008-12-24  3:46   ` Lai Jiangshan
2008-12-24  4:15     ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox