diff options
| -rw-r--r-- | arch/i386/kernel/entry.S | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S index 8713e0248a0b..e8d2630fd19a 100644 --- a/arch/i386/kernel/entry.S +++ b/arch/i386/kernel/entry.S | |||
| @@ -83,6 +83,12 @@ VM_MASK = 0x00020000 | |||
| 83 | #define resume_kernel restore_nocheck | 83 | #define resume_kernel restore_nocheck |
| 84 | #endif | 84 | #endif |
| 85 | 85 | ||
| 86 | #ifdef CONFIG_VM86 | ||
| 87 | #define resume_userspace_sig check_userspace | ||
| 88 | #else | ||
| 89 | #define resume_userspace_sig resume_userspace | ||
| 90 | #endif | ||
| 91 | |||
| 86 | #define SAVE_ALL \ | 92 | #define SAVE_ALL \ |
| 87 | cld; \ | 93 | cld; \ |
| 88 | pushl %es; \ | 94 | pushl %es; \ |
| @@ -211,6 +217,7 @@ ret_from_exception: | |||
| 211 | preempt_stop | 217 | preempt_stop |
| 212 | ret_from_intr: | 218 | ret_from_intr: |
| 213 | GET_THREAD_INFO(%ebp) | 219 | GET_THREAD_INFO(%ebp) |
| 220 | check_userspace: | ||
| 214 | movl EFLAGS(%esp), %eax # mix EFLAGS and CS | 221 | movl EFLAGS(%esp), %eax # mix EFLAGS and CS |
| 215 | movb CS(%esp), %al | 222 | movb CS(%esp), %al |
| 216 | testl $(VM_MASK | 3), %eax | 223 | testl $(VM_MASK | 3), %eax |
| @@ -415,7 +422,7 @@ work_notifysig: # deal with pending signals and | |||
| 415 | # vm86-space | 422 | # vm86-space |
| 416 | xorl %edx, %edx | 423 | xorl %edx, %edx |
| 417 | call do_notify_resume | 424 | call do_notify_resume |
| 418 | jmp resume_userspace | 425 | jmp resume_userspace_sig |
| 419 | 426 | ||
| 420 | ALIGN | 427 | ALIGN |
| 421 | work_notifysig_v86: | 428 | work_notifysig_v86: |
| @@ -428,7 +435,7 @@ work_notifysig_v86: | |||
| 428 | movl %eax, %esp | 435 | movl %eax, %esp |
| 429 | xorl %edx, %edx | 436 | xorl %edx, %edx |
| 430 | call do_notify_resume | 437 | call do_notify_resume |
| 431 | jmp resume_userspace | 438 | jmp resume_userspace_sig |
| 432 | #endif | 439 | #endif |
| 433 | 440 | ||
| 434 | # perform syscall exit tracing | 441 | # perform syscall exit tracing |
