Commit ee1eca5d2493026affbbc91b228dd00879484687
Committed by
Linus Torvalds
1 parent
9ac625a398
Exists in
master
and in
7 other branches
uml: remove last include of libc asm/page.h
asm/page.h is disappearing from the libc headers and we don't need it anyway. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 0 additions and 1 deletions Inline Diff
arch/um/kernel/skas/clone.c
1 | #include <sched.h> | 1 | #include <sched.h> |
2 | #include <signal.h> | 2 | #include <signal.h> |
3 | #include <sys/mman.h> | 3 | #include <sys/mman.h> |
4 | #include <sys/time.h> | 4 | #include <sys/time.h> |
5 | #include <asm/unistd.h> | 5 | #include <asm/unistd.h> |
6 | #include <asm/page.h> | ||
7 | #include "as-layout.h" | 6 | #include "as-layout.h" |
8 | #include "ptrace_user.h" | 7 | #include "ptrace_user.h" |
9 | #include "skas.h" | 8 | #include "skas.h" |
10 | #include "stub-data.h" | 9 | #include "stub-data.h" |
11 | #include "uml-config.h" | 10 | #include "uml-config.h" |
12 | #include "sysdep/stub.h" | 11 | #include "sysdep/stub.h" |
13 | #include "kern_constants.h" | 12 | #include "kern_constants.h" |
14 | 13 | ||
15 | /* This is in a separate file because it needs to be compiled with any | 14 | /* This is in a separate file because it needs to be compiled with any |
16 | * extraneous gcc flags (-pg, -fprofile-arcs, -ftest-coverage) disabled | 15 | * extraneous gcc flags (-pg, -fprofile-arcs, -ftest-coverage) disabled |
17 | * | 16 | * |
18 | * Use UM_KERN_PAGE_SIZE instead of PAGE_SIZE because that calls getpagesize | 17 | * Use UM_KERN_PAGE_SIZE instead of PAGE_SIZE because that calls getpagesize |
19 | * on some systems. | 18 | * on some systems. |
20 | */ | 19 | */ |
21 | 20 | ||
22 | void __attribute__ ((__section__ (".__syscall_stub"))) | 21 | void __attribute__ ((__section__ (".__syscall_stub"))) |
23 | stub_clone_handler(void) | 22 | stub_clone_handler(void) |
24 | { | 23 | { |
25 | struct stub_data *data = (struct stub_data *) STUB_DATA; | 24 | struct stub_data *data = (struct stub_data *) STUB_DATA; |
26 | long err; | 25 | long err; |
27 | 26 | ||
28 | err = stub_syscall2(__NR_clone, CLONE_PARENT | CLONE_FILES | SIGCHLD, | 27 | err = stub_syscall2(__NR_clone, CLONE_PARENT | CLONE_FILES | SIGCHLD, |
29 | STUB_DATA + UM_KERN_PAGE_SIZE / 2 - sizeof(void *)); | 28 | STUB_DATA + UM_KERN_PAGE_SIZE / 2 - sizeof(void *)); |
30 | if(err != 0) | 29 | if(err != 0) |
31 | goto out; | 30 | goto out; |
32 | 31 | ||
33 | err = stub_syscall4(__NR_ptrace, PTRACE_TRACEME, 0, 0, 0); | 32 | err = stub_syscall4(__NR_ptrace, PTRACE_TRACEME, 0, 0, 0); |
34 | if(err) | 33 | if(err) |
35 | goto out; | 34 | goto out; |
36 | 35 | ||
37 | err = stub_syscall3(__NR_setitimer, ITIMER_VIRTUAL, | 36 | err = stub_syscall3(__NR_setitimer, ITIMER_VIRTUAL, |
38 | (long) &data->timer, 0); | 37 | (long) &data->timer, 0); |
39 | if(err) | 38 | if(err) |
40 | goto out; | 39 | goto out; |
41 | 40 | ||
42 | remap_stack(data->fd, data->offset); | 41 | remap_stack(data->fd, data->offset); |
43 | goto done; | 42 | goto done; |
44 | 43 | ||
45 | out: | 44 | out: |
46 | /* save current result. | 45 | /* save current result. |
47 | * Parent: pid; | 46 | * Parent: pid; |
48 | * child: retcode of mmap already saved and it jumps around this | 47 | * child: retcode of mmap already saved and it jumps around this |
49 | * assignment | 48 | * assignment |
50 | */ | 49 | */ |
51 | data->err = err; | 50 | data->err = err; |
52 | done: | 51 | done: |
53 | trap_myself(); | 52 | trap_myself(); |
54 | } | 53 | } |
55 | 54 |