From: Jann Horn <jannh@google.com>
To: Oscar Salvador <osalvador@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Muchun Song <muchun.song@linux.dev>,
linux-mm@kvack.org, Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Subject: Re: [PATCH] hugetlb: block hugetlb file creation if hugetlb is not set up
Date: Tue, 3 Jun 2025 21:14:18 +0200 [thread overview]
Message-ID: <CAG48ez3Tm5M85a_muVtubSPak1hoM0Mi2LTOXuK364ud4wx-qw@mail.gmail.com> (raw)
In-Reply-To: <aD6LdFTs9j0uhBSU@localhost.localdomain>
On Tue, Jun 3, 2025 at 7:43 AM Oscar Salvador <osalvador@suse.de> wrote:
> On Tue, Jun 03, 2025 at 06:29:24AM +0200, Jann Horn wrote:
> > Yes, this change changes kernel behavior that is userspace-visible,
> > and causes syscalls to return errors where they worked before.
>
> Yes, that is what make me unease about this.
>
> It is true that most of the hugetlb cases out there work on
> pre-allocated pages, because the later it gets the harder to get large
> pages from the system.
>
> But as you say below, there might be applications out there that tweak
> the sys knobs themselves, and with this change those might break.
> Now, how valid are those? Heh, hard to anwser.
>
> So I guess it boils down to how hard and effective is to actually exploit
> whatever we manage to create by allowing this.
> But if we take that route, I think that hinting the user about this behaviour
> change is the right thing to do.
I guess the unusual part of hugetlb are really mostly the shared page
tables, which are also the reason why walks of hugetlb page tables
require extra locks. I guess I'll think about this some more and maybe
send a slightly different take on this that only prevents page fault
handling from getting far enough to establish shared PMDs, or
something like that.
next prev parent reply other threads:[~2025-06-03 19:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-28 17:51 Jann Horn
2025-06-03 3:41 ` Andrew Morton
2025-06-03 4:29 ` Jann Horn
2025-06-03 5:43 ` Oscar Salvador
2025-06-03 19:14 ` Jann Horn [this message]
2025-06-04 2:54 ` Andrew Morton
2025-06-16 22:09 ` Mark Brown
2025-06-17 9:13 ` David Hildenbrand
2025-06-17 15:35 ` Jann Horn
2025-06-17 8:12 ` kernel test robot
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=CAG48ez3Tm5M85a_muVtubSPak1hoM0Mi2LTOXuK364ud4wx-qw@mail.gmail.com \
--to=jannh@google.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=muchun.song@linux.dev \
--cc=osalvador@suse.de \
/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