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: <91213616-1e7c-4e75-aee7-862b68c23ab6@redhat.com>
Date: Fri, 4 Jul 2025 12:45:29 +0200
From: David Hildenbrand <david@...hat.com>
To: Oscar Salvador <osalvador@...e.de>,
 Andrew Morton <akpm@...ux-foundation.org>
Cc: Muchun Song <muchun.song@...ux.dev>, Peter Xu <peterx@...hat.com>,
 Gavin Guo <gavinguo@...lia.com>, linux-mm@...ck.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 2/5] mm,hugetlb: sort out folio locking in the faulting
 path

On 30.06.25 16:42, Oscar Salvador wrote:
> Recent conversations showed that there was a misunderstanding about why we
> were locking the folio prior to call in hugetlb_wp().  In fact, as soon as
> we have the folio mapped into the pagetables, we no longer need to hold it
> locked, because we know that no concurrent truncation could have happened.
> 
> There is only one case where the folio needs to be locked, and that is
> when we are handling an anonymous folio, because hugetlb_wp() will check
> whether it can re-use it exclusively for the process that is faulting it
> in.
> 
> So, pass the folio locked to hugetlb_wp() when that is the case.
> 
> Link: https://lkml.kernel.org/r/20250627102904.107202-3-osalvador@suse.de
> Signed-off-by: Oscar Salvador <osalvador@...e.de>
> Suggested-by: David Hildenbrand <david@...hat.com>
> Cc: Gavin Guo <gavinguo@...lia.com>
> Cc: Muchun Song <muchun.song@...ux.dev>
> Cc: Peter Xu <peterx@...hat.com>
> Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
> ---

Acked-by: David Hildenbrand <david@...hat.com>

-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ