diff options
author | Richard Weinberger <richard@nod.at> | 2011-07-25 20:12:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-25 23:57:13 -0400 |
commit | fc9a00187ba1300a0baae8e613cc62598e1a7de7 (patch) | |
tree | 37d79e9c6bc6d81a6b75b58e5513e25382e66342 | |
parent | 548f0a4e02f6fa33278e77a2a6477cdeb512317f (diff) |
um: set __HAVE_ARCH_GATE_AREA for x86_64
Implement arch_vma_name() and make get_gate_vma(), in_gate_area() and
in_gate_area_no_mm() a nop.
We need arch_vma_name() to support vDSO.
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/um/sys-x86_64/Makefile | 2 | ||||
-rw-r--r-- | arch/um/sys-x86_64/asm/elf.h | 10 | ||||
-rw-r--r-- | arch/um/sys-x86_64/mem.c | 26 |
3 files changed, 37 insertions, 1 deletions
diff --git a/arch/um/sys-x86_64/Makefile b/arch/um/sys-x86_64/Makefile index 4f9563784d61..bf2fe83b46b1 100644 --- a/arch/um/sys-x86_64/Makefile +++ b/arch/um/sys-x86_64/Makefile | |||
@@ -4,7 +4,7 @@ | |||
4 | # Licensed under the GPL | 4 | # Licensed under the GPL |
5 | # | 5 | # |
6 | 6 | ||
7 | obj-y = bug.o bugs.o delay.o fault.o ldt.o ptrace.o ptrace_user.o \ | 7 | obj-y = bug.o bugs.o delay.o fault.o ldt.o ptrace.o ptrace_user.o mem.o \ |
8 | setjmp.o signal.o stub.o stub_segv.o syscalls.o syscall_table.o \ | 8 | setjmp.o signal.o stub.o stub_segv.o syscalls.o syscall_table.o \ |
9 | sysrq.o ksyms.o tls.o | 9 | sysrq.o ksyms.o tls.o |
10 | 10 | ||
diff --git a/arch/um/sys-x86_64/asm/elf.h b/arch/um/sys-x86_64/asm/elf.h index d6d5af376251..11a2bfb38859 100644 --- a/arch/um/sys-x86_64/asm/elf.h +++ b/arch/um/sys-x86_64/asm/elf.h | |||
@@ -119,4 +119,14 @@ extern long elf_aux_hwcap; | |||
119 | 119 | ||
120 | #define SET_PERSONALITY(ex) do ; while(0) | 120 | #define SET_PERSONALITY(ex) do ; while(0) |
121 | 121 | ||
122 | #define __HAVE_ARCH_GATE_AREA 1 | ||
123 | #define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1 | ||
124 | struct linux_binprm; | ||
125 | extern int arch_setup_additional_pages(struct linux_binprm *bprm, | ||
126 | int uses_interp); | ||
127 | |||
128 | extern unsigned long um_vdso_addr; | ||
129 | #define AT_SYSINFO_EHDR 33 | ||
130 | #define ARCH_DLINFO NEW_AUX_ENT(AT_SYSINFO_EHDR, um_vdso_addr) | ||
131 | |||
122 | #endif | 132 | #endif |
diff --git a/arch/um/sys-x86_64/mem.c b/arch/um/sys-x86_64/mem.c new file mode 100644 index 000000000000..546518727a73 --- /dev/null +++ b/arch/um/sys-x86_64/mem.c | |||
@@ -0,0 +1,26 @@ | |||
1 | #include "linux/mm.h" | ||
2 | #include "asm/page.h" | ||
3 | #include "asm/mman.h" | ||
4 | |||
5 | const char *arch_vma_name(struct vm_area_struct *vma) | ||
6 | { | ||
7 | if (vma->vm_mm && vma->vm_start == um_vdso_addr) | ||
8 | return "[vdso]"; | ||
9 | |||
10 | return NULL; | ||
11 | } | ||
12 | |||
13 | struct vm_area_struct *get_gate_vma(struct mm_struct *mm) | ||
14 | { | ||
15 | return NULL; | ||
16 | } | ||
17 | |||
18 | int in_gate_area(struct mm_struct *mm, unsigned long addr) | ||
19 | { | ||
20 | return 0; | ||
21 | } | ||
22 | |||
23 | int in_gate_area_no_mm(unsigned long addr) | ||
24 | { | ||
25 | return 0; | ||
26 | } | ||