Message ID | 20250217101706.2104498-8-eugen.hristev@linaro.org (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | pstore: directly mapped regions | expand |
On Mon, Feb 17, 2025 at 12:17:03PM +0200, Eugen Hristev wrote: > log_buf_addr_get() and log_buf_len_get() can be reused in another module, > export the symbols. Err, no way.
On (25/02/18 00:26), Christoph Hellwig wrote: > On Mon, Feb 17, 2025 at 12:17:03PM +0200, Eugen Hristev wrote: > > log_buf_addr_get() and log_buf_len_get() can be reused in another module, > > export the symbols. > > Err, no way. Yeah I think we've been there before [1] [1] https://lore.kernel.org/all/20230905081902.321778-1-hch@lst.de/
On 2/18/25 10:58, Sergey Senozhatsky wrote: > On (25/02/18 00:26), Christoph Hellwig wrote: >> On Mon, Feb 17, 2025 at 12:17:03PM +0200, Eugen Hristev wrote: >>> log_buf_addr_get() and log_buf_len_get() can be reused in another module, >>> export the symbols. >> >> Err, no way. > > Yeah I think we've been there before [1] > > [1] https://lore.kernel.org/all/20230905081902.321778-1-hch@lst.de/ Okay... in the line of the purpose of this patch series, I would like to be able to have the dmesg ready to be retrieved out of the kernel in case the kernel becomes unusable (due to various reasons as described in the cover letter). However to know exactly 'where' is the buffer stored I would need some way to point to it. Do you have any other suggestion on how to do this ? Using the kmsg_dump() API works only if the kernel/CPU can run code. Thanks for looking into the patches, Eugen
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 07668433644b..022947f9b61d 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -588,12 +588,14 @@ 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
log_buf_addr_get() and log_buf_len_get() can be reused in another module, export the symbols. Signed-off-by: Eugen Hristev <eugen.hristev@linaro.org> --- kernel/printk/printk.c | 2 ++ 1 file changed, 2 insertions(+)