|
@@ -307,6 +307,8 @@ struct vm_area_struct *get_gate_vma(struct mm_struct *mm)
|
|
|
if (!mm || mm->context.ia32_compat)
|
|
|
return NULL;
|
|
|
#endif
|
|
|
+ if (vsyscall_mode == NONE)
|
|
|
+ return NULL;
|
|
|
return &gate_vma;
|
|
|
}
|
|
|
|
|
@@ -327,7 +329,7 @@ int in_gate_area(struct mm_struct *mm, unsigned long addr)
|
|
|
*/
|
|
|
int in_gate_area_no_mm(unsigned long addr)
|
|
|
{
|
|
|
- return (addr & PAGE_MASK) == VSYSCALL_ADDR;
|
|
|
+ return vsyscall_mode != NONE && (addr & PAGE_MASK) == VSYSCALL_ADDR;
|
|
|
}
|
|
|
|
|
|
void __init map_vsyscall(void)
|
|
@@ -335,10 +337,12 @@ void __init map_vsyscall(void)
|
|
|
extern char __vsyscall_page;
|
|
|
unsigned long physaddr_vsyscall = __pa_symbol(&__vsyscall_page);
|
|
|
|
|
|
- __set_fixmap(VSYSCALL_PAGE, physaddr_vsyscall,
|
|
|
- vsyscall_mode == NATIVE
|
|
|
- ? PAGE_KERNEL_VSYSCALL
|
|
|
- : PAGE_KERNEL_VVAR);
|
|
|
+ if (vsyscall_mode != NONE)
|
|
|
+ __set_fixmap(VSYSCALL_PAGE, physaddr_vsyscall,
|
|
|
+ vsyscall_mode == NATIVE
|
|
|
+ ? PAGE_KERNEL_VSYSCALL
|
|
|
+ : PAGE_KERNEL_VVAR);
|
|
|
+
|
|
|
BUILD_BUG_ON((unsigned long)__fix_to_virt(VSYSCALL_PAGE) !=
|
|
|
(unsigned long)VSYSCALL_ADDR);
|
|
|
}
|