lkml.org 
[lkml]   [2016]   [Feb]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 00/10] x86: Various SYSENTER/SYSEXIT/#DB fixes and cleanups
On Sun, Feb 28, 2016 at 9:28 PM, Andy Lutomirski <luto@kernel.org> wrote:
>
> While I was doing all this, I also noticed that DR6 and BTF handling
> in do_debug was a bit off. Two of the patches in here try to fix it
> up.

It's worth noting that do_debug is really quite screwed up with or
without this patchset applied. For example:

/*
* Let others (NMI) know that the debug stack is in use
* as we may switch to the interrupt stack.
*/
debug_stack_usage_inc();

/* It's safe to allow irq's after DR6 has been saved */
preempt_disable();
cond_local_irq_enable(regs);

This has never really been valid. It should be guarded by an
if(user_mode(regs)). And we need to kill the die_notifier garbage in
here -- it makes it basically impossible to understand what's going
on.

--Andy

\
 
 \ /
  Last update: 2016-02-29 20:41    [W:0.183 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site