From: Michal Hocko <mhocko@suse.com>
To: Jiri Slaby <jirislaby@kernel.org>
Cc: akpm@linux-foundation.org, surenb@google.com, riel@surriel.com,
willy@infradead.org, cl@linux.com, yang@os.amperecomputing.com,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
"Bernhard M. Wiedemann" <bwiedemann@suse.de>,
Yang Shi <shy828301@gmail.com>
Subject: Re: [PATCH] mm: huge_memory: don't force huge page alignment on 32 bit
Date: Fri, 26 Jan 2024 11:51:11 +0100 [thread overview]
Message-ID: <ZbOOn0hrKQ_ojM2K@tiehlicka> (raw)
In-Reply-To: <de249ba0-6efa-416a-a1a9-59c47d71cbc9@kernel.org>
On Fri 26-01-24 10:41:49, Jiri Slaby wrote:
> On 26. 01. 24, 10:36, Jiri Slaby wrote:
> > > > --- a/mm/huge_memory.c
> > > > +++ b/mm/huge_memory.c
> > > > @@ -37,6 +37,7 @@
> > > > #include <linux/page_owner.h>
> > > > #include <linux/sched/sysctl.h>
> > > > #include <linux/memory-tiers.h>
> > > > +#include <linux/compat.h>
> > > > #include <asm/tlb.h>
> > > > #include <asm/pgalloc.h>
> > > > @@ -811,6 +812,14 @@ static unsigned long
> > > > __thp_get_unmapped_area(struct file *filp,
> > > > loff_t off_align = round_up(off, size);
> > > > unsigned long len_pad, ret;
> > > > + /*
> > > > + * It doesn't make too much sense to froce huge page alignment on
> > > > + * 32 bit system or compat userspace due to the contrained virtual
> > > > + * address space and address entropy.
> > > > + */
> >
> > FWIW,
> > Bernhard noticed that "froce" and "contrained", could you fix that
> > before applying the patch?
>
> No, you can't:
>
> 1) it was merged to mm-stable already, and
> 2) the comment is not in that version at all [1]
>
> [1] https://lore.kernel.org/all/20240126075612.87780C433F1@smtp.kernel.org/
Matthew has objected that the comment is not really necessary and I
think he is quite right. If anything the commend would be helpful to
explain why this doesn't make much sense (because that breaks ASLR
on default configuration and compat tasks). But that should be clear
from the changelog so I think we are good here.
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2024-01-26 10:51 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-18 13:35 Yang Shi
2024-01-18 18:05 ` Yang Shi
2024-01-19 0:16 ` Matthew Wilcox
2024-01-18 20:14 ` Matthew Wilcox
2024-01-18 20:39 ` Yang Shi
2024-01-19 17:16 ` Rik van Riel
2024-01-25 8:53 ` Michal Hocko
2024-01-26 9:36 ` Jiri Slaby
2024-01-26 9:41 ` Jiri Slaby
2024-01-26 10:51 ` Michal Hocko [this message]
2024-02-03 9:24 ` Thorsten Leemhuis
2024-02-05 17:07 ` Yang Shi
2024-02-05 17:53 ` Linux regression tracking (Thorsten Leemhuis)
2024-02-12 13:45 ` Thorsten Leemhuis
2024-02-18 9:26 ` Greg KH
2024-07-11 20:10 ` Yves-Alexis Perez
2024-07-11 20:47 ` Yang Shi
2024-07-11 20:50 ` Matthew Wilcox
2024-07-11 20:53 ` Yang Shi
2024-07-12 14:41 ` Yves-Alexis Perez
2024-07-12 15:31 ` Yang Shi
2024-07-11 20:52 ` Ben Hutchings
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=ZbOOn0hrKQ_ojM2K@tiehlicka \
--to=mhocko@suse.com \
--cc=akpm@linux-foundation.org \
--cc=bwiedemann@suse.de \
--cc=cl@linux.com \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=riel@surriel.com \
--cc=shy828301@gmail.com \
--cc=surenb@google.com \
--cc=willy@infradead.org \
--cc=yang@os.amperecomputing.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