linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* mprotect and hugetlb mappings
@ 2023-07-05 23:08 Mike Kravetz
  2023-07-05 23:22 ` Matthew Wilcox
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Kravetz @ 2023-07-05 23:08 UTC (permalink / raw)
  To: linux-mm, linux-kernel
  Cc: David Hildenbrand, Rik van Riel, Michal Hocko, Peter Xu, Dave Hansen

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-07-17 19:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-05 23:08 mprotect and hugetlb mappings Mike Kravetz
2023-07-05 23:22 ` Matthew Wilcox
2023-07-05 23:53   ` Mike Kravetz
2023-07-17 16:19     ` Vlastimil Babka
2023-07-17 18:52       ` Mike Kravetz
2023-07-17 19:00         ` David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox