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: <CADrL8HWLCL1p2x1rgvX1Bc5UEupjMqjud0fKGys-TpKUTCeVcw@mail.gmail.com>
Date:   Thu, 12 Jan 2023 15:07:53 -0500
From:   James Houghton <jthoughton@...gle.com>
To:     Mike Kravetz <mike.kravetz@...cle.com>,
        Muchun Song <songmuchun@...edance.com>,
        Peter Xu <peterx@...hat.com>
Cc:     David Hildenbrand <david@...hat.com>,
        David Rientjes <rientjes@...gle.com>,
        Axel Rasmussen <axelrasmussen@...gle.com>,
        Mina Almasry <almasrymina@...gle.com>,
        "Zach O'Keefe" <zokeefe@...gle.com>,
        Manish Mishra <manish.mishra@...anix.com>,
        Naoya Horiguchi <naoya.horiguchi@....com>,
        "Dr . David Alan Gilbert" <dgilbert@...hat.com>,
        "Matthew Wilcox (Oracle)" <willy@...radead.org>,
        Vlastimil Babka <vbabka@...e.cz>,
        Baolin Wang <baolin.wang@...ux.alibaba.com>,
        Miaohe Lin <linmiaohe@...wei.com>,
        Yang Shi <shy828301@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 39/46] hugetlb: x86: enable high-granularity mapping

On Thu, Jan 5, 2023 at 5:19 AM James Houghton <jthoughton@...gle.com> wrote:
>
> Now that HGM is fully supported for GENERAL_HUGETLB, x86 can enable it.
> The x86 KVM MMU already properly handles HugeTLB HGM pages (it does a
> page table walk to determine which size to use in the second-stage page
> table instead of, for example, checking vma_mmu_pagesize, like arm64
> does).
>
> We could also enable HugeTLB HGM for arm (32-bit) at this point, as it
> also uses GENERAL_HUGETLB and I don't see anything else that is needed
> for it. However, I haven't tested on arm at all, so I won't enable it.

Given that we are using a high bit for VM_HUGETLB_HGM, we can only
support 64-bit architectures. Userfaultfd minor faults is limited to
64-bit architectures for the same reason: VM_UFFD_MINOR uses a bit.

>
> Signed-off-by: James Houghton <jthoughton@...gle.com>
> ---
>  arch/x86/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 3604074a878b..3d08cd45549c 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -126,6 +126,7 @@ config X86
>         select ARCH_WANT_GENERAL_HUGETLB
>         select ARCH_WANT_HUGE_PMD_SHARE
>         select ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP  if X86_64
> +       select ARCH_WANT_HUGETLB_HIGH_GRANULARITY_MAPPING

This needs `if X86_64` at the end. Will be corrected for v2.

>         select ARCH_WANT_LD_ORPHAN_WARN
>         select ARCH_WANTS_THP_SWAP              if X86_64
>         select ARCH_HAS_PARANOID_L1D_FLUSH
> --
> 2.39.0.314.g84b9a713c41-goog
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ