linux/kernel/trace
Chase Douglas d62f85d1e2 tracing/function-graph: Use correct string size for snprintf
The nsecs_str string is a local variable defined as:

char nsecs_str[5];

It is possible for the snprintf call to use a size value larger than the
size of the string. This should not cause a buffer overrun as it is
written now due to the value for the string format "%03lu" can not be
larger than 1000. However, this change makes it correct. By making the
size correct we guard against potential future changes that could actually
cause a buffer overrun.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
LKML-Reference: <1276619355-18116-1-git-send-email-chase.douglas@canonical.com>

[ added 'UL' to number 8 to fix gcc warning comparing it to sizeof() ]

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-06-28 21:11:39 -04:00
..
blktrace.c blktrace: Fix new kernel-doc warnings 2010-05-31 09:58:20 +02:00
ftrace.c tracing: Remove ftrace_preempt_disable/enable 2010-06-03 19:32:38 -04:00
Kconfig tracing: Remove kmemtrace ftrace plugin 2010-06-09 17:31:22 +02:00
Makefile tracing: Remove kmemtrace ftrace plugin 2010-06-09 17:31:22 +02:00
power-traces.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ring_buffer_benchmark.c ring-buffer: Make benchmark handle missed events 2010-04-27 13:26:58 -04:00
ring_buffer.c Merge branch 'tip/perf/core-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/core 2010-06-08 19:34:40 +02:00
trace_branch.c tracing: Allow events to share their print functions 2010-05-14 14:20:32 -04:00
trace_clock.c tracing: Remove ftrace_preempt_disable/enable 2010-06-03 19:32:38 -04:00
trace_entries.h tracing: Remove kmemtrace ftrace plugin 2010-06-09 17:31:22 +02:00
trace_event_perf.c Merge branch 'linus' into perf/core 2010-06-28 22:33:24 +02:00
trace_events_filter.c tracing: Remove test of NULL define_fields callback 2010-06-28 17:12:52 -04:00
trace_events.c tracing: Remove open-coded __trace_add_event_call() 2010-06-28 17:12:55 -04:00
trace_export.c tracing: Remove redundant raw_init callbacks 2010-06-28 17:12:53 -04:00
trace_functions_graph.c tracing/function-graph: Use correct string size for snprintf 2010-06-28 21:11:39 -04:00
trace_functions.c tracing: Remove ftrace_preempt_disable/enable 2010-06-03 19:32:38 -04:00
trace_irqsoff.c tracing: Add graph output support for irqsoff tracer 2010-04-27 12:36:53 -04:00
trace_kprobe.c tracing: Remove redundant raw_init callbacks 2010-06-28 17:12:53 -04:00
trace_ksym.c hw-breakpoints: Get the number of available registers on boot dynamically 2010-05-01 04:32:14 +02:00
trace_mmiotrace.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
trace_nop.c tracing/ftrace: make nop-tracer use polling wait for events on pipe 2009-03-23 09:22:15 +01:00
trace_output.c Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-05-27 15:23:47 -07:00
trace_output.h tracing: Allow events to share their print functions 2010-05-14 14:20:32 -04:00
trace_printk.c tracing: Remove markers 2009-09-18 21:22:08 +02:00
trace_sched_switch.c tracing: Let tracepoints have data passed to tracepoint callbacks 2010-05-14 09:50:34 -04:00
trace_sched_wakeup.c tracing: Remove ftrace_preempt_disable/enable 2010-06-03 19:32:38 -04:00
trace_selftest_dynamic.c ftrace: fix dynamic ftrace selftest 2008-05-23 21:13:23 +02:00
trace_selftest.c Merge branch 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-05-18 08:35:04 -07:00
trace_stack.c tracing: Remove ftrace_preempt_disable/enable 2010-06-03 19:32:38 -04:00
trace_stat.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
trace_stat.h tracing/stat: Add stat_release() callback 2009-07-10 12:14:05 +02:00
trace_syscalls.c tracing: Use a global field list for all syscall exit events 2010-06-28 17:12:44 -04:00
trace_sysprof.c x86: Unify dumpstack.h and stacktrace.h 2010-06-08 23:29:52 +02:00
trace_workqueue.c tracing: Let tracepoints have data passed to tracepoint callbacks 2010-05-14 09:50:34 -04:00
trace.c Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing into perf/core 2010-06-09 18:55:57 +02:00
trace.h tracing: Don't allocate common fields for every trace events 2010-06-28 17:12:46 -04:00