Re: [RFC v7 PATCH 4/4] mm: unmap special vmas with regular do_munmap()

2018-08-10 Thread Yang Shi
On 8/10/18 3:46 AM, Vlastimil Babka wrote: On 08/10/2018 01:36 AM, Yang Shi wrote: Unmapping vmas, which have VM_HUGETLB | VM_PFNMAP flag set or have uprobes set, need get done with write mmap_sem held since they may update vm_flags. So, it might be not safe enough to deal with these kind

Re: [RFC v7 PATCH 4/4] mm: unmap special vmas with regular do_munmap()

2018-08-10 Thread Yang Shi
On 8/10/18 3:46 AM, Vlastimil Babka wrote: On 08/10/2018 01:36 AM, Yang Shi wrote: Unmapping vmas, which have VM_HUGETLB | VM_PFNMAP flag set or have uprobes set, need get done with write mmap_sem held since they may update vm_flags. So, it might be not safe enough to deal with these kind

Re: [RFC v7 PATCH 4/4] mm: unmap special vmas with regular do_munmap()

2018-08-10 Thread Yang Shi
On 8/10/18 2:51 AM, Vlastimil Babka wrote: On 08/10/2018 01:36 AM, Yang Shi wrote: Unmapping vmas, which have VM_HUGETLB | VM_PFNMAP flag set or have uprobes set, need get done with write mmap_sem held since they may update vm_flags. So, it might be not safe enough to deal with these kind

Re: [RFC v7 PATCH 4/4] mm: unmap special vmas with regular do_munmap()

2018-08-10 Thread Yang Shi
On 8/10/18 2:51 AM, Vlastimil Babka wrote: On 08/10/2018 01:36 AM, Yang Shi wrote: Unmapping vmas, which have VM_HUGETLB | VM_PFNMAP flag set or have uprobes set, need get done with write mmap_sem held since they may update vm_flags. So, it might be not safe enough to deal with these kind

Re: [RFC v7 PATCH 4/4] mm: unmap special vmas with regular do_munmap()

2018-08-10 Thread Michal Hocko
On Fri 10-08-18 11:51:54, Vlastimil Babka wrote: > On 08/10/2018 01:36 AM, Yang Shi wrote: > > Unmapping vmas, which have VM_HUGETLB | VM_PFNMAP flag set or > > have uprobes set, need get done with write mmap_sem held since > > they may update vm_flags. > > > > So, it might be not safe enough to

Re: [RFC v7 PATCH 4/4] mm: unmap special vmas with regular do_munmap()

2018-08-10 Thread Michal Hocko
On Fri 10-08-18 11:51:54, Vlastimil Babka wrote: > On 08/10/2018 01:36 AM, Yang Shi wrote: > > Unmapping vmas, which have VM_HUGETLB | VM_PFNMAP flag set or > > have uprobes set, need get done with write mmap_sem held since > > they may update vm_flags. > > > > So, it might be not safe enough to

Re: [RFC v7 PATCH 4/4] mm: unmap special vmas with regular do_munmap()

2018-08-10 Thread Vlastimil Babka
On 08/10/2018 01:36 AM, Yang Shi wrote: > Unmapping vmas, which have VM_HUGETLB | VM_PFNMAP flag set or > have uprobes set, need get done with write mmap_sem held since > they may update vm_flags. > > So, it might be not safe enough to deal with these kind of special > mappings with read

Re: [RFC v7 PATCH 4/4] mm: unmap special vmas with regular do_munmap()

2018-08-10 Thread Vlastimil Babka
On 08/10/2018 01:36 AM, Yang Shi wrote: > Unmapping vmas, which have VM_HUGETLB | VM_PFNMAP flag set or > have uprobes set, need get done with write mmap_sem held since > they may update vm_flags. > > So, it might be not safe enough to deal with these kind of special > mappings with read

Re: [RFC v7 PATCH 4/4] mm: unmap special vmas with regular do_munmap()

2018-08-10 Thread Vlastimil Babka
On 08/10/2018 01:36 AM, Yang Shi wrote: > Unmapping vmas, which have VM_HUGETLB | VM_PFNMAP flag set or > have uprobes set, need get done with write mmap_sem held since > they may update vm_flags. > > So, it might be not safe enough to deal with these kind of special > mappings with read

Re: [RFC v7 PATCH 4/4] mm: unmap special vmas with regular do_munmap()

2018-08-10 Thread Vlastimil Babka
On 08/10/2018 01:36 AM, Yang Shi wrote: > Unmapping vmas, which have VM_HUGETLB | VM_PFNMAP flag set or > have uprobes set, need get done with write mmap_sem held since > they may update vm_flags. > > So, it might be not safe enough to deal with these kind of special > mappings with read

[RFC v7 PATCH 4/4] mm: unmap special vmas with regular do_munmap()

2018-08-09 Thread Yang Shi
Unmapping vmas, which have VM_HUGETLB | VM_PFNMAP flag set or have uprobes set, need get done with write mmap_sem held since they may update vm_flags. So, it might be not safe enough to deal with these kind of special mappings with read mmap_sem. Deal with such mappings with regular do_munmap()

[RFC v7 PATCH 4/4] mm: unmap special vmas with regular do_munmap()

2018-08-09 Thread Yang Shi
Unmapping vmas, which have VM_HUGETLB | VM_PFNMAP flag set or have uprobes set, need get done with write mmap_sem held since they may update vm_flags. So, it might be not safe enough to deal with these kind of special mappings with read mmap_sem. Deal with such mappings with regular do_munmap()