Skip to contentSkip to conversation

Fix kprobes on ia64

PATCH In review Matthew Wilcox 3 participants 3 messages Jan 14, 2008 kprobes

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix kprobes on ia64

If CONFIG_KPROBES is set, we get the error during build:

kernel/kprobes.c:1057: error: __ksymtab_jprobe_return causes a section type conflict

This is because ia64 defines a static inline jprobe_return which kprobes attempts to EXPORT_SYMBOL.

kernel/kprobes.c +2 -2
index e3a5d81..ecc25b3 100644
@@ -1053,11 +1053,11 @@ EXPORT_SYMBOL_GPL(register_kprobe);
 EXPORT_SYMBOL_GPL(unregister_kprobe);
 EXPORT_SYMBOL_GPL(register_jprobe);
 EXPORT_SYMBOL_GPL(unregister_jprobe);
+
 #ifdef CONFIG_KPROBES
+#ifndef __ia64__ /* It's static inline */
 EXPORT_SYMBOL_GPL(jprobe_return);
 #endif
-
-#ifdef CONFIG_KPROBES
 EXPORT_SYMBOL_GPL(register_kretprobe);
 EXPORT_SYMBOL_GPL(unregister_kretprobe);
 #endif
Signature · 4 lines
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
#1 lore raw
Quoted 8 lines · Matthew Wilcox

If CONFIG_KPROBES is set, we get the error during build:

kernel/kprobes.c:1057: error: __ksymtab_jprobe_return causes a section type conflict

This is because ia64 defines a static inline jprobe_return which kprobes attempts to EXPORT_SYMBOL.

The better fix is to let jprobe_return be a normal function that can be exported. Then we avoid this arch specific ifdef for the cost of nothing.

Sam

#2 lore raw
In reply to Matthew Wilcox
Quoted 7 lines · Matthew Wilcox

If CONFIG_KPROBES is set, we get the error during build:

kernel/kprobes.c:1057: error: __ksymtab_jprobe_return causes a section type conflict

This is because ia64 defines a static inline jprobe_return which kprobes attempts to EXPORT_SYMBOL.

Given that jprobe_return is defined in the arch-specific kprobes.c file it would be better to export it there instead of in kernel/kprobe.c, or in case of ia64 not export it at all.