From: Andrew Morton <akpm@linux-foundation.org>
To: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Steve Capper <steve.capper@arm.com>,
Will Deacon <will.deacon@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
stable@vger.kernel.org
Subject: Re: [PATCH v10] mm, hugetlbfs: Allow for "high" userspace addresses
Date: Fri, 15 Apr 2022 15:09:29 -0700 [thread overview]
Message-ID: <20220415150929.a62cbad83c22d6304560f626@linux-foundation.org> (raw)
In-Reply-To: <ab847b6edb197bffdfe189e70fb4ac76bfe79e0d.1650033747.git.christophe.leroy@csgroup.eu>
On Fri, 15 Apr 2022 16:45:13 +0200 Christophe Leroy <christophe.leroy@csgroup.eu> wrote:
> This is a fix for commit f6795053dac8 ("mm: mmap: Allow for "high"
> userspace addresses") for hugetlb.
>
> This patch adds support for "high" userspace addresses that are
> optionally supported on the system and have to be requested via a hint
> mechanism ("high" addr parameter to mmap).
>
> Architectures such as powerpc and x86 achieve this by making changes to
> their architectural versions of hugetlb_get_unmapped_area() function.
> However, arm64 uses the generic version of that function.
>
> So take into account arch_get_mmap_base() and arch_get_mmap_end() in
> hugetlb_get_unmapped_area(). To allow that, move those two macros
> out of mm/mmap.c into include/linux/sched/mm.h
>
> If these macros are not defined in architectural code then they default
> to (TASK_SIZE) and (base) so should not introduce any behavioural
> changes to architectures that do not define them.
>
> For the time being, only ARM64 is affected by this change.
>
> >From Catalin (ARM64):
> We should have fixed hugetlb_get_unmapped_area() as well when we
> added support for 52-bit VA. The reason for commit f6795053dac8 was to
> prevent normal mmap() from returning addresses above 48-bit by default
> as some user-space had hard assumptions about this.
>
> It's a slight ABI change if you do this for hugetlb_get_unmapped_area()
> but I doubt anyone would notice. It's more likely that the current
> behaviour would cause issues, so I'd rather have them consistent.
I'm struggling to understand the need for a -stable backport from the
above text.
Could we please get a simple statement of the end-user visible effects
of the shortcoming? Target audience is -stable tree maintainers, and
people who we've never heard of who will be wondering whether they should
add this to their organization's older kernel.
> fs/hugetlbfs/inode.c | 9 +++++----
> include/linux/sched/mm.h | 8 ++++++++
> mm/mmap.c | 8 --------
> 3 files changed, 13 insertions(+), 12 deletions(-)
I'm a bit surprised that this has reached version 10! Was it really
that tricky?
next prev parent reply other threads:[~2022-04-15 22:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-15 14:45 Christophe Leroy
2022-04-15 22:09 ` Andrew Morton [this message]
2022-04-16 6:26 ` Christophe Leroy
2022-04-19 17:41 ` Catalin Marinas
2022-04-15 22:12 ` Andrew Morton
2022-04-16 6:29 ` Christophe Leroy
2022-04-19 4:13 ` Andrew Morton
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=20220415150929.a62cbad83c22d6304560f626@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=christophe.leroy@csgroup.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=stable@vger.kernel.org \
--cc=steve.capper@arm.com \
--cc=will.deacon@arm.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