diff options
author | Kay Sievers <kay@vrfy.org> | 2012-04-05 21:28:21 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2012-04-05 21:28:21 +0200 |
commit | 86c1cbd04cf88fae08303c55baf364db9698d8bf (patch) | |
tree | 26c8647beff225e716fac2c4f214d7ea5d52dde1 | |
parent | a30f498d891f8917e9f6dd7082bec0cb90ac7944 (diff) | |
download | patches-86c1cbd04cf88fae08303c55baf364db9698d8bf.tar.gz |
printk: kill binary property support
-rw-r--r-- | printk.patch | 281 |
1 files changed, 103 insertions, 178 deletions
diff --git a/printk.patch b/printk.patch index 1666319..0938cea 100644 --- a/printk.patch +++ b/printk.patch @@ -82,46 +82,29 @@ Various features of this patch: sequence numbers allow the log consumer to calculate the amount of lost messages. - $ cat /dev/kmsg - PRIORITY=5 - SEQNUM=0 - TIMESTAMP=0 - MESSAGE=Linux version 3.4.0-rc1+ (kay@mop) (gcc version 4.7.0 20120315 ... - - ... - - PRIORITY=7 - SEQNUM=268 - TIMESTAMP=399682 - MESSAGE=pci_root PNP0A03:00: host bridge window [io 0x0000-0x0cf7] (ignored) - SUBSYSTEM=acpi - DEVICE=+acpi:PNP0A03:00 - - ... - - SYSLOG_FACILITY=3 - PRIORITY=6 - SEQNUM=863 - TIMESTAMP=2479024 - MESSAGE=udevd[71]: starting version 182 - - ... - - PRIORITY=6 - SEQNUM=1012 - TIMESTAMP=4069447 - MESSAGE=usb 2-1.4: MAC-Address: 02:80:37:e6:12:00 - SUBSYSTEM=usb - DEVICE=c189:130 + [root@mop ~]# cat /dev/kmsg + 5,0,0;Linux version 3.4.0-rc1+ (kay@mop) (gcc version 4.7.0 20120315 ... + 6,159,423091;ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff]) + 7,160,424069;pci_root PNP0A03:00: host bridge window [io 0x0000-0x0cf7] (ignored) + SUBSYSTEM=acpi + DEVICE=+acpi:PNP0A03:00 + 6,339,5140900;NET: Registered protocol family 10 + 30,340,5690716;udevd[80]: starting version 181 + 6,341,6081421;FDC 0 is a S82078B + 6,345,6154686;microcode: CPU0 sig=0x623, pf=0x0, revision=0x0 + 7,346,6156968;sr 1:0:0:0: Attached scsi CD-ROM sr0 + SUBSYSTEM=scsi + DEVICE=+scsi:1:0:0:0 + 6,347,6289375;microcode: CPU1 sig=0x623, pf=0x0, revision=0x0 Tested-by: William Douglas <william.douglas@intel.com> Signed-off-by: Kay Sievers <kay@vrfy.org> --- - drivers/base/core.c | 49 + + drivers/base/core.c | 52 + drivers/char/mem.c | 40 - include/linux/printk.h | 13 - kernel/printk.c | 1394 +++++++++++++++++++++++++++++++++---------------- - 4 files changed, 1027 insertions(+), 469 deletions(-) + kernel/printk.c | 1333 +++++++++++++++++++++++++++++++++---------------- + 4 files changed, 969 insertions(+), 469 deletions(-) --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -133,7 +116,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> #include "base.h" #include "power/power.h" -@@ -1843,15 +1844,57 @@ void device_shutdown(void) +@@ -1843,15 +1844,60 @@ void device_shutdown(void) */ #ifdef CONFIG_PRINTK @@ -158,7 +141,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> + subsys = "(NULL subsystem)"; + + dictlen += snprintf(dict + dictlen, sizeof(dict) - dictlen, -+ "SUBSYSTEM=%s\n", subsys); ++ "SUBSYSTEM=%s", subsys); + + /* + * Add device identifier DEVICE=: @@ -174,17 +157,20 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> + c = 'b'; + else + c = 'c'; ++ dictlen++; + dictlen += snprintf(dict + dictlen, sizeof(dict) - dictlen, -+ "DEVICE=%c%u:%u\n", ++ "DEVICE=%c%u:%u", + c, MAJOR(dev->devt), MINOR(dev->devt)); + } else if (strcmp(subsys, "net") == 0) { + struct net_device *net = to_net_dev(dev); + ++ dictlen++; + dictlen += snprintf(dict + dictlen, sizeof(dict) - dictlen, -+ "DEVICE=n%u\n", net->ifindex); ++ "DEVICE=n%u", net->ifindex); + } else { ++ dictlen++; + dictlen += snprintf(dict + dictlen, sizeof(dict) - dictlen, -+ "DEVICE=+%s:%s\n", subsys, dev_name(dev)); ++ "DEVICE=+%s:%s", subsys, dev_name(dev)); + } + + return printk_emit(0, level[1] - '0', @@ -325,7 +311,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> * If exclusive_console is non-NULL then only this console is to be printed to. */ static struct console *exclusive_console; -@@ -146,12 +127,549 @@ EXPORT_SYMBOL(console_set_on_cmdline); +@@ -146,12 +127,488 @@ EXPORT_SYMBOL(console_set_on_cmdline); static int console_may_schedule; #ifdef CONFIG_PRINTK @@ -349,12 +335,11 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> + * message can be reliably determined that way. + * + * The human readable log message directly follows the message header. The -+ * length of the message text is stored in the header, the message is _not_ -+ * terminated by a '\n' or '\0' character. ++ * length of the message text is stored in the header, the stored message ++ * is not terminated. + * -+ * Optionally, a message can carry a dictionary of properties (key/value pairs). -+ * The content of the dictionary is opaque to the printk code, it is stored -+ * only to provide userspace with a machine-readable message context. ++ * Optionally, a message can carry a dictionary of properties (key/value pairs), ++ * to provide userspace with a machine-readable message context. + * + * Examples for well-defined, commonly used property names are: + * DEVICE=b12:8 device identifier @@ -366,61 +351,35 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> + * + * Valid characters in property names are [a-zA-Z0-9.-_]. The plain text value + * follows directly after a '=' character. Every property is terminated by -+ * a '\n' character. -+ * -+ * Any value that can possibly carry non-printable characters must be -+ * explicitly encoded as a binary value. -+ * -+ * A binary value is encoded by not using a '=' character as a delimiter, -+ * but a '\n' character followed directly by a non-aligned inlined little-endian -+ * uint64_t, which specifies the number of binary bytes to read as value. -+ * Example for a dictionary containing a 4 byte long binary value: -+ * "DEVICE=b12:8\nFIRMWARE_DUMP\n\x04\x00\x00\x00\x00\x00\x00\x00\x11\x12\x13\x14\nDRIVER=ahci\n" -+ * -+ * Userspace must be able to trust the generated key/value output stream to be -+ * valid regarding the key and newline sequence. Values containing newlines -+ * could be interpreted as keys, and would be a potential security risk. Any -+ * properties copied verbatim from hardware, or other untrusted sources, into -+ * the dictionary MUST be encoded as binary to avoid such problems. ++ * a '\0' character. The last property is not terminated. + * + * Example of a message structure: + * 0000 ff 8f 00 00 00 00 00 00 monotonic time in nsec -+ * 0008 38 00 record is 56 bytes long ++ * 0008 34 00 record is 52 bytes long + * 000a 0b 00 text is 11 bytes long + * 000c 1f 00 dictionary is 23 bytes long -+ * 000e 03 LOG_ERR (level) -+ * 000f 00 LOG_KERN (facility) ++ * 000e 03 00 LOG_KERN (facility) LOG_ERR (level) + * 0010 69 74 27 73 20 61 20 6c "it's a l" + * 69 6e 65 "ine" + * 001b 44 45 56 49 43 "DEVIC" -+ * 45 3d 62 38 3a 32 0a 44 "E=b8:2\nD" ++ * 45 3d 62 38 3a 32 00 44 "E=b8:2\0D" + * 52 49 56 45 52 3d 62 75 "RIVER=bu" -+ * 67 0a "g\n" -+ * 0032 00 00 00 00 00 00 padding to next message header ++ * 67 "g" ++ * 0032 00 00 00 padding to next message header + * + * The 'struct log' buffer header must never be directly exported to + * userspace, it is a kernel-private implementation detail that might + * need to be changed in the future, when the requirements change. + * -+ * The classic syslog() syscall format export must only export the human -+ * readable text message, with the syslog level and facility prefixed -+ * as <>. Adding unconverted binary or structured data would break the -+ * syslog() export format. ++ * /dev/kmsg exports the structured data in the following line format: ++ * "level,sequnum,timestamp;<message text>\n" + * -+ * Interfaces that export the structured dictionary data, should follow the -+ * binary record format definition of the dictionary and use the following -+ * standard property names: -+ * SYSLOG_FACILITY= syslog facility number -+ * PRIORITY= message priority number -+ * SEQNUM= log record sequence number -+ * TIMESTAMP= monotonic time in microseconds -+ * MESSAGE= human readable message ++ * The optional key/value pairs are attached as continuation lines starting ++ * with a space character and terminated by a newline. All possible ++ * non-prinatable characters are escaped in the "\xff" notation. + * -+ * The optional dictionary properties attached to the record should be copied -+ * in the same output format directly after the standard message properties. -+ * -+ * In a flat text stream of records, every record should be terminated -+ * by "\n\n", which separates the records from each other. ++ * Users of the export format should ignore possible additional values ++ * separated by ',', and find the message after the ';' character. + */ + +struct log { @@ -428,8 +387,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> + u16 len; /* length of entire record */ + u16 text_len; /* length of text buffer */ + u16 dict_len; /* length of dictionary buffer */ -+ u8 level; /* syslog level (LOG_WARN, LOG_ERR, ...) */ -+ u8 facility; /* syslog facility (LOG_KERN == 0) */ ++ u16 level; /* syslog level + facility */ +}; +/* @@ -563,8 +521,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> + msg->text_len = text_len; + memcpy(log_dict(msg), dict, dict_len); + msg->dict_len = dict_len; -+ msg->level = level; -+ msg->facility = facility; ++ msg->level = (facility << 3) | (level & 7); + msg->ts_nsec = local_clock(); + memset(log_dict(msg) + dict_len, 0, pad_len); + msg->len = sizeof(struct log) + text_len + dict_len + pad_len; @@ -641,7 +598,6 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> +{ + struct devkmsg_user *user = file->private_data; + struct log *msg; -+ bool binary = false; + size_t i; + size_t len; + ssize_t ret; @@ -676,78 +632,47 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> + } + + msg = log_from_idx(user->idx); -+ len = 0; ++ len = sprintf(user->buf, "%u,%llu,%llu;", ++ msg->level, user->seq, msg->ts_nsec / 1000); + -+ if (msg->facility) { -+ memcpy(user->buf + len, "SYSLOG_FACILITY=", 16); -+ len += 16; -+ len += sprintf(user->buf + len, "%u", msg->facility); -+ user->buf[len++] = '\n'; -+ } ++ /* escape non-printable characters */ ++ for (i = 0; i < msg->text_len; i++) { ++ char c = log_text(msg)[i]; + -+ memcpy(user->buf + len, "PRIORITY=", 9); -+ len += 9; -+ user->buf[len++] = '0' + msg->level; ++ if (c < ' ' || c >= 128) ++ len += sprintf(user->buf + len, "\\x%02x", c); ++ else ++ user->buf[len++] = c; ++ } + user->buf[len++] = '\n'; + -+ memcpy(user->buf + len, "SEQNUM=", 7); -+ len += 7; -+ len += sprintf(user->buf + len, "%llu", user->seq); -+ user->buf[len++] = '\n'; ++ if (msg->dict_len) { ++ bool line = true; + -+ if (msg->ts_nsec) { -+ memcpy(user->buf + len, "TIMESTAMP=", 10); -+ len += 10; -+ len += sprintf(user->buf + len, "%llu", msg->ts_nsec / 1000); -+ user->buf[len++] = '\n'; -+ } ++ for (i = 0; i < msg->dict_len; i++) { ++ char c = log_dict(msg)[i]; + -+ memcpy(user->buf + len, "MESSAGE", 7); -+ len += 7; -+ if (len + msg->text_len + msg->dict_len + 2 > sizeof(user->buf)) { -+ ret = -EINVAL; -+ goto out; -+ } ++ if (line) { ++ user->buf[len++] = ' '; ++ line = false; ++ } + -+ /* any non-printable characters switch to binary property output */ -+ for (i = 0; i < msg->text_len; i++) { -+ char c = log_text(msg)[i]; ++ if (c == '\0') { ++ user->buf[len++] = '\n'; ++ line = true; ++ continue; ++ } + -+ if (c < ' ' || c >= 128) { -+ binary = true; -+ break; -+ } -+ } -+ if (binary) { -+ u64 len_le64; ++ if (c < ' ' || c >= 128) { ++ len += sprintf(user->buf + len, "\\x%02x", c); ++ continue; ++ } + -+ /* add uint64_t little-endian length of binary data */ ++ user->buf[len++] = c; ++ } + user->buf[len++] = '\n'; -+ len_le64 = cpu_to_le64(msg->text_len+1); -+ memcpy(user->buf + len, &len_le64, sizeof(len_le64)); -+ len += sizeof(len_le64); -+ } else { -+ /* plain text value */ -+ user->buf[len++] = '='; + } + -+ memcpy(user->buf + len, log_text(msg), msg->text_len); -+ len += msg->text_len; -+ user->buf[len++] = '\n'; -+ -+ /* -+ * Copy dictionary; all keys, including the last one, are expected to -+ * be terminated by '\n'. -+ */ -+ memcpy(user->buf + len, log_dict(msg), msg->dict_len); -+ len += msg->dict_len; -+ -+ /* -+ * Terminate the record by a second '\n' to make the /dev/kmgs' -+ * output parsable as a text stream and human readable. -+ */ -+ user->buf[len++] = '\n'; -+ + user->idx = log_next(user->idx); + user->seq++; + raw_spin_unlock(&logbuf_lock); @@ -878,7 +803,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> #ifdef CONFIG_KEXEC /* -@@ -165,9 +683,9 @@ static int saved_console_loglevel = -1; +@@ -165,9 +622,9 @@ static int saved_console_loglevel = -1; void log_buf_kexec_setup(void) { VMCOREINFO_SYMBOL(log_buf); @@ -890,7 +815,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> } #endif -@@ -191,7 +709,6 @@ early_param("log_buf_len", log_buf_len_s +@@ -191,7 +648,6 @@ early_param("log_buf_len", log_buf_len_s void __init setup_log_buf(int early) { unsigned long flags; @@ -898,7 +823,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> char *new_log_buf; int free; -@@ -219,20 +736,8 @@ void __init setup_log_buf(int early) +@@ -219,20 +675,8 @@ void __init setup_log_buf(int early) log_buf_len = new_log_buf_len; log_buf = new_log_buf; new_log_buf_len = 0; @@ -921,7 +846,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> raw_spin_unlock_irqrestore(&logbuf_lock, flags); pr_info("log_buf_len: %d\n", log_buf_len); -@@ -332,11 +837,165 @@ static int check_syslog_permissions(int +@@ -332,11 +776,165 @@ static int check_syslog_permissions(int return 0; } @@ -942,9 +867,9 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> + /* calculate length only */ + len = 3; + -+ if (msg->facility) ++ if (msg->level > 9) + len++; -+ if (msg->facility > 12) ++ if (msg->level > 99) + len++; + + if (printk_time) @@ -955,7 +880,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> + return len; + } + -+ len = sprintf(text, "<%u>", (msg->facility << 3) | msg->level); ++ len = sprintf(text, "<%u>", msg->level); + + if (printk_time) { + unsigned long long t = msg->ts_nsec; @@ -1090,7 +1015,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> int error; error = check_syslog_permissions(type, from_file); -@@ -364,28 +1023,14 @@ int do_syslog(int type, char __user *buf +@@ -364,28 +962,14 @@ int do_syslog(int type, char __user *buf goto out; } error = wait_event_interruptible(log_wait, @@ -1122,7 +1047,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> /* FALL THRU */ /* Read last kernel messages */ case SYSLOG_ACTION_READ_ALL: -@@ -399,52 +1044,11 @@ int do_syslog(int type, char __user *buf +@@ -399,52 +983,11 @@ int do_syslog(int type, char __user *buf error = -EFAULT; goto out; } @@ -1177,7 +1102,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> /* Disable logging to console */ case SYSLOG_ACTION_CONSOLE_OFF: if (saved_console_loglevel == -1) -@@ -472,7 +1076,33 @@ int do_syslog(int type, char __user *buf +@@ -472,7 +1015,33 @@ int do_syslog(int type, char __user *buf break; /* Number of chars in the log buffer */ case SYSLOG_ACTION_SIZE_UNREAD: @@ -1212,7 +1137,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> break; /* Size of the log buffer */ case SYSLOG_ACTION_SIZE_BUFFER: -@@ -501,29 +1131,11 @@ void kdb_syslog_data(char *syslog_data[4 +@@ -501,29 +1070,11 @@ void kdb_syslog_data(char *syslog_data[4 { syslog_data[0] = log_buf; syslog_data[1] = log_buf + log_buf_len; @@ -1244,7 +1169,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> static bool __read_mostly ignore_loglevel; static int __init ignore_loglevel_setup(char *str) -@@ -540,142 +1152,33 @@ MODULE_PARM_DESC(ignore_loglevel, "ignor +@@ -540,142 +1091,33 @@ MODULE_PARM_DESC(ignore_loglevel, "ignor "print all kernel messages to the console."); /* @@ -1406,7 +1331,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> } /* -@@ -700,16 +1203,6 @@ static void zap_locks(void) +@@ -700,16 +1142,6 @@ static void zap_locks(void) sema_init(&console_sem, 1); } @@ -1423,7 +1348,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> /* Check if we have any console registered that can be called early in boot. */ static int have_callable_console(void) { -@@ -722,51 +1215,6 @@ static int have_callable_console(void) +@@ -722,51 +1154,6 @@ static int have_callable_console(void) return 0; } @@ -1475,7 +1400,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> /* * Can we actually use the console at this time on this cpu? * -@@ -810,17 +1258,12 @@ static int console_trylock_for_printk(un +@@ -810,17 +1197,12 @@ static int console_trylock_for_printk(un retval = 0; } } @@ -1494,7 +1419,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> int printk_delay_msec __read_mostly; -@@ -836,15 +1279,22 @@ static inline void printk_delay(void) +@@ -836,15 +1218,22 @@ static inline void printk_delay(void) } } @@ -1524,7 +1449,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> boot_delay_msec(); printk_delay(); -@@ -856,7 +1306,7 @@ asmlinkage int vprintk(const char *fmt, +@@ -856,7 +1245,7 @@ asmlinkage int vprintk(const char *fmt, /* * Ouch, printk recursed into itself! */ @@ -1533,7 +1458,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> /* * If a crash is occurring during printk() on this CPU, * then try to get the crash message out but make sure -@@ -873,97 +1323,92 @@ asmlinkage int vprintk(const char *fmt, +@@ -873,97 +1262,92 @@ asmlinkage int vprintk(const char *fmt, lockdep_off(); raw_spin_lock(&logbuf_lock); @@ -1702,7 +1627,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> */ if (console_trylock_for_printk(this_cpu)) console_unlock(); -@@ -974,12 +1419,73 @@ out_restore_irqs: +@@ -974,12 +1358,73 @@ out_restore_irqs: return printed_len; } @@ -1778,7 +1703,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> { } -@@ -1217,7 +1723,7 @@ int is_console_locked(void) +@@ -1217,7 +1662,7 @@ int is_console_locked(void) } /* @@ -1787,7 +1712,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> */ #define PRINTK_BUF_SIZE 512 -@@ -1253,6 +1759,10 @@ void wake_up_klogd(void) +@@ -1253,6 +1698,10 @@ void wake_up_klogd(void) this_cpu_or(printk_pending, PRINTK_PENDING_WAKEUP); } @@ -1798,7 +1723,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> /** * console_unlock - unlock the console system * -@@ -1263,15 +1773,16 @@ void wake_up_klogd(void) +@@ -1263,15 +1712,16 @@ void wake_up_klogd(void) * by printk(). If this is the case, console_unlock(); emits * the output prior to releasing the lock. * @@ -1818,7 +1743,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> if (console_suspended) { up(&console_sem); -@@ -1281,17 +1792,41 @@ void console_unlock(void) +@@ -1281,17 +1731,41 @@ void console_unlock(void) console_may_schedule = 0; again: @@ -1851,7 +1776,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> + break; + + msg = log_from_idx(console_idx); -+ level = msg->level; ++ level = msg->level & 7; + len = msg->text_len; + if (len+1 >= sizeof(text)) + len = sizeof(text)-1; @@ -1868,7 +1793,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> start_critical_timings(); local_irq_restore(flags); } -@@ -1312,8 +1847,7 @@ again: +@@ -1312,8 +1786,7 @@ again: * flush, no worries. */ raw_spin_lock(&logbuf_lock); @@ -1878,7 +1803,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> raw_spin_unlock_irqrestore(&logbuf_lock, flags); if (retry && console_trylock()) -@@ -1549,7 +2083,8 @@ void register_console(struct console *ne +@@ -1549,7 +2022,8 @@ void register_console(struct console *ne * for us. */ raw_spin_lock_irqsave(&logbuf_lock, flags); @@ -1888,7 +1813,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> raw_spin_unlock_irqrestore(&logbuf_lock, flags); /* * We're about to replay the log buffer. Only do this to the -@@ -1758,6 +2293,9 @@ int kmsg_dump_unregister(struct kmsg_dum +@@ -1758,6 +2232,9 @@ int kmsg_dump_unregister(struct kmsg_dum } EXPORT_SYMBOL_GPL(kmsg_dump_unregister); @@ -1898,7 +1823,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> /** * kmsg_dump - dump kernel log to kernel message dumpers. * @reason: the reason (oops, panic etc) for dumping -@@ -1767,8 +2305,7 @@ EXPORT_SYMBOL_GPL(kmsg_dump_unregister); +@@ -1767,8 +2244,7 @@ EXPORT_SYMBOL_GPL(kmsg_dump_unregister); */ void kmsg_dump(enum kmsg_dump_reason reason) { @@ -1908,7 +1833,7 @@ Signed-off-by: Kay Sievers <kay@vrfy.org> struct kmsg_dumper *dumper; const char *s1, *s2; unsigned long l1, l2; -@@ -1780,24 +2317,27 @@ void kmsg_dump(enum kmsg_dump_reason rea +@@ -1780,24 +2256,27 @@ void kmsg_dump(enum kmsg_dump_reason rea /* Theoretically, the log could move on after we do this, but there's not a lot we can do about that. The new messages will overwrite the start of what we dump. */ |