]> git.pld-linux.org Git - packages/kernel.git/blame - kernel-2.4-NTfix.patch
- obsolete
[packages/kernel.git] / kernel-2.4-NTfix.patch
CommitLineData
d57104cc
JB
1--- linux-2.4.19/arch/i386/kernel/entry.S.orig Sat Aug 3 02:39:42 2002
2+++ linux-2.4.19/arch/i386/kernel/entry.S Thu Nov 14 13:52:24 2002
3@@ -63,7 +63,9 @@
4 OLDSS = 0x38
655a4043 5
d57104cc
JB
6 CF_MASK = 0x00000001
7+TF_MASK = 0x00000100
8 IF_MASK = 0x00000200
9+DF_MASK = 0x00000400
10 NT_MASK = 0x00004000
11 VM_MASK = 0x00020000
655a4043 12
d57104cc
JB
13@@ -139,7 +141,10 @@
14 movl EIP(%esp),%eax # due to call gates, this is eflags, not eip..
15 movl CS(%esp),%edx # this is eip..
16 movl EFLAGS(%esp),%ecx # and this is cs..
17+ andl $~(NT_MASK|TF_MASK|DF_MASK), %eax # Clear NT since we are doing an iret
18 movl %eax,EFLAGS(%esp) #
19+ pushl %eax
20+ popfl
21 movl %edx,EIP(%esp) # Now we move them to their "normal" places
22 movl %ecx,CS(%esp) #
23 movl %esp,%ebx
24@@ -160,7 +165,10 @@
655a4043 25 movl EIP(%esp),%eax # due to call gates, this is eflags, not eip..
26 movl CS(%esp),%edx # this is eip..
27 movl EFLAGS(%esp),%ecx # and this is cs..
d57104cc 28+ andl $~(NT_MASK|TF_MASK|DF_MASK), %eax # Clear NT since we are doing an iret
655a4043 29 movl %eax,EFLAGS(%esp) #
d57104cc
JB
30+ pushl %eax
31+ popfl
655a4043 32 movl %edx,EIP(%esp) # Now we move them to their "normal" places
33 movl %ecx,CS(%esp) #
d57104cc
JB
34 movl %esp,%ebx
35@@ -264,6 +272,9 @@
36 pushl $ SYMBOL_NAME(do_divide_error)
37 ALIGN
38 error_code:
39+ pushfl
40+ andl $~(NT_MASK|TF_MASK|DF_MASK), (%esp) # NT must be clear, do a cld for free
41+ popfl
42 pushl %ds
43 pushl %eax
44 xorl %eax,%eax
45@@ -274,7 +285,6 @@
46 decl %eax # eax = -1
47 pushl %ecx
48 pushl %ebx
49- cld
50 movl %es,%ecx
51 movl ORIG_EAX(%esp), %esi # get the error code
52 movl ES(%esp), %edi # get the function address
53--- linux-2.4.19/arch/i386/kernel/traps.c.orig Sat Aug 3 02:39:42 2002
54+++ linux-2.4.19/arch/i386/kernel/traps.c Thu Nov 14 13:53:14 2002
55@@ -575,7 +575,7 @@
56 return;
57
58 clear_TF:
59- regs->eflags &= ~TF_MASK;
60+ regs->eflags &= ~(TF_MASK|NT_MASK);
61 return;
62 }
63
This page took 0.208974 seconds and 4 git commands to generate.