Messages in this thread | | | Date | Tue, 15 Jun 2004 06:34:39 +0200 | From | Andre Tomt <> | Subject | Re: Local DoS attack on i386 |
| |
Nuno Monteiro wrote: > The same fix should be applied to 2.4. I'm running locally a very > hacked version of 2.4.22 with it and it survives that crash.c program. > > Here's the diff. Marcelo, please merge. > > > --- linux-2.4.27-pre5/include/asm-i386/i387.h~fix-x86-clear_fpu-macro 2004-06-14 15:12:13.909059344 +0100 > +++ linux-2.4.27-pre5/include/asm-i386/i387.h 2004-06-14 15:12:45.970185312 +0100 > @@ -34,7 +34,7 @@ extern void kernel_fpu_begin(void); > > #define clear_fpu( tsk ) do { \ > if ( tsk->flags & PF_USEDFPU ) { \ > - asm volatile("fwait"); \ > + asm volatile("fnclex ; fwait"); \ > tsk->flags &= ~PF_USEDFPU; \ > stts(); \ > } \
You're missing x86-64.
Complete patches are up at <http://tomt.net/kernel/clear_fpu/> - these covers 2.4 and 2.6, plus i386 and x86-64.
But I guess Marcelo would want the x86-64 part to come through ak.
-- Cheers, André Tomt - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |