Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | * (C) Copyright 2002 Linus Torvalds |
Ingo Molnar | e6e5494 | 2006-06-27 02:53:50 -0700 | [diff] [blame] | 3 | * Portions based on the vdso-randomization code from exec-shield: |
| 4 | * Copyright(C) 2005-2006, Red Hat, Inc., Ingo Molnar |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5 | * |
| 6 | * This file contains the needed initializations to support sysenter. |
| 7 | */ |
| 8 | |
| 9 | #include <linux/init.h> |
| 10 | #include <linux/smp.h> |
| 11 | #include <linux/thread_info.h> |
| 12 | #include <linux/sched.h> |
| 13 | #include <linux/gfp.h> |
| 14 | #include <linux/string.h> |
| 15 | #include <linux/elf.h> |
Ingo Molnar | e6e5494 | 2006-06-27 02:53:50 -0700 | [diff] [blame] | 16 | #include <linux/mm.h> |
Alexey Dobriyan | 4e950f6 | 2007-07-30 02:36:13 +0400 | [diff] [blame] | 17 | #include <linux/err.h> |
Ingo Molnar | e6e5494 | 2006-06-27 02:53:50 -0700 | [diff] [blame] | 18 | #include <linux/module.h> |
Stefani Seibold | 4e40112 | 2014-03-17 23:22:13 +0100 | [diff] [blame] | 19 | #include <linux/slab.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | |
| 21 | #include <asm/cpufeature.h> |
| 22 | #include <asm/msr.h> |
| 23 | #include <asm/pgtable.h> |
| 24 | #include <asm/unistd.h> |
Jeremy Fitzhardinge | d4f7a2c | 2007-05-02 19:27:12 +0200 | [diff] [blame] | 25 | #include <asm/elf.h> |
Jeremy Fitzhardinge | 1dbf527c | 2007-05-02 19:27:12 +0200 | [diff] [blame] | 26 | #include <asm/tlbflush.h> |
Roland McGrath | 6c3652e | 2008-01-30 13:30:42 +0100 | [diff] [blame] | 27 | #include <asm/vdso.h> |
Roland McGrath | af65d64 | 2008-01-30 13:30:43 +0100 | [diff] [blame] | 28 | #include <asm/proto.h> |
Stefani Seibold | 7a59ed4 | 2014-03-17 23:22:09 +0100 | [diff] [blame] | 29 | #include <asm/fixmap.h> |
| 30 | #include <asm/hpet.h> |
| 31 | #include <asm/vvar.h> |
Jeremy Fitzhardinge | 1dbf527c | 2007-05-02 19:27:12 +0200 | [diff] [blame] | 32 | |
Jeremy Fitzhardinge | 1dbf527c | 2007-05-02 19:27:12 +0200 | [diff] [blame] | 33 | #ifdef CONFIG_COMPAT_VDSO |
Andy Lutomirski | b0b49f2 | 2014-03-13 16:01:26 -0700 | [diff] [blame] | 34 | #define VDSO_DEFAULT 0 |
Jeremy Fitzhardinge | 1dbf527c | 2007-05-02 19:27:12 +0200 | [diff] [blame] | 35 | #else |
Andy Lutomirski | b0b49f2 | 2014-03-13 16:01:26 -0700 | [diff] [blame] | 36 | #define VDSO_DEFAULT 1 |
Jeremy Fitzhardinge | 1dbf527c | 2007-05-02 19:27:12 +0200 | [diff] [blame] | 37 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 38 | |
Roland McGrath | af65d64 | 2008-01-30 13:30:43 +0100 | [diff] [blame] | 39 | #ifdef CONFIG_X86_64 |
| 40 | #define vdso_enabled sysctl_vsyscall32 |
| 41 | #define arch_setup_additional_pages syscall32_setup_pages |
| 42 | #endif |
| 43 | |
| 44 | /* |
Ingo Molnar | e6e5494 | 2006-06-27 02:53:50 -0700 | [diff] [blame] | 45 | * Should the kernel map a VDSO page into processes and pass its |
| 46 | * address down to glibc upon exec()? |
| 47 | */ |
Jeremy Fitzhardinge | 1dbf527c | 2007-05-02 19:27:12 +0200 | [diff] [blame] | 48 | unsigned int __read_mostly vdso_enabled = VDSO_DEFAULT; |
Ingo Molnar | e6e5494 | 2006-06-27 02:53:50 -0700 | [diff] [blame] | 49 | |
Ingo Molnar | e6e5494 | 2006-06-27 02:53:50 -0700 | [diff] [blame] | 50 | static int __init vdso_setup(char *s) |
| 51 | { |
| 52 | vdso_enabled = simple_strtoul(s, NULL, 0); |
| 53 | |
Andy Lutomirski | b0b49f2 | 2014-03-13 16:01:26 -0700 | [diff] [blame] | 54 | if (vdso_enabled > 1) |
| 55 | pr_warn("vdso32 values other than 0 and 1 are no longer allowed; vdso disabled\n"); |
| 56 | |
Ingo Molnar | e6e5494 | 2006-06-27 02:53:50 -0700 | [diff] [blame] | 57 | return 1; |
| 58 | } |
| 59 | |
Roland McGrath | af65d64 | 2008-01-30 13:30:43 +0100 | [diff] [blame] | 60 | /* |
| 61 | * For consistency, the argument vdso32=[012] affects the 32-bit vDSO |
| 62 | * behavior on both 64-bit and 32-bit kernels. |
| 63 | * On 32-bit kernels, vdso=[012] means the same thing. |
| 64 | */ |
| 65 | __setup("vdso32=", vdso_setup); |
Ingo Molnar | e6e5494 | 2006-06-27 02:53:50 -0700 | [diff] [blame] | 66 | |
Roland McGrath | af65d64 | 2008-01-30 13:30:43 +0100 | [diff] [blame] | 67 | #ifdef CONFIG_X86_32 |
| 68 | __setup_param("vdso=", vdso32_setup, vdso_setup, 0); |
| 69 | |
| 70 | EXPORT_SYMBOL_GPL(vdso_enabled); |
| 71 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 72 | |
Stefani Seibold | 4e40112 | 2014-03-17 23:22:13 +0100 | [diff] [blame] | 73 | static struct page **vdso32_pages; |
Andy Lutomirski | b67e612 | 2014-03-20 15:01:21 -0700 | [diff] [blame] | 74 | static unsigned vdso32_size; |
Roland McGrath | af65d64 | 2008-01-30 13:30:43 +0100 | [diff] [blame] | 75 | |
| 76 | #ifdef CONFIG_X86_64 |
| 77 | |
Jeremy Fitzhardinge | b6ad92d | 2008-07-10 18:13:36 -0700 | [diff] [blame] | 78 | #define vdso32_sysenter() (boot_cpu_has(X86_FEATURE_SYSENTER32)) |
Jeremy Fitzhardinge | 6a52e4b | 2008-07-12 02:22:00 -0700 | [diff] [blame] | 79 | #define vdso32_syscall() (boot_cpu_has(X86_FEATURE_SYSCALL32)) |
Roland McGrath | af65d64 | 2008-01-30 13:30:43 +0100 | [diff] [blame] | 80 | |
| 81 | /* May not be __init: called during resume */ |
| 82 | void syscall32_cpu_init(void) |
| 83 | { |
Roland McGrath | af65d64 | 2008-01-30 13:30:43 +0100 | [diff] [blame] | 84 | /* Load these always in case some future AMD CPU supports |
| 85 | SYSENTER from compat mode too. */ |
H. Peter Anvin | 715c85b | 2012-06-07 13:32:04 -0700 | [diff] [blame] | 86 | wrmsrl_safe(MSR_IA32_SYSENTER_CS, (u64)__KERNEL_CS); |
| 87 | wrmsrl_safe(MSR_IA32_SYSENTER_ESP, 0ULL); |
| 88 | wrmsrl_safe(MSR_IA32_SYSENTER_EIP, (u64)ia32_sysenter_target); |
Roland McGrath | af65d64 | 2008-01-30 13:30:43 +0100 | [diff] [blame] | 89 | |
| 90 | wrmsrl(MSR_CSTAR, ia32_cstar_target); |
| 91 | } |
| 92 | |
Roland McGrath | af65d64 | 2008-01-30 13:30:43 +0100 | [diff] [blame] | 93 | #else /* CONFIG_X86_32 */ |
| 94 | |
| 95 | #define vdso32_sysenter() (boot_cpu_has(X86_FEATURE_SEP)) |
Jeremy Fitzhardinge | 6a52e4b | 2008-07-12 02:22:00 -0700 | [diff] [blame] | 96 | #define vdso32_syscall() (0) |
Roland McGrath | af65d64 | 2008-01-30 13:30:43 +0100 | [diff] [blame] | 97 | |
Li Shaohua | 6fe940d | 2005-06-25 14:54:53 -0700 | [diff] [blame] | 98 | void enable_sep_cpu(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 99 | { |
| 100 | int cpu = get_cpu(); |
| 101 | struct tss_struct *tss = &per_cpu(init_tss, cpu); |
| 102 | |
Li Shaohua | 6fe940d | 2005-06-25 14:54:53 -0700 | [diff] [blame] | 103 | if (!boot_cpu_has(X86_FEATURE_SEP)) { |
| 104 | put_cpu(); |
| 105 | return; |
| 106 | } |
| 107 | |
Rusty Russell | a75c54f | 2007-05-02 19:27:13 +0200 | [diff] [blame] | 108 | tss->x86_tss.ss1 = __KERNEL_CS; |
H. Peter Anvin | faca622 | 2008-01-30 13:31:02 +0100 | [diff] [blame] | 109 | tss->x86_tss.sp1 = sizeof(struct tss_struct) + (unsigned long) tss; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 110 | wrmsr(MSR_IA32_SYSENTER_CS, __KERNEL_CS, 0); |
H. Peter Anvin | faca622 | 2008-01-30 13:31:02 +0100 | [diff] [blame] | 111 | wrmsr(MSR_IA32_SYSENTER_ESP, tss->x86_tss.sp1, 0); |
Roland McGrath | 0aa97fb22 | 2008-01-30 13:30:43 +0100 | [diff] [blame] | 112 | wrmsr(MSR_IA32_SYSENTER_EIP, (unsigned long) ia32_sysenter_target, 0); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 113 | put_cpu(); |
| 114 | } |
| 115 | |
Roland McGrath | af65d64 | 2008-01-30 13:30:43 +0100 | [diff] [blame] | 116 | #endif /* CONFIG_X86_64 */ |
| 117 | |
Jeremy Fitzhardinge | a6c4e07 | 2007-05-02 19:27:12 +0200 | [diff] [blame] | 118 | int __init sysenter_setup(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 119 | { |
Andy Lutomirski | b67e612 | 2014-03-20 15:01:21 -0700 | [diff] [blame] | 120 | char *vdso32_start, *vdso32_end; |
| 121 | int npages, i; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 122 | |
Andy Lutomirski | b67e612 | 2014-03-20 15:01:21 -0700 | [diff] [blame] | 123 | #ifdef CONFIG_COMPAT |
Jeremy Fitzhardinge | 6a52e4b | 2008-07-12 02:22:00 -0700 | [diff] [blame] | 124 | if (vdso32_syscall()) { |
Andy Lutomirski | b67e612 | 2014-03-20 15:01:21 -0700 | [diff] [blame] | 125 | vdso32_start = vdso32_syscall_start; |
| 126 | vdso32_end = vdso32_syscall_end; |
| 127 | vdso32_pages = vdso32_syscall_pages; |
| 128 | } else |
| 129 | #endif |
| 130 | if (vdso32_sysenter()) { |
| 131 | vdso32_start = vdso32_sysenter_start; |
| 132 | vdso32_end = vdso32_sysenter_end; |
| 133 | vdso32_pages = vdso32_sysenter_pages; |
Jeremy Fitzhardinge | 6a52e4b | 2008-07-12 02:22:00 -0700 | [diff] [blame] | 134 | } else { |
Andy Lutomirski | b67e612 | 2014-03-20 15:01:21 -0700 | [diff] [blame] | 135 | vdso32_start = vdso32_int80_start; |
| 136 | vdso32_end = vdso32_int80_end; |
| 137 | vdso32_pages = vdso32_int80_pages; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 138 | } |
| 139 | |
Andy Lutomirski | b67e612 | 2014-03-20 15:01:21 -0700 | [diff] [blame] | 140 | npages = ((vdso32_end - vdso32_start) + PAGE_SIZE - 1) / PAGE_SIZE; |
| 141 | vdso32_size = npages << PAGE_SHIFT; |
| 142 | for (i = 0; i < npages; i++) |
| 143 | vdso32_pages[i] = virt_to_page(vdso32_start + i*PAGE_SIZE); |
Stefani Seibold | 4e40112 | 2014-03-17 23:22:13 +0100 | [diff] [blame] | 144 | |
Andy Lutomirski | b67e612 | 2014-03-20 15:01:21 -0700 | [diff] [blame] | 145 | patch_vdso32(vdso32_start, vdso32_size); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 146 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 147 | return 0; |
| 148 | } |
Ingo Molnar | e6e5494 | 2006-06-27 02:53:50 -0700 | [diff] [blame] | 149 | |
Ingo Molnar | e6e5494 | 2006-06-27 02:53:50 -0700 | [diff] [blame] | 150 | /* Setup a VMA at program startup for the vsyscall page */ |
Martin Schwidefsky | fc5243d | 2008-12-25 13:38:35 +0100 | [diff] [blame] | 151 | int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) |
Ingo Molnar | e6e5494 | 2006-06-27 02:53:50 -0700 | [diff] [blame] | 152 | { |
Ingo Molnar | e6e5494 | 2006-06-27 02:53:50 -0700 | [diff] [blame] | 153 | struct mm_struct *mm = current->mm; |
| 154 | unsigned long addr; |
Zachary Amsden | 752783c | 2007-05-02 19:27:16 +0200 | [diff] [blame] | 155 | int ret = 0; |
Stefani Seibold | 7a59ed4 | 2014-03-17 23:22:09 +0100 | [diff] [blame] | 156 | struct vm_area_struct *vma; |
Ingo Molnar | e6e5494 | 2006-06-27 02:53:50 -0700 | [diff] [blame] | 157 | |
H. J. Lu | 1a21d4e | 2012-02-19 11:38:06 -0800 | [diff] [blame] | 158 | #ifdef CONFIG_X86_X32_ABI |
H. J. Lu | 1a21d4e | 2012-02-19 11:38:06 -0800 | [diff] [blame] | 159 | if (test_thread_flag(TIF_X32)) |
H. Peter Anvin | 22e842d | 2012-02-21 14:32:19 -0800 | [diff] [blame] | 160 | return x32_setup_additional_pages(bprm, uses_interp); |
H. J. Lu | 1a21d4e | 2012-02-19 11:38:06 -0800 | [diff] [blame] | 161 | #endif |
| 162 | |
Andy Lutomirski | b0b49f2 | 2014-03-13 16:01:26 -0700 | [diff] [blame] | 163 | if (vdso_enabled != 1) /* Other values all mean "disabled" */ |
Roland McGrath | 5de253c | 2008-04-09 01:30:06 -0700 | [diff] [blame] | 164 | return 0; |
| 165 | |
Ingo Molnar | e6e5494 | 2006-06-27 02:53:50 -0700 | [diff] [blame] | 166 | down_write(&mm->mmap_sem); |
Ingo Molnar | e6e5494 | 2006-06-27 02:53:50 -0700 | [diff] [blame] | 167 | |
Stefani Seibold | 645a387 | 2014-03-23 17:38:14 +0100 | [diff] [blame] | 168 | addr = get_unmapped_area(NULL, 0, vdso32_size + VDSO_OFFSET(VDSO_PREV_PAGES), 0, 0); |
Andy Lutomirski | b0b49f2 | 2014-03-13 16:01:26 -0700 | [diff] [blame] | 169 | if (IS_ERR_VALUE(addr)) { |
| 170 | ret = addr; |
| 171 | goto up_fail; |
Roland McGrath | af65d64 | 2008-01-30 13:30:43 +0100 | [diff] [blame] | 172 | } |
Jeremy Fitzhardinge | 1dbf527c | 2007-05-02 19:27:12 +0200 | [diff] [blame] | 173 | |
Stefani Seibold | 645a387 | 2014-03-23 17:38:14 +0100 | [diff] [blame] | 174 | addr += VDSO_OFFSET(VDSO_PREV_PAGES); |
| 175 | |
Peter Zijlstra | f7b6eb3 | 2009-06-05 14:04:51 +0200 | [diff] [blame] | 176 | current->mm->context.vdso = (void *)addr; |
| 177 | |
Andy Lutomirski | b0b49f2 | 2014-03-13 16:01:26 -0700 | [diff] [blame] | 178 | /* |
| 179 | * MAYWRITE to allow gdb to COW and set breakpoints |
| 180 | */ |
Stefani Seibold | 7a59ed4 | 2014-03-17 23:22:09 +0100 | [diff] [blame] | 181 | ret = install_special_mapping(mm, |
| 182 | addr, |
Andy Lutomirski | b67e612 | 2014-03-20 15:01:21 -0700 | [diff] [blame] | 183 | vdso32_size, |
Stefani Seibold | 7a59ed4 | 2014-03-17 23:22:09 +0100 | [diff] [blame] | 184 | VM_READ|VM_EXEC| |
| 185 | VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC, |
| 186 | vdso32_pages); |
Jeremy Fitzhardinge | 1dbf527c | 2007-05-02 19:27:12 +0200 | [diff] [blame] | 187 | |
Andy Lutomirski | b0b49f2 | 2014-03-13 16:01:26 -0700 | [diff] [blame] | 188 | if (ret) |
| 189 | goto up_fail; |
Ingo Molnar | e6e5494 | 2006-06-27 02:53:50 -0700 | [diff] [blame] | 190 | |
Stefani Seibold | 7a59ed4 | 2014-03-17 23:22:09 +0100 | [diff] [blame] | 191 | vma = _install_special_mapping(mm, |
| 192 | addr - VDSO_OFFSET(VDSO_PREV_PAGES), |
| 193 | VDSO_OFFSET(VDSO_PREV_PAGES), |
| 194 | VM_READ, |
| 195 | NULL); |
| 196 | |
| 197 | if (IS_ERR(vma)) { |
| 198 | ret = PTR_ERR(vma); |
| 199 | goto up_fail; |
| 200 | } |
| 201 | |
| 202 | ret = remap_pfn_range(vma, |
| 203 | addr - VDSO_OFFSET(VDSO_VVAR_PAGE), |
| 204 | __pa_symbol(&__vvar_page) >> PAGE_SHIFT, |
| 205 | PAGE_SIZE, |
| 206 | PAGE_READONLY); |
| 207 | |
| 208 | if (ret) |
| 209 | goto up_fail; |
| 210 | |
| 211 | #ifdef CONFIG_HPET_TIMER |
| 212 | if (hpet_address) { |
| 213 | ret = io_remap_pfn_range(vma, |
| 214 | addr - VDSO_OFFSET(VDSO_HPET_PAGE), |
| 215 | hpet_address >> PAGE_SHIFT, |
| 216 | PAGE_SIZE, |
| 217 | pgprot_noncached(PAGE_READONLY)); |
| 218 | |
| 219 | if (ret) |
| 220 | goto up_fail; |
| 221 | } |
| 222 | #endif |
| 223 | |
Ingo Molnar | e6e5494 | 2006-06-27 02:53:50 -0700 | [diff] [blame] | 224 | current_thread_info()->sysenter_return = |
Roland McGrath | 6c3652e | 2008-01-30 13:30:42 +0100 | [diff] [blame] | 225 | VDSO32_SYMBOL(addr, SYSENTER_RETURN); |
Jeremy Fitzhardinge | 1dbf527c | 2007-05-02 19:27:12 +0200 | [diff] [blame] | 226 | |
| 227 | up_fail: |
Peter Zijlstra | f7b6eb3 | 2009-06-05 14:04:51 +0200 | [diff] [blame] | 228 | if (ret) |
| 229 | current->mm->context.vdso = NULL; |
| 230 | |
Ingo Molnar | e6e5494 | 2006-06-27 02:53:50 -0700 | [diff] [blame] | 231 | up_write(&mm->mmap_sem); |
Jeremy Fitzhardinge | 1dbf527c | 2007-05-02 19:27:12 +0200 | [diff] [blame] | 232 | |
Ingo Molnar | e6e5494 | 2006-06-27 02:53:50 -0700 | [diff] [blame] | 233 | return ret; |
Ingo Molnar | e6e5494 | 2006-06-27 02:53:50 -0700 | [diff] [blame] | 234 | } |
| 235 | |
Roland McGrath | af65d64 | 2008-01-30 13:30:43 +0100 | [diff] [blame] | 236 | #ifdef CONFIG_X86_64 |
| 237 | |
Jiri Slaby | d7a0380 | 2010-06-16 22:30:42 +0200 | [diff] [blame] | 238 | subsys_initcall(sysenter_setup); |
Roland McGrath | af65d64 | 2008-01-30 13:30:43 +0100 | [diff] [blame] | 239 | |
Roland McGrath | a97f52e | 2008-01-30 13:31:55 +0100 | [diff] [blame] | 240 | #ifdef CONFIG_SYSCTL |
| 241 | /* Register vsyscall32 into the ABI table */ |
| 242 | #include <linux/sysctl.h> |
| 243 | |
Joe Perches | f07d91e | 2013-06-13 19:37:33 -0700 | [diff] [blame] | 244 | static struct ctl_table abi_table2[] = { |
Roland McGrath | a97f52e | 2008-01-30 13:31:55 +0100 | [diff] [blame] | 245 | { |
| 246 | .procname = "vsyscall32", |
| 247 | .data = &sysctl_vsyscall32, |
| 248 | .maxlen = sizeof(int), |
| 249 | .mode = 0644, |
| 250 | .proc_handler = proc_dointvec |
| 251 | }, |
| 252 | {} |
| 253 | }; |
| 254 | |
Joe Perches | f07d91e | 2013-06-13 19:37:33 -0700 | [diff] [blame] | 255 | static struct ctl_table abi_root_table2[] = { |
Roland McGrath | a97f52e | 2008-01-30 13:31:55 +0100 | [diff] [blame] | 256 | { |
Roland McGrath | a97f52e | 2008-01-30 13:31:55 +0100 | [diff] [blame] | 257 | .procname = "abi", |
| 258 | .mode = 0555, |
| 259 | .child = abi_table2 |
| 260 | }, |
| 261 | {} |
| 262 | }; |
| 263 | |
| 264 | static __init int ia32_binfmt_init(void) |
| 265 | { |
| 266 | register_sysctl_table(abi_root_table2); |
| 267 | return 0; |
| 268 | } |
| 269 | __initcall(ia32_binfmt_init); |
| 270 | #endif |
| 271 | |
Roland McGrath | af65d64 | 2008-01-30 13:30:43 +0100 | [diff] [blame] | 272 | #else /* CONFIG_X86_32 */ |
| 273 | |
Ingo Molnar | e6e5494 | 2006-06-27 02:53:50 -0700 | [diff] [blame] | 274 | const char *arch_vma_name(struct vm_area_struct *vma) |
| 275 | { |
| 276 | if (vma->vm_mm && vma->vm_start == (long)vma->vm_mm->context.vdso) |
| 277 | return "[vdso]"; |
| 278 | return NULL; |
| 279 | } |
| 280 | |
Stephen Wilson | 31db58b | 2011-03-13 15:49:15 -0400 | [diff] [blame] | 281 | struct vm_area_struct *get_gate_vma(struct mm_struct *mm) |
Ingo Molnar | e6e5494 | 2006-06-27 02:53:50 -0700 | [diff] [blame] | 282 | { |
| 283 | return NULL; |
| 284 | } |
| 285 | |
Stephen Wilson | 83b964b | 2011-03-13 15:49:16 -0400 | [diff] [blame] | 286 | int in_gate_area(struct mm_struct *mm, unsigned long addr) |
Ingo Molnar | e6e5494 | 2006-06-27 02:53:50 -0700 | [diff] [blame] | 287 | { |
Andy Lutomirski | b0b49f2 | 2014-03-13 16:01:26 -0700 | [diff] [blame] | 288 | return 0; |
Ingo Molnar | e6e5494 | 2006-06-27 02:53:50 -0700 | [diff] [blame] | 289 | } |
| 290 | |
Stephen Wilson | cae5d39 | 2011-03-13 15:49:17 -0400 | [diff] [blame] | 291 | int in_gate_area_no_mm(unsigned long addr) |
Ingo Molnar | e6e5494 | 2006-06-27 02:53:50 -0700 | [diff] [blame] | 292 | { |
| 293 | return 0; |
| 294 | } |
Roland McGrath | af65d64 | 2008-01-30 13:30:43 +0100 | [diff] [blame] | 295 | |
| 296 | #endif /* CONFIG_X86_64 */ |