From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 CD71A2E0B71 for ; Tue, 31 Mar 2026 00:43:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774917817; cv=none; b=s2SyVQJKf1h8dYbQs98Iu69Wr6FOF+ed1RxYcOuzSQi9QWPYcZ+xnjgjRKAcMM/WWEpiIonKnkXww3Ush1oZcgHjFXeKhbABZxyC6PAwx3NwJBrIxe/VDSI7sdP2jOhpirZC2NttBD8HhAUFl/3BcOvU0mcrdfraxl089627vQk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774917817; c=relaxed/simple; bh=lHdSvm+1XGW54VL2FKXII2f4pkc7Asqn/wMjuj+1w0M=; h=Date:To:From:Subject:Message-Id; b=D5jGvSawi7u+kk15OEc/6sfQy/XDJ64yw1dUoTpveeAhkjp+4cy7mXQG9dr3mOs/H22szDQjaAyiLil3bq7RZzSlzw5Ak13i19oKwxomftJ//lC2l6A3UG5nIwiVo+rCshvweKY5E/kbXD8e7wHm0UNFMfVcFtDZL2R15lVfUJI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=oKJrNfmb; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="oKJrNfmb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A04FEC4CEF7; Tue, 31 Mar 2026 00:43:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1774917817; bh=lHdSvm+1XGW54VL2FKXII2f4pkc7Asqn/wMjuj+1w0M=; h=Date:To:From:Subject:From; b=oKJrNfmbo+LzS9QxFVrNvcUxFrNzknBtxMTbIIk7Hy1Ilhduh5wPwqOaMxfJgqp+1 iOlZ/WyvS7qsWsL8EoyFvfDLu7d9PrxGVRbou+v89ruZBbthtDHjz1e3zutN6e7BxZ sLFpozr0CAwSBssVfaJYm/c1zqsbFX5Qr02tjQ4g= Date: Mon, 30 Mar 2026 17:43:37 -0700 To: mm-commits@vger.kernel.org,wei.liu@kernel.org,viro@zeniv.linux.org.uk,vigneshr@ti.com,vbabka@kernel.org,surenb@google.com,ryan.roberts@arm.com,rppt@kernel.org,richard@nod.at,pfalcato@suse.de,miquel.raynal@bootlin.com,mhocko@suse.com,mcoquelin.stm32@gmail.com,martin.petersen@oracle.com,marc.dionne@auristor.com,longli@microsoft.com,liam.howlett@oracle.com,kys@microsoft.com,jannh@google.com,jack@suse.cz,haiyangz@microsoft.com,gregkh@linuxfoundation.org,dhowells@redhat.com,decui@microsoft.com,david@kernel.org,corbet@lwn.net,clemens@ladisch.de,brauner@kernel.org,bostroesser@gmail.com,arnd@arndb.de,alexandre.torgue@foss.st.com,alexander.shishkin@linux.intel.com,ljs@kernel.org,akpm@linux-foundation.org From: Andrew Morton Subject: [merged mm-stable] mm-on-remap-assert-that-input-range-within-the-proposed-vma.patch removed from -mm tree Message-Id: <20260331004337.A04FEC4CEF7@smtp.kernel.org> Precedence: bulk X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The quilt patch titled Subject: mm: on remap assert that input range within the proposed VMA has been removed from the -mm tree. Its filename was mm-on-remap-assert-that-input-range-within-the-proposed-vma.patch This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm ------------------------------------------------------ From: "Lorenzo Stoakes (Oracle)" Subject: mm: on remap assert that input range within the proposed VMA Date: Fri, 20 Mar 2026 22:39:47 +0000 Now we have range_in_vma_desc(), update remap_pfn_range_prepare() to check whether the input range in contained within the specified VMA, so we can fail at prepare time if an invalid range is specified. This covers the I/O remap mmap actions also which ultimately call into this function, and other mmap action types either already span the full VMA or check this already. Link: https://lkml.kernel.org/r/0fc1092f4b74f3f673a58e4e3942dc83f336dd85.1774045440.git.ljs@kernel.org Signed-off-by: Lorenzo Stoakes (Oracle) Reviewed-by: Suren Baghdasaryan Acked-by: Vlastimil Babka (SUSE) Cc: Alexander Shishkin Cc: Alexandre Torgue Cc: Al Viro Cc: Arnd Bergmann Cc: Bodo Stroesser Cc: Christian Brauner Cc: Clemens Ladisch Cc: David Hildenbrand Cc: David Howells Cc: Dexuan Cui Cc: Greg Kroah-Hartman Cc: Haiyang Zhang Cc: Jan Kara Cc: Jann Horn Cc: Jonathan Corbet Cc: K. Y. Srinivasan Cc: Liam Howlett Cc: Long Li Cc: Marc Dionne Cc: "Martin K. Petersen" Cc: Maxime Coquelin Cc: Michal Hocko Cc: Mike Rapoport Cc: Miquel Raynal Cc: Pedro Falcato Cc: Richard Weinberger Cc: Ryan Roberts Cc: Vignesh Raghavendra Cc: Wei Liu Signed-off-by: Andrew Morton --- mm/memory.c | 3 +++ 1 file changed, 3 insertions(+) --- a/mm/memory.c~mm-on-remap-assert-that-input-range-within-the-proposed-vma +++ a/mm/memory.c @@ -3142,6 +3142,9 @@ int remap_pfn_range_prepare(struct vm_ar const bool is_cow = vma_desc_is_cow_mapping(desc); int err; + if (!range_in_vma_desc(desc, start, end)) + return -EFAULT; + err = get_remap_pgoff(is_cow, start, end, desc->start, desc->end, pfn, &desc->pgoff); if (err) _ Patches currently in -mm which might be from ljs@kernel.org are maintainers-update-mglru-entry-to-reflect-current-status.patch selftests-mm-add-merge-test-for-partial-msealed-range.patch