diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-23 04:34:11 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-11-29 04:13:44 +0100 |
commit | 1d4b4b2994b5fc208963c0b795291f8c1f18becf (patch) | |
tree | befe27a3e2abc333b5bd81ee7381e4c5541f543f /arch/x86/kernel/entry_64.S | |
parent | get rid of pt_regs argument of ->load_binary() (diff) | |
download | linux-1d4b4b2994b5fc208963c0b795291f8c1f18becf.tar.xz linux-1d4b4b2994b5fc208963c0b795291f8c1f18becf.zip |
x86, um: switch to generic fork/vfork/clone
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/x86/kernel/entry_64.S')
-rw-r--r-- | arch/x86/kernel/entry_64.S | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index 1328fe49a3f1..2363e820ed68 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S @@ -845,9 +845,25 @@ ENTRY(\label) END(\label) .endm - PTREGSCALL stub_clone, sys_clone, %r8 - PTREGSCALL stub_fork, sys_fork, %rdi - PTREGSCALL stub_vfork, sys_vfork, %rdi + .macro FORK_LIKE func +ENTRY(stub_\func) + CFI_STARTPROC + popq %r11 /* save return address */ + PARTIAL_FRAME 0 + SAVE_REST + pushq %r11 /* put it back on stack */ + FIXUP_TOP_OF_STACK %r11, 8 + DEFAULT_FRAME 0 8 /* offset 8: return address */ + call sys_\func + RESTORE_TOP_OF_STACK %r11, 8 + ret $REST_SKIP /* pop extended registers */ + CFI_ENDPROC +END(stub_\func) + .endm + + FORK_LIKE clone + FORK_LIKE fork + FORK_LIKE vfork PTREGSCALL stub_sigaltstack, sys_sigaltstack, %rdx PTREGSCALL stub_iopl, sys_iopl, %rsi |