Skip to contentSkip to conversation

Revert "printk: export symbols for debug modules"

PATCH In review Christoph Hellwig 3 participants 5 messages Sep 5, 2023 – Sep 8, 2023 Printk

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "printk: export symbols for debug modules"

This reverts commit 3e00123a13d824d63072b1824c9da59cd78356d9.

No, we never export random symbols for out of tree modules.

---
 kernel/printk/printk.c | 2 --
 1 file changed, 2 deletions(-)
kernel/printk/printk.c +0 -2
index 96fc38cb2e8415..7e0b4dd02398db 100644
@@ -538,14 +538,12 @@ char *log_buf_addr_get(void)
 {
 	return log_buf;
 }
-EXPORT_SYMBOL_GPL(log_buf_addr_get);
 
 /* Return log buffer size */
 u32 log_buf_len_get(void)
 {
 	return log_buf_len;
 }
-EXPORT_SYMBOL_GPL(log_buf_len_get);
 
 /*
  * Define how much of the log buffer we could take at maximum. The value
Signature · 1 line
2.39.2
maintainer Acked-by on v1 1/1
#1 lore raw

Added people from the original thread into Cc.

Quoted 3 lines · Christoph Hellwig

This reverts commit 3e00123a13d824d63072b1824c9da59cd78356d9.

No, we never export random symbols for out of tree modules.

Yeah, I did not have a good feeling about this patch.

I accepted it because there was an intention to upstream the module, see
https://lore.kernel.org/all/CAAfh-jM0B2Cn579B0CkCrW44pJGGvjs112K+oMuViib+jDKafg@mail.gmail.com/

I think that it was bad decision. We should not export symbols when there is no in-tree user.

Quoted 1 line

Best Regards,
Petr

maintainer
#3 lore raw
Quoted 7 lines · Christoph Hellwig
Quoted 6 lines · Petr Mladek

Yeah, I did not have a good feeling about this patch.

I accepted it because there was an intention to upstream the module, see
https://lore.kernel.org/all/CAAfh-jM0B2Cn579B0CkCrW44pJGGvjs112K+oMuViib+jDKafg@mail.gmail.com/

Quoted 5 lines
Quoted 2 lines

I think that it was bad decision. We should not export symbols when there is no in-tree user.

I think raw address to the printk buffer is a bad idea even for an in-tree module.

Yeah, I suggested to use the kmsg_dump() API in the original thread.

Sigh, I made the bad decision in a hurry before vacation. I know that it is a bad excuse but... Thanks for catching it.

Best Regards,
Petr

PS: I have just sent a pull request with the revert.