diff options
author | Chuck Ebbert <cebbert@redhat.com> | 2011-12-07 10:13:53 -0500 |
---|---|---|
committer | Chuck Ebbert <cebbert@redhat.com> | 2011-12-07 10:13:53 -0500 |
commit | ede16e85795fd0c469622fcc6eb0273aed3f798d (patch) | |
tree | 8164e8f75387c1e15417686d85962af69398cd36 /x86-code-dump-fix-truncation.patch | |
parent | 1cb5d1c666beeb119e49c90fd0ecfec294202464 (diff) | |
download | kernel-ede16e85795fd0c469622fcc6eb0273aed3f798d.tar.gz kernel-ede16e85795fd0c469622fcc6eb0273aed3f798d.tar.xz kernel-ede16e85795fd0c469622fcc6eb0273aed3f798d.zip |
Attempt to fix rhbz #736815 by printing spaces before the brackets
Diffstat (limited to 'x86-code-dump-fix-truncation.patch')
-rw-r--r-- | x86-code-dump-fix-truncation.patch | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/x86-code-dump-fix-truncation.patch b/x86-code-dump-fix-truncation.patch new file mode 100644 index 000000000..a20f181d7 --- /dev/null +++ b/x86-code-dump-fix-truncation.patch @@ -0,0 +1,70 @@ +After this patch, kernel code dumps have been sometimes truncated +in the system log: + + commit 9d90c8d9cde929cbc575098e825d7c29d9f45054 + "printk: do not mangle valid userspace syslog prefixes" + +The new code is interpreting the bracketed code byte as a loglevel +when it happens to have a legal value for that. Fix it by prefixing +the output with a space. + +Signed-off-by: Chuck Ebbert <cebbert@redhat.com> +--- +RHBZ #736815 + +--- a/arch/x86/kernel/dumpstack_32.c ++++ b/arch/x86/kernel/dumpstack_32.c +@@ -105,7 +105,7 @@ void show_registers(struct pt_regs *regs + printk(KERN_EMERG "Stack:\n"); + show_stack_log_lvl(NULL, regs, ®s->sp, 0, KERN_EMERG); + +- printk(KERN_EMERG "Code: "); ++ printk(KERN_EMERG "Code:"); + + ip = (u8 *)regs->ip - code_prologue; + if (ip < (u8 *)PAGE_OFFSET || probe_kernel_address(ip, c)) { +@@ -116,13 +116,13 @@ void show_registers(struct pt_regs *regs + for (i = 0; i < code_len; i++, ip++) { + if (ip < (u8 *)PAGE_OFFSET || + probe_kernel_address(ip, c)) { +- printk(" Bad EIP value."); ++ printk(" Bad EIP value."); + break; + } + if (ip == (u8 *)regs->ip) +- printk("<%02x> ", c); ++ printk(" <%02x>", c); + else +- printk("%02x ", c); ++ printk(" %02x", c); + } + } + printk("\n"); +--- a/arch/x86/kernel/dumpstack_64.c ++++ b/arch/x86/kernel/dumpstack_64.c +@@ -273,7 +273,7 @@ void show_registers(struct pt_regs *regs + show_stack_log_lvl(NULL, regs, (unsigned long *)sp, + 0, KERN_EMERG); + +- printk(KERN_EMERG "Code: "); ++ printk(KERN_EMERG "Code:"); + + ip = (u8 *)regs->ip - code_prologue; + if (ip < (u8 *)PAGE_OFFSET || probe_kernel_address(ip, c)) { +@@ -284,13 +284,13 @@ void show_registers(struct pt_regs *regs + for (i = 0; i < code_len; i++, ip++) { + if (ip < (u8 *)PAGE_OFFSET || + probe_kernel_address(ip, c)) { +- printk(" Bad RIP value."); ++ printk(" Bad RIP value."); + break; + } + if (ip == (u8 *)regs->ip) +- printk("<%02x> ", c); ++ printk(" <%02x>", c); + else +- printk("%02x ", c); ++ printk(" %02x", c); + } + } + printk("\n"); |