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: <CAOUHufbkcdyg8RAEa08DvKE=+bsxjuReiP4iscTV99sZ1oBQ2g@mail.gmail.com>
Date:   Thu, 20 Oct 2022 16:18:37 -0600
From:   Yu Zhao <yuzhao@...gle.com>
To:     Saurabh Sengar <ssengar@...ux.microsoft.com>
Cc:     ssengar@...rosoft.com, akpm@...ux-foundation.org, jack@...e.cz,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        jostarks@...rosoft.com, Matthew Wilcox <willy@...radead.org>,
        Dan Williams <dan.j.williams@...el.com>
Subject: Re: [PATCH] mm/gup: fix gup_pud_range() for dax

On Thu, Oct 20, 2022 at 12:14 PM Saurabh Sengar
<ssengar@...ux.microsoft.com> wrote:
>
> From: John Starks <jostarks@...rosoft.com>
>
> For dax pud, pud_huge() returns true on x86. So the function works as long
> as hugetlb is configured. However, dax doesn't depend on hugetlb.
> Commit 414fd080d125 ("mm/gup: fix gup_pmd_range() for dax") fixed
> devmap-backed huge PMDs, but missed devmap-backed huge PUDs. Fix this as
> well.
>
> Fixes: 414fd080d125 ("mm/gup: fix gup_pmd_range() for dax")
> Signed-off-by: John Starks <jostarks@...rosoft.com>
> Signed-off-by: Saurabh Sengar <ssengar@...ux.microsoft.com>
> ---
>  mm/gup.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/gup.c b/mm/gup.c
> index 05068d3d2557..9e07aa54a4cd 100644
> --- a/mm/gup.c
> +++ b/mm/gup.c
> @@ -2687,7 +2687,7 @@ static int gup_pud_range(p4d_t *p4dp, p4d_t p4d, unsigned long addr, unsigned lo
>                 next = pud_addr_end(addr, end);
>                 if (unlikely(!pud_present(pud)))
>                         return 0;
> -               if (unlikely(pud_huge(pud))) {
> +               if (unlikely(pud_huge(pud) || pud_devmap(pud))) {

Perhaps s/pud_huge/pud_leaf/ ?

>                         if (!gup_huge_pud(pud, pudp, addr, next, flags,
>                                           pages, nr))
>                                 return 0;
> --
> 2.25.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ