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] [day] [month] [year] [list]
Message-ID: <6fecf875-260e-a9c5-df24-9b0d13970057@huawei.com>
Date:   Sat, 16 Jul 2022 09:32:54 +0800
From:   Miaohe Lin <linmiaohe@...wei.com>
To:     Axel Rasmussen <axelrasmussen@...gle.com>,
        Peter Xu <peterx@...hat.com>
CC:     Andrew Morton <akpm@...ux-foundation.org>,
        Mike Kravetz <mike.kravetz@...cle.com>,
        Muchun Song <songmuchun@...edance.com>,
        Linux MM <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm/hugetlb: avoid corrupting page->mapping in
 hugetlb_mcopy_atomic_pte

On 2022/7/16 1:51, Axel Rasmussen wrote:
> On Fri, Jul 15, 2022 at 10:39 AM Peter Xu <peterx@...hat.com> wrote:
>>
>> On Fri, Jul 15, 2022 at 10:28:44AM -0700, Axel Rasmussen wrote:
>>> On Fri, Jul 15, 2022 at 10:07 AM Peter Xu <peterx@...hat.com> wrote:
>>>>
>>>> On Fri, Jul 15, 2022 at 09:45:37AM -0700, Axel Rasmussen wrote:
>>>>> I agree we should either:
>>>>> - Update the UFFD selftest to exercise this case
>>>>> - Or, don't allow it, update vma_can_userfault() to also require VM_SHARED
>>>>> for VM_UFFD_MINOR registration.
>>>>>
>>>>> The first one is unfortunately not completely straightforward as Peter
>>>>> described. I would say it's probably not worth holding up this fix while we
>>>>> wait for it to happen?
>>>>
>>>> Agreed, Andrew has already queued it.  It actually is a real fix since we
>>>> never forbid the user running private mappings upon minor faults, so
>>>> it's literally a bug in kernel irrelevant of the kselftest.
>>>>
>>>>>
>>>>> I don't really have a strong preference between the two. The second option
>>>>> is what I originally proposed in the first version of the minor fault
>>>>> series, so going back to that isn't a problem at least from my perspective.
>>>>> If in the future we find a real use case for this, we could always easily
>>>>> re-enable it and add selftests for it at that point.
>>>>
>>>> I'd go for fixing the test case if possible.  Mike, would it be fine if we
>>>> go back to /dev/hugepages path based approach in the test case?
>>>
>>> One possible alternative, can we use memfd_create() with MFD_HUGE_*?
>>> This afaict lets us have an fd so we can create two mappings,
>>> without having to mount hugetlbfs, pass in a path to the test, ...
>>
>> Sounds good. :) We can also rework the shared hugetlb too.  Wanna post a
>> patch?  I can do that too, let me know otherwise.  Thanks!
> 
> Sure, I'll take a whack at it.

Many thanks for all of your hard work. :)

> 
>>
>> --
>> Peter Xu
>>
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ