|
@@ -110,12 +110,27 @@ int aarch32_setup_vectors_page(struct linux_binprm *bprm, int uses_interp)
|
|
|
}
|
|
|
#endif /* CONFIG_COMPAT */
|
|
|
|
|
|
+static int vdso_mremap(const struct vm_special_mapping *sm,
|
|
|
+ struct vm_area_struct *new_vma)
|
|
|
+{
|
|
|
+ unsigned long new_size = new_vma->vm_end - new_vma->vm_start;
|
|
|
+ unsigned long vdso_size = vdso_end - vdso_start;
|
|
|
+
|
|
|
+ if (vdso_size != new_size)
|
|
|
+ return -EINVAL;
|
|
|
+
|
|
|
+ current->mm->context.vdso = (void *)new_vma->vm_start;
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
static struct vm_special_mapping vdso_spec[2] __ro_after_init = {
|
|
|
{
|
|
|
.name = "[vvar]",
|
|
|
},
|
|
|
{
|
|
|
.name = "[vdso]",
|
|
|
+ .mremap = vdso_mremap,
|
|
|
},
|
|
|
};
|
|
|
|