lkml.org 
[lkml]   [2020]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] mm/userfaultfd: fix memory corruption due to writeprotect
    Hello,

    On Sat, Dec 19, 2020 at 09:08:55PM -0800, Andy Lutomirski wrote:
    > On Sat, Dec 19, 2020 at 6:49 PM Andrea Arcangeli <aarcange@redhat.com> wrote:
    > > The ptes are changed always with the PT lock, in fact there's no
    > > problem with the PTE updates. The only difference with mprotect
    > > runtime is that the mmap_lock is taken for reading. And the effect
    > > contested for this change doesn't affect the PTE, but supposedly the
    > > tlb flushing deferral.
    >
    > Can you point me at where the lock ends up being taken in this path?

    pte_offset_map_lock in change_pte_range, as in mprotect, no difference.

    As I suspected on my follow up, the bug described wasn't there, but
    I'll look at the new theory posted.

    Thanks,
    Andrea

    \
     
     \ /
      Last update: 2020-12-21 19:06    [W:6.763 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site