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-next>] [day] [month] [year] [list]
Message-ID: <20230705230808.GA41006@monkey>
Date:   Wed, 5 Jul 2023 16:08:08 -0700
From:   Mike Kravetz <mike.kravetz@...cle.com>
To:     linux-mm@...ck.org, linux-kernel@...r.kernel.org
Cc:     David Hildenbrand <david@...hat.com>,
        Rik van Riel <riel@...riel.com>,
        Michal Hocko <mhocko@...e.com>, Peter Xu <peterx@...hat.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>
Subject: mprotect and hugetlb mappings

I was recently asked about the behavior of mprotect on a hugetlb
mapping where addr or addr+len is not hugetlb page size aligned.  As
one might expect, EINVAL is returned in such cases.  However, the man
page makes no mention of alignment requirements for hugetlb mappings.

I am happy to submit man page updates if people agree this is the correct
behavior.  We might even want to check alignment earlier in the code
path as we fail when trying to split the vma today.

An alternative behavior would be to operate on whole hugetlb pages within
the range addr - addr+len.
-- 
Mike Kravetz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ