From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 759A8399036 for ; Wed, 15 Jul 2026 14:58:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784127490; cv=none; b=GHQi6YtWiD1B4cvSXt0+BSQe0Vi4Ca8mGvuafqTDFzA3scgI4buAvVNhLDenTyDJp3oDCQdujVndPmql98OMQKr+ilpfM2PuFkiFdp0BdOxVO1LzrgW4hoBEFe4Kq1jLsx5Ewtn8eYaNlaEGgVfQk+6nuTCv65UoWfpIqHAbs+A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784127490; c=relaxed/simple; bh=LyeC+gPMW3a533gt89Ii32E5d0lbK0Az2BEgmPCndJg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RiO8W9pwyO1Q/vSNJCZsLUm5saQk8arbr1S6kMJoo3rdKJC+8AE2WH4LvjZix57YxFm4bzMukNMnLbkpmdWqAbVbjIIYx6WXsb/IrxGVEqcc80gEZCq3XKJ0ck0pJ8e+53Xs7vIxYpTUG+CidBl+3wdgHkpWuz39tLMI0UEL8Tc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JbGb75aA; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JbGb75aA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94ACB1F000E9; Wed, 15 Jul 2026 14:58:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1784127489; bh=YFpgyWHs9kn9sVjQ/mwxuF5PU2oG2W0sa64U48Z9bFQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=JbGb75aAr0mj+X+n+hCLEoLVDMXVr4L3aSdbks4fQSvqKqdcwweNjv1vxnURJcViq IoyGAJfwYaWjTwe4uz3c631hVjBY7ShFGZjwu4WHrDAsVFEKKPz/fxQV3L8x25WW7a fUdzLS1yGAUa140tt8lJ8K6NVr9Tvgzn2bdk4LoGeYtyLAM0qFCjF4/CX31z8gHssp sxaxGbMQW++pn2tXqWWpTmR0V2S0z6Zko9sb5m69v8ACPtQcruBvvf+3IKMH8H/QDj ZBBcx0Nq/WuPutNVCCXl+AAD1b2ARJZTKVRAwU2tzptwKIz9uOZQvaPhzrvI+EN8A5 EpAqtYBhMPh3A== Date: Wed, 15 Jul 2026 17:58:03 +0300 From: Mike Rapoport To: "David Hildenbrand (Arm)" Cc: Brendan Jackman , Andrew Morton , Brendan Jackman , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Suren Baghdasaryan , Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/secretmem: disable under HIGHMEM Message-ID: References: <20260703-secretmem-highmem-v1-1-30d5ff944664@google.com> <20260704192603.40aa80cf9242b77aa75e8d8d@linux-foundation.org> <503aee9e-97fc-4889-a379-3c0a5d140554@kernel.org> <7e7f20de-c43d-40f7-82d3-8d05ceb3656b@kernel.org> <21e7746b-9bc2-4643-b0ca-c59e0c77f810@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <21e7746b-9bc2-4643-b0ca-c59e0c77f810@kernel.org> On Wed, Jul 15, 2026 at 03:49:39PM +0200, David Hildenbrand (Arm) wrote: > On 7/15/26 15:44, Mike Rapoport wrote: > > On Wed, Jul 15, 2026 at 02:31:08PM +0200, David Hildenbrand (Arm) wrote: > >> On 7/15/26 13:33, Mike Rapoport wrote: > >>> > >>> Right :) > >>> Supporting 32-bit without HIGHMEM is easy, so I don't think we should limit > >>> it to 64BIT at this point. > >> > >> You mean > >> > >> diff --git a/mm/secretmem.c b/mm/secretmem.c > >> index 4877c262cb1f6..d29865075b6ea 100644 > >> --- a/mm/secretmem.c > >> +++ b/mm/secretmem.c > >> @@ -202,7 +202,7 @@ static struct file *secretmem_file_create(unsigned long flags) > >> if (IS_ERR(file)) > >> goto err_free_inode; > >> > >> - mapping_set_gfp_mask(inode->i_mapping, GFP_HIGHUSER); > >> + mapping_set_gfp_mask(inode->i_mapping, GFP_USER); > >> mapping_set_unevictable(inode->i_mapping); > >> > >> inode->i_op = &secretmem_iops; > >> > >> > >> then? > > > > 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. > -- > Cheers, > > David -- Sincerely yours, Mike.