* [PATCH] Revert "printk: export symbols for debug modules"
@ 2023-09-05 8:19 Christoph Hellwig
2023-09-05 8:22 ` Greg KH
2023-09-05 9:54 ` Petr Mladek
0 siblings, 2 replies; 5+ messages in thread
From: Christoph Hellwig @ 2023-09-05 8:19 UTC (permalink / raw)
To: pmladek, rostedt, john.ogness, senozhatsky, gregkh; +Cc: linux-kernel
This reverts commit 3e00123a13d824d63072b1824c9da59cd78356d9.
No, we never export random symbols for out of tree modules.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
kernel/printk/printk.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 96fc38cb2e8415..7e0b4dd02398db 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -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
--
2.39.2
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] Revert "printk: export symbols for debug modules"
2023-09-05 8:19 [PATCH] Revert "printk: export symbols for debug modules" Christoph Hellwig
@ 2023-09-05 8:22 ` Greg KH
2023-09-05 9:54 ` Petr Mladek
1 sibling, 0 replies; 5+ messages in thread
From: Greg KH @ 2023-09-05 8:22 UTC (permalink / raw)
To: Christoph Hellwig
Cc: pmladek, rostedt, john.ogness, senozhatsky, linux-kernel
On Tue, Sep 05, 2023 at 10:19:02AM +0200, Christoph Hellwig wrote:
> This reverts commit 3e00123a13d824d63072b1824c9da59cd78356d9.
>
> No, we never export random symbols for out of tree modules.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> kernel/printk/printk.c | 2 --
> 1 file changed, 2 deletions(-)
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Revert "printk: export symbols for debug modules"
2023-09-05 8:19 [PATCH] Revert "printk: export symbols for debug modules" Christoph Hellwig
2023-09-05 8:22 ` Greg KH
@ 2023-09-05 9:54 ` Petr Mladek
2023-09-05 13:20 ` Christoph Hellwig
1 sibling, 1 reply; 5+ messages in thread
From: Petr Mladek @ 2023-09-05 9:54 UTC (permalink / raw)
To: Christoph Hellwig
Cc: rostedt, john.ogness, senozhatsky, gregkh, linux-kernel,
Yunlong Xing, enlinmu, yunlong.xing23
Added people from the original thread into Cc.
On Tue 2023-09-05 10:19:02, Christoph Hellwig wrote:
> 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.
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Petr Mladek <pmladek@suse.com>
Best Regards,
Petr
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Revert "printk: export symbols for debug modules"
2023-09-05 9:54 ` Petr Mladek
@ 2023-09-05 13:20 ` Christoph Hellwig
2023-09-08 7:22 ` Petr Mladek
0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2023-09-05 13:20 UTC (permalink / raw)
To: Petr Mladek
Cc: Christoph Hellwig, rostedt, john.ogness, senozhatsky, gregkh,
linux-kernel, Yunlong Xing, enlinmu, yunlong.xing23
On Tue, Sep 05, 2023 at 11:54:37AM +0200, Petr Mladek wrote:
> 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.
I think raw address to the printk buffer is a bad idea even for an
in-tree module.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Revert "printk: export symbols for debug modules"
2023-09-05 13:20 ` Christoph Hellwig
@ 2023-09-08 7:22 ` Petr Mladek
0 siblings, 0 replies; 5+ messages in thread
From: Petr Mladek @ 2023-09-08 7:22 UTC (permalink / raw)
To: Christoph Hellwig
Cc: rostedt, john.ogness, senozhatsky, gregkh, linux-kernel,
Yunlong Xing, enlinmu, yunlong.xing23
On Tue 2023-09-05 15:20:22, Christoph Hellwig wrote:
> On Tue, Sep 05, 2023 at 11:54:37AM +0200, Petr Mladek wrote:
> > 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.
>
> 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-09-08 7:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-05 8:19 [PATCH] Revert "printk: export symbols for debug modules" Christoph Hellwig
2023-09-05 8:22 ` Greg KH
2023-09-05 9:54 ` Petr Mladek
2023-09-05 13:20 ` Christoph Hellwig
2023-09-08 7:22 ` Petr Mladek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox