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]
Date:   Mon, 15 May 2023 00:44:18 +0000
From:   "Chang, Junxiao" <junxiao.chang@...el.com>
To:     Mike Kravetz <mike.kravetz@...cle.com>,
        James Houghton <jthoughton@...gle.com>
CC:     "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>,
        "Hocko, Michal" <mhocko@...e.com>,
        "jmarchan@...hat.com" <jmarchan@...hat.com>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "muchun.song@...ux.dev" <muchun.song@...ux.dev>
Subject: RE: [PATCH] mm: fix hugetlb page unmap count balance issue

With James' patch, udmabuf driver might meet VM BUG? Since its compound is false and folio_test_hugetlb(folio) is true:
	if (likely(!compound)) {
+		if (unlikely(folio_test_hugetlb(folio)))
+			VM_BUG_ON_PAGE(HPageVmemmapOptimized(&folio->page),
+				       page);

It is better to notice udmabuf driver owner before merging James's https://lore.kernel.org/linux-mm/20230306230004.1387007-2-jthoughton@google.com/?

Thanks,
Junxiao

-----Original Message-----
From: Mike Kravetz <mike.kravetz@...cle.com> 
Sent: Saturday, May 13, 2023 7:30 AM
To: James Houghton <jthoughton@...gle.com>
Cc: Chang, Junxiao <junxiao.chang@...el.com>; akpm@...ux-foundation.org; kirill.shutemov@...ux.intel.com; Hocko, Michal <mhocko@...e.com>; jmarchan@...hat.com; linux-mm@...ck.org; linux-kernel@...r.kernel.org; muchun.song@...ux.dev
Subject: Re: [PATCH] mm: fix hugetlb page unmap count balance issue

On 05/12/23 14:26, James Houghton wrote:
> On Fri, May 12, 2023 at 12:20 AM Junxiao Chang <junxiao.chang@...el.com> wrote:
> 
> This alone doesn't fix mapcounting for PTE-mapped HugeTLB pages. You 
> need something like [1]. I can resend it if that's what we should be 
> doing, but this mapcounting scheme doesn't work when the page structs 
> have been freed.
> 
> It seems like it was a mistake to include support for hugetlb memfds in udmabuf.

IIUC, it was added with commit 16c243e99d33 udmabuf: Add support for mapping hugepages (v4).  Looks like it was never sent to linux-mm?  That is unfortunate as hugetlb vmemmap freeing went in at about the same time.  And, as you have noted udmabuf will not work if hugetlb vmemmap freeing is enabled.

Sigh!

Trying to think of a way forward.
--
Mike Kravetz

> 
> [1]: 
> https://lore.kernel.org/linux-mm/20230306230004.1387007-2-jthoughton@g
> oogle.com/
> 
> - James

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ