Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 20330
b: refs/heads/master
c: 581141c
h: refs/heads/master
v: v3
  • Loading branch information
Albert D. Cahalan authored and Linus Torvalds committed Feb 15, 2006
1 parent dd13e76 commit f911547
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 28baebae73c3ea8b75c7cae225a7db817ab825a9
refs/heads/master: 581141cb4b10ebd865dcb7b80f5e712e2def5408
15 changes: 15 additions & 0 deletions trunk/arch/i386/kernel/vsyscall-sysenter.S
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@
* for details.
*/

/*
* The caller puts arg2 in %ecx, which gets pushed. The kernel will use
* %ecx itself for arg2. The pushing is because the sysexit instruction
* (found in entry.S) requires that we clobber %ecx with the desired %esp.
* User code might expect that %ecx is unclobbered though, as it would be
* for returning via the iret instruction, so we must push and pop.
*
* The caller puts arg3 in %edx, which the sysexit instruction requires
* for %eip. Thus, exactly as for arg2, we must push and pop.
*
* Arg6 is different. The caller puts arg6 in %ebp. Since the sysenter
* instruction clobbers %esp, the user's %esp won't even survive entry
* into the kernel. We store %esp in %ebp. Code in entry.S must fetch
* arg6 from the stack.
*/
.text
.globl __kernel_vsyscall
.type __kernel_vsyscall,@function
Expand Down

0 comments on commit f911547

Please sign in to comment.