Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 295285
b: refs/heads/master
c: 29a2e28
h: refs/heads/master
i:
  295283: 62e7caf
v: v3
  • Loading branch information
Dmitry Adamushko authored and H. Peter Anvin committed Mar 22, 2012
1 parent 5e325fa commit b368e36
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 446e1c86d51d0823e003a43a2b85c430efce2733
refs/heads/master: 29a2e2836ff9ea65a603c89df217f4198973a74f
17 changes: 10 additions & 7 deletions trunk/arch/x86/kernel/entry_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,6 @@
#endif
.endm

#ifdef CONFIG_VM86
#define resume_userspace_sig check_userspace
#else
#define resume_userspace_sig resume_userspace
#endif

/*
* User gs save/restore
*
Expand Down Expand Up @@ -327,10 +321,19 @@ ret_from_exception:
preempt_stop(CLBR_ANY)
ret_from_intr:
GET_THREAD_INFO(%ebp)
check_userspace:
resume_userspace_sig:
#ifdef CONFIG_VM86
movl PT_EFLAGS(%esp), %eax # mix EFLAGS and CS
movb PT_CS(%esp), %al
andl $(X86_EFLAGS_VM | SEGMENT_RPL_MASK), %eax
#else
/*
* We can be coming here from a syscall done in the kernel space,
* e.g. a failed kernel_execve().
*/
movl PT_CS(%esp), %eax
andl $SEGMENT_RPL_MASK, %eax
#endif
cmpl $USER_RPL, %eax
jb resume_kernel # not returning to v8086 or userspace

Expand Down

0 comments on commit b368e36

Please sign in to comment.