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: <915e2f40-b94a-cef4-7aa7-a402e93dae68@redhat.com>
Date:   Tue, 9 Aug 2022 22:23:49 +0200
From:   David Hildenbrand <david@...hat.com>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        stable@...r.kernel.org, Andrew Morton <akpm@...ux-foundation.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Axel Rasmussen <axelrasmussen@...gle.com>,
        Peter Xu <peterx@...hat.com>, Hugh Dickins <hughd@...gle.com>,
        Andrea Arcangeli <aarcange@...hat.com>,
        Matthew Wilcox <willy@...radead.org>,
        Vlastimil Babka <vbabka@...e.cz>,
        John Hubbard <jhubbard@...dia.com>,
        Jason Gunthorpe <jgg@...dia.com>
Subject: Re: [PATCH v1] mm/gup: fix FOLL_FORCE COW security issue and remove
 FOLL_COW

On 09.08.22 22:20, Linus Torvalds wrote:
> On Tue, Aug 9, 2022 at 1:14 PM Linus Torvalds
> <torvalds@...ux-foundation.org> wrote:
>>
>> But as there are two bits, I'm sure somebody ends up touching one and
>> not the other.
> 
> Ugh. The nommu code certainly does odd things here. That just looks wrong.
> 
> And the hugetlb code does something horrible too, but never *sets* it,
> so it looks like some odd subset of VM_SHARED.

mm/mmap.c:do_mmap() contains the magic bit

switch (flags & MAP_TYPE) {
case MAP_SHARED:
...
case MAP_SHARED_VALIDATE:
...
vm_flags |= VM_SHARED | VM_MAYSHARE;
if (!(file->f_mode & FMODE_WRITE))
	vm_flags &= ~(VM_MAYWRITE | VM_SHARED);
fallthrough;


VM_SHARED semantics are confusing.


-- 
Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ