Export irq tracepoints for use by kernel modules
PATCH 1/1 Export irq tracepoints for use by kernel modules
After commit de7b2973903c6cc50b31ee5682a69b2219b9919d ("tracepoint:
Use struct pointer instead of name hash for reg/unreg tracepoints"), any tracepoints used in a kernel module must be exported.
--- kernel/softirq.c | 6 ++++++ 1 file changed, 6 insertions(+)
kernel/softirq.c +6 -0
@@ -30,6 +30,12 @@#define CREATE_TRACE_POINTS #include <trace/events/irq.h> +EXPORT_TRACEPOINT_SYMBOL_GPL (irq_handler_entry); +EXPORT_TRACEPOINT_SYMBOL_GPL (irq_handler_exit); +EXPORT_TRACEPOINT_SYMBOL_GPL (softirq_entry); +EXPORT_TRACEPOINT_SYMBOL_GPL (softirq_exit); +EXPORT_TRACEPOINT_SYMBOL_GPL (softirq_raise); +/* - No shared variables, all the data are CPU local. - If a softirq needs serialization, let it serialize itself
Signature · 1 line
1.8.3.2
Quoted 3 lines · Drew Richardson
After commit
de7b2973903c6cc50b31ee5682a69b2219b9919d("tracepoint:
Use struct pointer instead of name hash for reg/unreg tracepoints"), any tracepoints used in a kernel module must be exported.
How does this matter given that there aren't any modular users?
Quoted 6 lines · Christoph Hellwig
Quoted 3 lines · Drew Richardson
After commit
de7b2973903c6cc50b31ee5682a69b2219b9919d("tracepoint:
Use struct pointer instead of name hash for reg/unreg tracepoints"), any tracepoints used in a kernel module must be exported.How does this matter given that there aren't any modular users?
Gator (http://git.linaro.org/arm/ds5/gator.git), an out of tree kernel module, uses irq_handler_exit and softirq_exit. I thought it would be helpful to export the other tracepoints from trace/events/irq.h in case other users encountered a similar issue.
Drew
Quoted 4 lines · Drew Richardson
Gator (http://git.linaro.org/arm/ds5/gator.git), an out of tree kernel module, uses
irq_handler_exitandsoftirq_exit. I thought it would be helpful to export the other tracepoints fromtrace/events/irq.hin case other users encountered a similar issue.
None of them should be exported unless we have in-tree modular users. And I don't think adding modular users for either of them is a good idea to start with.
Quoted 6 lines · Christoph Hellwig
Quoted 3 lines · Drew Richardson
After commit
de7b2973903c6cc50b31ee5682a69b2219b9919d("tracepoint:
Use struct pointer instead of name hash for reg/unreg tracepoints"), any tracepoints used in a kernel module must be exported.How does this matter given that there aren't any modular users?
We had a bug report about this breaking systemtap type usage[1]. In there, Matthieu suggested that the new for_each_kernel_tracepoint interface be used.
Drew, it would have been proper to CC the author of the change you're referencing on all of your patches to export these symbols.
josh
Quoted 12 lines · Josh Boyer
Quoted 6 lines · Christoph Hellwig
Quoted 3 lines · Drew Richardson
After commit
de7b2973903c6cc50b31ee5682a69b2219b9919d("tracepoint:
Use struct pointer instead of name hash for reg/unreg tracepoints"), any tracepoints used in a kernel module must be exported.How does this matter given that there aren't any modular users?
We had a bug report about this breaking systemtap type usage[1]. In there, Matthieu suggested that the new
for_each_kernel_tracepointinterface be used.
Quoted 7 lines
Drew, it would have been proper to CC the author of the change you're referencing on all of your patches to export these symbols.
josh
Thanks Josh for pointing out that I should CC Mathieu and register_tracepoint_module_notifier, which will work for me.
Drew