From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-181.mta1.migadu.com (out-181.mta1.migadu.com [95.215.58.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9737134EF0E for ; Fri, 17 Jul 2026 09:26:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784280378; cv=none; b=qXexevim/hKRvrnh0wpI76MmN/P3EL1ftJG6e4MsPPnCJhgDcaeAK7jL2zDKWxWhl2JBXcUKuE4qSHlwrLkgPsq0hWtcRHREsJc3zZm0EOlTb7/5hWSTDcMFDl8ZGc7TpDfdtJ+IeHjejGaViDbueJnYLaxOgmwZIBiBO/ui3zk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784280378; c=relaxed/simple; bh=5LKRF0xL8YhUlUXADRE1owlhQsTYFEG8tW62hYuyLSA=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=Pe6Ce5O6UXWLi0TXWjTpQfY+IpyBds16qpfUT590i7zGQvQvNWPV4kHxb3CTdqJ9NzrXvLqwqSDf7Ed3teKCbOMr6ROLFSnYrtJwUdEevlBVBr1oAqoUsvm2mj7wyhvg9q3cHos4Qeo8DBnQOFYP3nLEFNMKND4ekwalMVDj0FU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=MA3EopKZ; arc=none smtp.client-ip=95.215.58.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="MA3EopKZ" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1784280371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OFekml2IXiwSF3V8YDhUct1wAEE+lNiR4zESJDpZlGs=; b=MA3EopKZdNrDvV05Yx/qdMIk7t3HGZGBbKctqvMpKGHLYJpM47VLo7LHQXNNXtihBcZjZq 2Nq67Daz29tk0iPo57H+QyWUMr64qW+0xoUURwaTIKOePbPnMD8rY/wfHiCCwl9RTV5vNs ukR6bVdNa3JF0Bn5uBE+1pFYOmMpu30= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 17 Jul 2026 09:25:48 +0000 Message-Id: Cc: "Brendan Jackman" , "Andrew Morton" , "Brendan Jackman" , "Lorenzo Stoakes" , "Liam R. Howlett" , "Vlastimil Babka" , "Suren Baghdasaryan" , "Michal Hocko" , , Subject: Re: [PATCH] mm/secretmem: disable under HIGHMEM X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: "Brendan Jackman" To: "Mike Rapoport" , "David Hildenbrand (Arm)" References: <503aee9e-97fc-4889-a379-3c0a5d140554@kernel.org> <7e7f20de-c43d-40f7-82d3-8d05ceb3656b@kernel.org> <21e7746b-9bc2-4643-b0ca-c59e0c77f810@kernel.org> <5653474e-6692-4353-b5d6-e57b6ab76eaf@kernel.org> In-Reply-To: X-Migadu-Flow: FLOW_OUT 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) wrot= e: >> >> 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? >> >=20 >> > Citing myself from a few emails back:=20 >> >=20 >> >>> But still with kmap() and friends not being an NOP the promise "kern= el does >> >>> not map this memory" does not hold. >>=20 >> So you're saying that kmap() would perform a mapping for a non-highmem p= age? >>=20 >> static inline void *kmap(struct page *page) >> { >> void *addr; >>=20 >> might_sleep(); >> if (!PageHighMem(page)) >> addr =3D page_address(page); >> else >> addr =3D kmap_high(page); >> kmap_flush_tlb((unsigned long)addr); >> return addr; >> } >>=20 >> 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.