All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Brendan Jackman" <brendan.jackman@linux.dev>
To: "Mike Rapoport" <rppt@kernel.org>,
	"David Hildenbrand (Arm)" <david@kernel.org>
Cc: "Brendan Jackman" <brendan.jackman@linux.dev>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Brendan Jackman" <jackmanb@google.com>,
	"Lorenzo Stoakes" <ljs@kernel.org>,
	"Liam R. Howlett" <liam@infradead.org>,
	"Vlastimil Babka" <vbabka@kernel.org>,
	"Suren Baghdasaryan" <surenb@google.com>,
	"Michal Hocko" <mhocko@suse.com>, <linux-mm@kvack.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm/secretmem: disable under HIGHMEM
Date: Fri, 17 Jul 2026 09:25:48 +0000	[thread overview]
Message-ID: <DK0QLG6P7LXQ.OUG1KJ75V4MW@linux.dev> (raw)
In-Reply-To: <ali3162voYNVFl0p@kernel.org>

On Thu Jul 16, 2026 at 10:52 AM UTC, Mike Rapoport wrote:
> On Thu, Jul 16, 2026 at 12:08:07PM +0200, David Hildenbrand (Arm) wrote:
>> On 7/15/26 16:58, Mike Rapoport wrote:
>> > On Wed, Jul 15, 2026 at 03:49:39PM +0200, David Hildenbrand (Arm) wrote:
>> >> On 7/15/26 15:44, Mike Rapoport wrote:
>> >>>
>> >>> No, I mean what Brendan's patch did:
>> >>>
>> >>>  config SECRETMEM
>> >>>         default y
>> >>>         bool "Enable memfd_secret() system call" if EXPERT
>> >>> -       depends on ARCH_HAS_SET_DIRECT_MAP
>> >>> +       depends on ARCH_HAS_SET_DIRECT_MAP && !HIGHMEM
>> >>>
>> >>> We can change gfp_mask as well for the sake of pedancy
>> >>
>> >> Why not change the gfp mask only then?
>> > 
>> > Citing myself from a few emails back: 
>> > 
>> >>> But still with kmap() and friends not being an NOP the promise "kernel does
>> >>> not map this memory" does not hold.
>> 
>> So you're saying that kmap() would perform a mapping for a non-highmem page?
>> 
>> static inline void *kmap(struct page *page)
>> {
>> 	void *addr;
>> 
>> 	might_sleep();
>> 	if (!PageHighMem(page))
>> 		addr = page_address(page);
>> 	else
>> 		addr = kmap_high(page);
>> 	kmap_flush_tlb((unsigned long)addr);
>> 	return addr;
>> }
>> 
>> I'm missing something important.
>
> Yeah, you are right, GFP_USER should do.

Cool thanks folks, looks like we have a consensus.

I lost my cached so I need to compile a 32bit OS again to test with
GFP_USER, and I am on holiday next week so it might be a while before v2
(depends what kind of holiday it turns out to be!).

I assume nobody is in a rush here but just in case someone doesn't want
to wait for the fix, just let me know if you wanna take over from here.

      reply	other threads:[~2026-07-17  9:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-03 14:48 [PATCH] mm/secretmem: disable under HIGHMEM Brendan Jackman
2026-07-04  6:42 ` Mike Rapoport
2026-07-05  2:26 ` Andrew Morton
2026-07-05 10:46   ` Brendan Jackman
2026-07-05 11:34     ` Mike Rapoport
2026-07-06  8:42       ` David Hildenbrand (Arm)
2026-07-15 11:22         ` Brendan Jackman
2026-07-15 11:33           ` Mike Rapoport
2026-07-15 12:31             ` David Hildenbrand (Arm)
2026-07-15 13:44               ` Mike Rapoport
2026-07-15 13:49                 ` David Hildenbrand (Arm)
2026-07-15 14:58                   ` Mike Rapoport
2026-07-16 10:08                     ` David Hildenbrand (Arm)
2026-07-16 10:52                       ` Mike Rapoport
2026-07-17  9:25                         ` Brendan Jackman [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=DK0QLG6P7LXQ.OUG1KJ75V4MW@linux.dev \
    --to=brendan.jackman@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=jackmanb@google.com \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=rppt@kernel.org \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.