lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABV8kRwUvNjyYPc3+yjQ6pzXoJj9HM3K4Mq_1cZc9sWzpjPEzQ@mail.gmail.com>
Date:   Thu, 5 Jan 2017 16:06:06 -0500
From:   Keno Fischer <keno@...iacomputing.com>
To:     "Kirill A. Shutemov" <kirill@...temov.name>
Cc:     linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        torvalds@...ux-foundation.org, Greg Thelen <gthelen@...gle.com>,
        npiggin@...il.com, Willy Tarreau <w@....eu>,
        Oleg Nesterov <oleg@...hat.com>,
        Kees Cook <keescook@...omium.org>, luto@...nel.org,
        mhocko@...e.com, Hugh Dickins <hughd@...gle.com>
Subject: Re: [PATCH] mm: Respect FOLL_FORCE/FOLL_COW for thp

>> @@ -783,7 +793,7 @@ struct page *follow_devmap_pmd(struct vm_area_struct *vma, unsigned long addr,
>>
>>       assert_spin_locked(pmd_lockptr(mm, pmd));
>>
>> -     if (flags & FOLL_WRITE && !pmd_write(*pmd))
>> +     if (flags & FOLL_WRITE && !can_follow_write_pmd(*pmd, flags))
>>               return NULL;
>
> I don't think this part is needed: once we COW devmap PMD entry, we split
> it into PTE table, so IIUC we never get here with PMD.
>
> Maybe we should WARN_ONCE() if have FOLL_COW here.

Sounds good to me. As I said, I don't have a testcase for this code
path, I just noticed the same pattern.
Will send an updated patch with the WARN_ONCE there.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ