lkml.org 
[lkml]   [2018]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC v8 PATCH 3/5] mm: mmap: zap pages with read mmap_sem in munmap
From
Date
On 08/22/2018 02:10 PM, Kirill A. Shutemov wrote:
>> For x86, mpx_notify_unmap() looks finally zap the VM_MPX vmas in bound table
>> range with zap_page_range() and doesn't update vm flags, so it sounds ok to
>> me since vmas have been detached, nobody can find those vmas. But, I'm not
>> familiar with the details of mpx, maybe Kirill could help to confirm this?
> I don't see anything obviously dependent on down_write() in
> mpx_notify_unmap(), but Dave should know better.

We need mmap_sem for write in mpx_notify_unmap().

Its job is to clean up bounds tables, but bounds tables are dynamically
allocated and destroyed by the kernel. When we destroy a table, we also
destroy the VMA for the bounds table *itself*, separate from the VMA
being unmapped.

But, this code is very likely to go away soon. If it's causing a
problem for you, let me know and I'll see if I can get to removing it
faster.

\
 
 \ /
  Last update: 2018-08-22 23:42    [W:0.679 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site