linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Kravetz <mike.kravetz@oracle.com>
To: Li Xinhai <lixinhai.lxh@gmail.com>,
	John Hubbard <jhubbard@nvidia.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>
Cc: Linux API <linux-api@vger.kernel.org>, akpm <akpm@linux-foundation.org>
Subject: Re: [PATCH] mm: allow checking length for hugetlb mapping in mmap()
Date: Tue, 31 Mar 2020 15:04:54 -0700	[thread overview]
Message-ID: <e8e8ea0b-f912-2084-ee28-d4da1968e70a@oracle.com> (raw)
In-Reply-To: <2020033116350399980494@gmail.com>

On 3/31/20 1:35 AM, Li Xinhai wrote:
> My understanding may wrong, but it seems that once some application start to use
> some behavior of kernel, although that usage in user space is not logical, they
> will be protected from change in kernel side.

Correct.  I too wish that the length argument to mmap for hugetlb mappings
was required to be a multiple of huge page size.  That would make everything
nice and consistent.  However, the behavior of rounding the length up to huge
page size has existed for quite some time and it well documented.  Therefore,
we can not change it without the possibility of breaking some application.

-- 
Mike Kravetz

      reply	other threads:[~2020-03-31 22:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-29  3:08 [PATCH] mm: allow checking length for hugetlb mapping in mmap() Li Xinhai
2020-03-29  3:53 ` John Hubbard
2020-03-29  8:09   ` Li Xinhai
2020-03-30 18:39     ` Mike Kravetz
2020-03-31  8:35       ` Li Xinhai
2020-03-31 22:04         ` Mike Kravetz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e8e8ea0b-f912-2084-ee28-d4da1968e70a@oracle.com \
    --to=mike.kravetz@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=jhubbard@nvidia.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lixinhai.lxh@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).