diff options
Diffstat (limited to 'arch/i386/kernel/vsyscall-sysenter.S')
-rw-r--r-- | arch/i386/kernel/vsyscall-sysenter.S | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/i386/kernel/vsyscall-sysenter.S b/arch/i386/kernel/vsyscall-sysenter.S index 4daefb2ec1b2..76b728159403 100644 --- a/arch/i386/kernel/vsyscall-sysenter.S +++ b/arch/i386/kernel/vsyscall-sysenter.S | |||
@@ -7,6 +7,21 @@ | |||
7 | * for details. | 7 | * for details. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | /* | ||
11 | * The caller puts arg2 in %ecx, which gets pushed. The kernel will use | ||
12 | * %ecx itself for arg2. The pushing is because the sysexit instruction | ||
13 | * (found in entry.S) requires that we clobber %ecx with the desired %esp. | ||
14 | * User code might expect that %ecx is unclobbered though, as it would be | ||
15 | * for returning via the iret instruction, so we must push and pop. | ||
16 | * | ||
17 | * The caller puts arg3 in %edx, which the sysexit instruction requires | ||
18 | * for %eip. Thus, exactly as for arg2, we must push and pop. | ||
19 | * | ||
20 | * Arg6 is different. The caller puts arg6 in %ebp. Since the sysenter | ||
21 | * instruction clobbers %esp, the user's %esp won't even survive entry | ||
22 | * into the kernel. We store %esp in %ebp. Code in entry.S must fetch | ||
23 | * arg6 from the stack. | ||
24 | */ | ||
10 | .text | 25 | .text |
11 | .globl __kernel_vsyscall | 26 | .globl __kernel_vsyscall |
12 | .type __kernel_vsyscall,@function | 27 | .type __kernel_vsyscall,@function |