From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BFE8B10A1E64 for ; Thu, 26 Mar 2026 10:45:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pPOsC5JiMCKoMsw4qbNH/hkrrgsAySaLlM6cYpY3+Qw=; b=CfCiqJDCJEUYvJ VWisI933rhQq4u4Atr3J7ksvUert5GLfDV0mhLEWyUR3JvcC1IzcIzdYolSH7QrdeszxuK1TjBhVL HFi5/TAPyj4YxdU6bXetxQAMX19eprAJvQgjMVYiO3ts/gYsYJVthqtOyptjO0TdnkkQY6Bt0SLPG tWxm4Cp87TzlPMFxKiwAnchu+ckV4GN6ZwwlUi6ZcODqFGJidylvRkRvbkVrol6k9VRQxvPQNOyq7 DXDHZwKDmssLTcq0w6OQ0436GzBlck73BNkjbvUDDKD9BP22pJXV4HlmVd9sJiQytwT+XsYsJ+QIc eXwCA/DJVoTRFZW4zE6g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1w5iCw-00000005HiA-2ZqP; Thu, 26 Mar 2026 10:44:58 +0000 Received: from tor.source.kernel.org ([172.105.4.254]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1w5iCv-00000005Hhs-0jli; Thu, 26 Mar 2026 10:44:57 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 21E9D60103; Thu, 26 Mar 2026 10:44:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE3B6C116C6; Thu, 26 Mar 2026 10:44:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774521895; bh=RpHr2+xHkvht2/Kh3sSH7GYvx2wP6yqls3YE2NUO0rs=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=oZaElY+xwfixyAcqHZhLjm1kzqhHtlPlUH7GKOTLKXANwHDqMaG1z6XwK+kEQeLOE SYtBHHg37QOb54eq+UD8GrKX9hQ+eyixSzkh57jRU/1t5ChhlFDoLNFrhlvAUfv7T6 sZWCKLLb7jN89LctiPPnWlgN5y78Qjx+/QHgsyWC0CQN+IMFUPMFgtvHlpiyUt+V5w LeoibiKN4Zw4L9hawiOfwt1apacVFOXRxXyuXI0ZqDVTae+0tk1tn7+8FIAI0IkO+2 USwrP2P6UszCTljgKzyfk42RQc6SWYWgX+jwYahwV6HqPPop4F/WNeF9Jm9BcDKhq/ SWL3RmCPKNuZQ== Message-ID: <0b479256-1266-4c9c-a565-6e2a68573ddd@kernel.org> Date: Thu, 26 Mar 2026 11:44:45 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 20/21] mm: add mmap_action_map_kernel_pages[_full]() Content-Language: en-US To: "Lorenzo Stoakes (Oracle)" , Andrew Morton Cc: Jonathan Corbet , Clemens Ladisch , Arnd Bergmann , Greg Kroah-Hartman , "K . Y . Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Long Li , Alexander Shishkin , Maxime Coquelin , Alexandre Torgue , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Bodo Stroesser , "Martin K . Petersen" , David Howells , Marc Dionne , Alexander Viro , Christian Brauner , Jan Kara , David Hildenbrand , "Liam R . Howlett" , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Jann Horn , Pedro Falcato , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-mtd@lists.infradead.org, linux-staging@lists.linux.dev, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-afs@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Ryan Roberts References: <926ac961690d856e67ec847bee2370ab3c6b9046.1774045440.git.ljs@kernel.org> From: "Vlastimil Babka (SUSE)" In-Reply-To: <926ac961690d856e67ec847bee2370ab3c6b9046.1774045440.git.ljs@kernel.org> X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org On 3/20/26 23:39, Lorenzo Stoakes (Oracle) wrote: > A user can invoke mmap_action_map_kernel_pages() to specify that the > mapping should map kernel pages starting from desc->start of a specified > number of pages specified in an array. > > In order to implement this, adjust mmap_action_prepare() to be able to > return an error code, as it makes sense to assert that the specified > parameters are valid as quickly as possible as well as updating the VMA > flags to include VMA_MIXEDMAP_BIT as necessary. > > This provides an mmap_prepare equivalent of vm_insert_pages(). We > additionally update the existing vm_insert_pages() code to use > range_in_vma() and add a new range_in_vma_desc() helper function for the > mmap_prepare case, sharing the code between the two in range_is_subset(). > > We add both mmap_action_map_kernel_pages() and > mmap_action_map_kernel_pages_full() to allow for both partial and full VMA > mappings. > > We update the documentation to reflect the new features. > > Finally, we update the VMA tests accordingly to reflect the changes. > > Reviewed-by: Suren Baghdasaryan > Signed-off-by: Lorenzo Stoakes (Oracle) Acked-by: Vlastimil Babka (SUSE) ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/