Re: [PATCH 1/2] i386: Disallow kprobes on NMI handlers - try #2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2006-08-10 at 13:52 +0200, Andi Kleen wrote:
> On Thursday 10 August 2006 13:36, Fernando Luis Vázquez Cao wrote:
> > A kprobe executes IRET early and that could cause NMI recursion and stack
> > corruption.
> > 
> > Note: This problem was originally spotted and solved by Andi Kleen in the
> > x86_64 architecture. This patch is an adaption of his patch for i386.
> 
> Originally Jan Beulich discovered these classes of bugs actually
Sorry for the mistake Jan.

> I applied the two patches (after fixing lots of rejects because that
> code had already changed a lot). But I have my doubts it is complete.
> 
> e.g. the NMI watchdog nmi code has lots of callees which you don't
> handle (notifier chains, spinlocks, printks which can call practically everything, ...) 
> 
> The printk in the NMI handler look pretty bogus so I just removed it.
I had done the same in my local repository (^-^).

> But all the other code would be tricky. but .e.g. marking up 
> spinlocks would be probably not a good idea. 
> 
> When we oops (call die) perhaps we can force kprobes to be disabled? 
> 
> Also everybody hooking into the die chain would need to be covered too.
> 
> Probably some followon work is needed.
Agreed. In fact I am currently working on that. I sent the previous
patches just to get started.

Thank you,

Fernando

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux