lkml.org 
[lkml]   [2020]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 5/5] arm64/vdso: Restrict splitting VVAR VMA
From
Date
Hi Andrei,

On 2/23/20 11:30 PM, Andrei Vagin wrote:
[...]

>
> Hmmm. I have read the code of special_mapping_mremap() and I don't see where
> it restricts splitting the vvar mapping.
>
> Here is the code what I see in the source:
>
> static int special_mapping_mremap(struct vm_area_struct *new_vma)
> {
> struct vm_special_mapping *sm = new_vma->vm_private_data;
>
> if (WARN_ON_ONCE(current->mm != new_vma->vm_mm))
> return -EFAULT;
>
> if (sm->mremap)
> return sm->mremap(sm, new_vma);
>
> return 0;
> }
>
> And I have checked that without this patch, I can remap only one page of
> the vvar mapping.
>

I checked it a second time and I agree. The check on new_size is required in
this case.

> Thanks,
> Andrei
>

--
Regards,
Vincenzo

\
 
 \ /
  Last update: 2020-02-24 11:08    [W:0.059 / U:2.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site