From: Mike Galbraith <efault@gmx.de>
To: Andrew Morton <akpm@osdl.org>
Cc: Chuck Ebbert <76306.1226@compuserve.com>,
In Cognito <defend.the.world@gmail.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@osdl.org>
Subject: Re: Sysenter crash with Nested Task Bit set
Date: Mon, 18 Sep 2006 08:44:27 +0000 [thread overview]
Message-ID: <1158569067.6376.8.camel@Homer.simpson.net> (raw)
In-Reply-To: <20060917222537.55241d19.akpm@osdl.org>
On Sun, 2006-09-17 at 22:25 -0700, Andrew Morton wrote:
> On Sun, 17 Sep 2006 23:51:45 -0400
> Chuck Ebbert <76306.1226@compuserve.com> wrote:
>
> > In-Reply-To: <5a20704e0609171608o7ee45fdbxb94aa897c1776153@mail.gmail.com>
> >
> > On Sun, 17 Sep 2006 19:08:24 -0400, "In Cognito" wrote:
> >
> > > Here's a way to heat up your cpu and crash the rest of the system too:
> > >
> > > main(){
> > > asm("pushf\n"
> > > "popl %eax\n"
> > > /* enable the NT bit */
> > > "orl $0x4000, %eax\n"
> > > "pushl %eax\n"
> > > "popf\n"
> > >
> > > "sysenter\n"
> > > );
> > > return 0;
> > > }
> >
> > I'll take your word that it crashes.
>
> It doesn't for me - I get a segfault.
>
> That's on a PIII. Are recenter CPUs different in this regard?
I guess so. That proglet does very bad things to my P4/HT. I too get a
segfault, but then init goes insane and may reap the proglet's parent
shell, but then again, it may decide to reap the shell next door.
Thereafter, init is running/gaga. (18-rc7)
Chuck's patch did indeed make it stop doing that.
> > 2.6.9 is fine. I'd guess the iret fixups from 2.6.12 are the problem.
> >
> > This doesn't crash for me, but it's probably not quite the right fix:
> >
> > Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
> > ---
> > arch/i386/kernel/traps.c | 12 +++++++++++-
> > 1 files changed, 11 insertions(+), 1 deletion(-)
> >
> > --- 2.6.18-rc6-nb.orig/arch/i386/kernel/traps.c
> > +++ 2.6.18-rc6-nb/arch/i386/kernel/traps.c
> > @@ -516,6 +516,16 @@ fastcall void do_##name(struct pt_regs *
> > do_trap(trapnr, signr, str, 0, regs, error_code, NULL); \
> > }
> >
> > +#define DO_TSS_ERROR(trapnr, signr, str, name) \
> > +fastcall void do_##name(struct pt_regs * regs, long error_code) \
> > +{ \
> > + if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \
> > + == NOTIFY_STOP) \
> > + return; \
> > + regs->eflags &= ~X86_EFLAGS_NT; \
> > + do_trap(trapnr, signr, str, 0, regs, error_code, NULL); \
> > +}
> > +
> > #define DO_ERROR_INFO(trapnr, signr, str, name, sicode, siaddr) \
> > fastcall void do_##name(struct pt_regs * regs, long error_code) \
> > { \
> > @@ -561,7 +571,7 @@ DO_VM86_ERROR( 4, SIGSEGV, "overflow", o
> > DO_VM86_ERROR( 5, SIGSEGV, "bounds", bounds)
> > DO_ERROR_INFO( 6, SIGILL, "invalid opcode", invalid_op, ILL_ILLOPN, regs->eip)
> > DO_ERROR( 9, SIGFPE, "coprocessor segment overrun", coprocessor_segment_overrun)
> > -DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS)
> > +DO_TSS_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS)
> > DO_ERROR(11, SIGBUS, "segment not present", segment_not_present)
> > DO_ERROR(12, SIGBUS, "stack segment", stack_segment)
> > DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, 0)
> > --
> > Chuck
> -
> 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/
>
next prev parent reply other threads:[~2006-09-18 6:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-18 3:51 Sysenter crash with Nested Task Bit set Chuck Ebbert
2006-09-18 5:25 ` Andrew Morton
2006-09-18 8:44 ` Mike Galbraith [this message]
2006-09-18 15:11 ` Linus Torvalds
2006-09-18 15:06 ` Ingo Molnar
2006-09-18 15:29 ` Andi Kleen
2006-09-18 15:24 ` Ingo Molnar
2006-09-18 16:02 ` Linus Torvalds
2006-09-18 16:10 ` Linus Torvalds
2006-09-18 16:24 ` Jeremy Fitzhardinge
2006-09-18 16:12 ` Benjamin LaHaise
2006-09-18 16:39 ` Andi Kleen
2006-09-18 19:01 ` Jeremy Fitzhardinge
[not found] <5a20704e0609171603s55ca52bap71dc2fa2c05d6741@mail.gmail.com>
2006-09-17 23:08 ` In Cognito
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1158569067.6376.8.camel@Homer.simpson.net \
--to=efault@gmx.de \
--cc=76306.1226@compuserve.com \
--cc=akpm@osdl.org \
--cc=defend.the.world@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox