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: <2804a1d0-9d68-ac43-3041-9490147b52b5@oracle.com>
Date:   Wed, 18 Apr 2018 13:26:35 -0700
From:   Mike Kravetz <mike.kravetz@...cle.com>
To:     Yang Shi <yang.shi@...ux.alibaba.com>, viro@...iv.linux.org.uk,
        nyc@...omorphy.com, kirill.shutemov@...ux.intel.com,
        hughd@...gle.com, akpm@...ux-foundation.org
Cc:     linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] fs: introduce ST_HUGE flag and set it to tmpfs and
 hugetlbfs

On 04/17/2018 02:08 PM, Yang Shi wrote:
> And, set the flag for hugetlbfs as well to keep the consistency, and the
> applications don't have to know what filesystem is used to use huge
> page, just need to check ST_HUGE flag.

For hugetlbfs, setting such a flag would be for consistency only.  mapping
hugetlbfs files REQUIRES huge page alignment and size.

If an application would want to take advantage of this flag for tmpfs, it
needs to map at a fixed address (MAP_FIXED) for huge page alignment.  So,
it will need to do one of the 'mmap tricks' to get a mapping at a suitably
aligned address.  

IIRC, there is code to 'suitably align' DAX mappings to appropriate huge page
boundaries.  Perhaps, something like this could be added for tmpfs mounted
with huge=?  Of course, this would not take into account 'length' but may
help some.

-- 
Mike Kravetz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ