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

Reply via email to