Re: [PATCH v6 3/8] kmsg: introduce additional kmsg devices support

From
Petr Mladek <pmladek@suse.com>
Date
2016-02-26 14:05:19
Also in
lkml
Reply to
Kazimierz Krosman, 2016-02-24
On Wed 2016-02-24 12:53:16, Kazimierz Krosman wrote:
quoted hunk ↗ jump to hunk
From: Marcin Niesluchowski <redacted>

kmsg device provides operations on cyclic logging buffer used mainly
by kernel but also in userspace by privileged processes.

Additional kmsg devices keep the same log format but may be added
dynamically with custom size.

Signed-off-by: Marcin Niesluchowski <redacted>
Signed-off-by: Paul Osmialowski <redacted>
[Rebased kmsg patch v5 on Linux 4.5-rc5]
Signed-off-by: Kazimierz Krosman <redacted>
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 3653a8e..b99403b 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -584,9 +595,11 @@ ssize_t msg_print_ext_body(char *buf, size_t size,
 void log_buf_kexec_setup(void)
 {
 	VMCOREINFO_SYMBOL(log_buf);
-	VMCOREINFO_SYMBOL(log_buf_len);
-	VMCOREINFO_SYMBOL(log_first_idx);
-	VMCOREINFO_SYMBOL(log_next_idx);
+	VMCOREINFO_STRUCT_SIZE(log_buffer);
+	VMCOREINFO_OFFSET(log_buffer, buf);
+	VMCOREINFO_OFFSET(log_buffer, len);
+	VMCOREINFO_OFFSET(log_buffer, first_idx);
+	VMCOREINFO_OFFSET(log_buffer, next_idx);
This breaks makedumpfile, crash and possibly other tools
that use this information to access the log buffer.

Best Regards,
Petr
Thread (14 messages) 14 messages, 3 authors, last reply 2016-02-27
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help