5 #include <asm/unistd.h>
7 #include "ptrace_user.h"
10 #include "uml-config.h"
11 #include "sysdep/stub.h"
12 #include "kern_constants.h"
14 /* This is in a separate file because it needs to be compiled with any
15 * extraneous gcc flags (-pg, -fprofile-arcs, -ftest-coverage) disabled
17 * Use UM_KERN_PAGE_SIZE instead of PAGE_SIZE because that calls getpagesize
21 void __attribute__ ((__section__ (".__syscall_stub")))
22 stub_clone_handler(void)
24 struct stub_data *data = (struct stub_data *) UML_CONFIG_STUB_DATA;
27 err = stub_syscall2(__NR_clone, CLONE_PARENT | CLONE_FILES | SIGCHLD,
28 UML_CONFIG_STUB_DATA + UM_KERN_PAGE_SIZE / 2 -
33 err = stub_syscall4(__NR_ptrace, PTRACE_TRACEME, 0, 0, 0);
37 err = stub_syscall3(__NR_setitimer, ITIMER_VIRTUAL,
38 (long) &data->timer, 0);
42 remap_stack(data->fd, data->offset);
46 /* save current result.
48 * child: retcode of mmap already saved and it jumps around this