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: <baf2edec-f3fa-444d-8365-4adecef99e72@oracle.com>
Date: Mon, 15 Sep 2025 09:52:51 -0700
From: jane.chu@...cle.com
To: David Hildenbrand <david@...hat.com>, harry.yoo@...cle.com,
        osalvador@...e.de, liushixin2@...wei.com, muchun.song@...ux.dev,
        akpm@...ux-foundation.org, jannh@...gle.com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] mm/hugetlb: fix copy_hugetlb_page_range() to use
 ->pt_share_count



On 9/12/2025 12:32 AM, David Hildenbrand wrote:
> On 11.09.25 21:58, jane.chu@...cle.com wrote:
>>
>>
>> On 9/11/2025 1:17 AM, David Hildenbrand wrote:
>> [..]
>>>>
>>>> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
>>>> index 753f99b4c718..8ca5b4f7805f 100644
>>>> --- a/mm/hugetlb.c
>>>> +++ b/mm/hugetlb.c
>>>> @@ -5594,18 +5594,13 @@ int copy_hugetlb_page_range(struct mm_struct
>>>> *dst, struct mm_struct *src,
>>>>                break;
>>>>            }
>>>> -        /*
>>>> -         * If the pagetables are shared don't copy or take references.
>>>> -         *
>>>> -         * dst_pte == src_pte is the common case of src/dest sharing.
>>>> -         * However, src could have 'unshared' and dst shares with
>>>> -         * another vma. So page_count of ptep page is checked instead
>>>> -         * to reliably determine whether pte is shared.
>>>> -         */
>>>
>>> I think you ignored my question to v1 regarding the change of comment.
>>>
>>
>> Sorry David, didn't mean disrespect, I missed your earlier comments.
> 
> No worries. Replied there about possibly simplifying the comment further.
> 
> BTW, I think the code would be even clearer if we would have
> 
> ptdesc_pmd_is_shared()
> 
> that is simply a wrapper around the ptdesc_pmd_pts_count() check.

Agreed, will add ptdesc_pmd_is_shared().

thanks a lot!

-jane>



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ