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:   Fri, 28 Sep 2018 15:36:49 -0700
From:   Dan Williams <dan.j.williams@...el.com>
To:     yang.shi@...ux.alibaba.com
Cc:     Jan Kara <jack@...e.cz>,
        Ross Zwisler <ross.zwisler@...ux.intel.com>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linux MM <linux-mm@...ck.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm: enforce THP for VM_NOHUGEPAGE dax mappings

On Fri, Sep 28, 2018 at 3:34 PM <yang.shi@...ux.alibaba.com> wrote:
>
> commit baabda261424517110ea98c6651f632ebf2561e3 ("mm: always enable thp
> for dax mappings") says madvise hguepage policy makes less sense for
> dax, and force enabling thp for dax mappings in all cases, even though
> THP is set to "never".
>
> However, transparent_hugepage_enabled() may return false if
> VM_NOHUGEPAGE is set even though the mapping is dax.
>
> So, move is_vma_dax() check to the very beginning to enforce THP for dax
> mappings in all cases.
>
> Cc: Dan Williams <dan.j.williams@...el.com>
> Cc: Jan Kara <jack@...e.cz>
> Cc: Ross Zwisler <ross.zwisler@...ux.intel.com>
> Cc: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
> Signed-off-by: Yang Shi <yang.shi@...ux.alibaba.com>
> ---
> I didn't find anyone mention the check should be before VM_NOHUGEPAGE in
> the review for Dan's original patch. And, that patch commit log states
> clearly that THP for dax mapping for all cases even though THP is never.
> So, I'm supposed it should behave in this way.

No, if someone explicitly does MADV_NOHUGEPAGE then the kernel should
honor that, even if the mapping is DAX.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ