lkml.org 
[lkml]   [2018]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/9] x86/dumpstack: Improve opcodes dumping in the Code: section
On Thu, Mar 15, 2018 at 04:44:43PM +0100, Borislav Petkov wrote:
> @@ -402,6 +396,10 @@ void show_regs(struct pt_regs *regs)
> */
> if (!user_mode(regs)) {
> show_trace_log_lvl(current, regs, NULL, KERN_DEFAULT);
> - show_opcodes((u8 *)regs->ip);
> +
> + if (regs->ip < PAGE_OFFSET)
> + pr_cont(" Bad RIP value.\n");
> + else
> + show_opcodes((u8 *)regs->ip);

[ Oops, sorry about three reviews for the same patch... ]

I don't see the printk preceding the pr_cont() here. Shouldn't it be
something like:

printk(KERN_DEFAULT "Code: Bad RIP value.\n")

?

--
Josh

\
 
 \ /
  Last update: 2018-03-15 19:23    [W:0.175 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site