Skip to contentSkip to conversation

x86/head64: no need to define early_idt_ripmsg only if CONFIG_KALLSYMS=n

PATCH In review Alexander Kuleshov 2 participants 2 messages Feb 18, 2016 x86

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 x86/head64: no need to define early_idt_ripmsg only if CONFIG_KALLSYMS=n

We have definition of the early_idt_ripmsg which represents string header for the output of the kernel symbols during early exception. But the header with kernel symbols will be printed in a case if the CONFIG_KALLSYMS=y.

---
Changelog:

v2: commit message fixed and comment added.

 arch/x86/kernel/head_64.S | 2 ++
 1 file changed, 2 insertions(+)
arch/x86/kernel/head_64.S +2 -0
index ffdc0e8..f93997f 100644
@@ -433,8 +433,10 @@ early_recursion_flag:
 #ifdef CONFIG_EARLY_PRINTK
 early_idt_msg:
 	.asciz "PANIC: early exception %02lx rip %lx:%lx error %lx cr2 %lx\n"
+#ifdef CONFIG_KALLSYMS
 early_idt_ripmsg:
 	.asciz "RIP %s\n"
+#endif /* CONFIG_KALLSYMS */
 #endif /* CONFIG_EARLY_PRINTK */
 
 #define NEXT_PAGE(name) \
Signature · 1 line
2.7.0.364.g4943984
#1 lore raw
Quoted 3 lines · Alexander Kuleshov

We have definition of the early_idt_ripmsg which represents string header for the output of the kernel symbols during early exception. But the header with kernel symbols will be printed in a case if the CONFIG_KALLSYMS=y.

And this is a problem because... ?

Also, try to search how many distros and configs enable KALLSYMS. That might clear some uncertainties when deciding to add one more ifdef to an already hard to read code.

Signature · 5 lines
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
--