tracing: next updates
Steven Rostedt
maintainercover tracing: next updates
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
for-next
Head SHA1: 3862807880acc0adaef6749738d210c9f45c3049
Aaron Tomlin (1):
tracing: Add BUG_ON when stack end location is over written
Mathieu Desnoyers (1):
tracepoint: Remove unused API functions
----
include/linux/tracepoint.h | 18 ---- kernel/trace/trace_stack.c | 3 + kernel/tracepoint.c | 222 +-------------------------------------------- 3 files changed, 8 insertions(+), 235 deletions(-)
Steven Rostedt
maintainerPATCH 1/2 tracepoint: Remove unused API functions
From: Mathieu Desnoyers <[email protected]>
After the following commit:
commit b75ef8b44b1cb95f5a26484b0e2fe37a63b12b44
Author: Mathieu Desnoyers <[email protected]> Date: Wed Aug 10 15:18:39 2011 -0400
Tracepoint: Dissociate from module mutex
The following functions became unnecessary:
- tracepoint_probe_register_noupdate,
- tracepoint_probe_unregister_noupdate,
- tracepoint_probe_update_all.
In fact, none of the in-kernel tracers, nor LTTng, nor SystemTAP use them. Remove those.
Moreover, the functions:
- tracepoint_iter_start,
- tracepoint_iter_next,
- tracepoint_iter_stop,
- tracepoint_iter_reset.
are unused by in-kernel tracers, LTTng and SystemTAP. Remove those too.
--- include/linux/tracepoint.h | 18 ---- kernel/tracepoint.c | 222 +-------------------------------------------- 2 files changed, 5 insertions(+), 235 deletions(-)
include/linux/tracepoint.h +0 -18
@@ -48,12 +48,6 @@ extern int tracepoint_probe_register(const char *name, void *probe, void *data);extern int tracepoint_probe_unregister (const char *name,void *probe,void *data); -extern int tracepoint_probe_register_noupdate (const char *name,void *probe, -void *data); -extern int tracepoint_probe_unregister_noupdate (const char *name,void *probe, -void *data); -extern void tracepoint_probe_update_all (void ); - #ifdef CONFIG_MODULES struct tp_module { struct list_head list;
@@ -62,18 +56,6 @@ struct tp_module { };#endif /* CONFIG_MODULES */ -struct tracepoint_iter { -#ifdef CONFIG_MODULES -struct tp_module *module; -#endif /* CONFIG_MODULES */ -struct tracepoint *const *tracepoint; -}; - -extern void tracepoint_iter_start (struct tracepoint_iter *iter); -extern void tracepoint_iter_next (struct tracepoint_iter *iter); -extern void tracepoint_iter_stop (struct tracepoint_iter *iter); -extern void tracepoint_iter_reset (struct tracepoint_iter *iter); -/* * tracepoint_synchronize_unregister must be called between the last tracepoint * probe unregistration and the end of module exit to make sure there is no
kernel/tracepoint.c +5 -217
256 lines not on this page · raw message
Signature · 1 line
1.8.5.3
Steven Rostedt
maintainerPATCH 2/2 tracing: Add BUG_ON when stack end location is over written
In reply to Steven RostedtFrom: Aaron Tomlin <[email protected]>
It is difficult to detect a stack overrun when it actually occurs.
We have observed that this type of corruption is often silent and can go unnoticed. Once the corrupted region is examined, the outcome is undefined and often results in sporadic system crashes.
When the stack tracing feature is enabled, let's check for this condition and take appropriate action.
Note: init_task doesn't get its stack end location set to STACK_END_MAGIC.
--- kernel/trace/trace_stack.c | 3 +++ 1 file changed, 3 insertions(+)
kernel/trace/trace_stack.c +3 -0
@@ -13,6 +13,7 @@#include <linux/sysctl.h> #include <linux/init.h> #include <linux/fs.h> +#include <linux/magic.h> #include <asm/setup.h>
@@ -144,6 +145,8 @@ check_stack(unsigned long ip, unsigned long *stack) i++; } +BUG_ON (current != &init_task && + *(end_of_stack (current)) !=STACK_END_MAGIC ); out:arch_spin_unlock (&max_stack_lock);local_irq_restore (flags);
Signature · 1 line
1.8.5.3