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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AE823CCD193 for ; Mon, 20 Oct 2025 18:16:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F2D318E0010; Mon, 20 Oct 2025 14:16:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EDE1B8E0002; Mon, 20 Oct 2025 14:16:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DCD288E0010; Mon, 20 Oct 2025 14:16:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id CAED48E0002 for ; Mon, 20 Oct 2025 14:16:14 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 6F3CF86230 for ; Mon, 20 Oct 2025 18:16:14 +0000 (UTC) X-FDA: 84019297068.07.26AF82B Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by imf24.hostedemail.com (Postfix) with ESMTP id BD191180007 for ; Mon, 20 Oct 2025 18:16:12 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=SFAdAhGZ; spf=pass (imf24.hostedemail.com: domain of akpm@linux-foundation.org designates 172.105.4.254 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1760984172; h=from:from:sender: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:dkim-signature; bh=/Ajt0HVVq8ZKPdL86X9rKEhtCiIfSqXtFposI8V9XtI=; b=kazsYN4G0GJlZXPfhg3P9n5tZT7wI4bHKCpKxHjo5/EwMBjhVyZeyS5jnIenHOh60wUJN3 G5y85pdCNQ01kS9rniK1v3d4KtF5uXCjVSOV4yrujevJM1pUYuZ8TQzDUILG8cTPUSPqUq +RRxEPPtCyIrZ4ICpqWJ2KwzTlcM1Sc= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=SFAdAhGZ; spf=pass (imf24.hostedemail.com: domain of akpm@linux-foundation.org designates 172.105.4.254 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1760984172; a=rsa-sha256; cv=none; b=M4cj7Hj9Bpjlpf/7gqzDVpVwcosJQVxcoFNySNBjgBPLUj8HCGUcP+BeWt3Zv1DHVrgBG6 sFllyJlMiaZjU7tcGmD/SDQIdEb+tFZXPqUCfhyfI1svWWVl988+lg9lXaWBhj97CQw35w GKmz8eFXB+tZ33h0nu5kCXuWtBz61QA= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id E790A620DF; Mon, 20 Oct 2025 18:16:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C732AC4CEF9; Mon, 20 Oct 2025 18:16:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1760984171; bh=g+2VpaD+FlA761mradaWnF6yVcLyinIaa0PWYsivwMA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=SFAdAhGZ6XAI3/OSlRoUNUAwPSszkFJ5X78HTOFq1+uod1XbAgAQik0Ms/FVZwL8b s288oOWO3uGPngOYPSt2YpIWz3iBNwzxaqaJwbvYDnbDsjcDdrwTO7g030gpdL1GAy kdB06SO/8MeAHhERgECXjIJ5lY1Qda/IfEWb/rTg= Date: Mon, 20 Oct 2025 11:16:09 -0700 From: Andrew Morton To: Lorenzo Stoakes Cc: Jonathan Corbet , Matthew Wilcox , Guo Ren , Thomas Bogendoerfer , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , "David S . Miller" , Andreas Larsson , Arnd Bergmann , Greg Kroah-Hartman , Dan Williams , Vishal Verma , Dave Jiang , Nicolas Pitre , Muchun Song , Oscar Salvador , David Hildenbrand , Konstantin Komarov , Baoquan He , Vivek Goyal , Dave Young , Tony Luck , Reinette Chatre , Dave Martin , James Morse , Alexander Viro , Christian Brauner , Jan Kara , "Liam R . Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Hugh Dickins , Baolin Wang , Uladzislau Rezki , Dmitry Vyukov , Andrey Konovalov , Jann Horn , Pedro Falcato , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-csky@vger.kernel.org, linux-mips@vger.kernel.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org, linux-mm@kvack.org, ntfs3@lists.linux.dev, kexec@lists.infradead.org, kasan-dev@googlegroups.com, Jason Gunthorpe , iommu@lists.linux.dev, Kevin Tian , Will Deacon , Robin Murphy , Sumanth Korikkar Subject: Re: [PATCH v5 00/15] expand mmap_prepare functionality, port more users Message-Id: <20251020111609.cfafaa22c20ac33be573898f@linux-foundation.org> In-Reply-To: References: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Stat-Signature: okqzhciewnzaybkaywui1xrokrke9i8x X-Rspamd-Queue-Id: BD191180007 X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/NvjlgitBLMQXwIdIFK+fW0c+HPc/YGVzQ7RxTbtom0hIkZPCF3WIq6PQDnkVUZ7rIMlIRfj8OJmQA7XmEaHTzoq0Fmjfu1YoAxQjecBZfwo+bAnvXuRA8oPaCl/QsTspGphpryX5iklcBGrSEs9GWSbTswDl54o1ngMBhcvMPzuydNTZQhLXeyyE062u+NC6MjIcdMxMUYjmhR8sYqn8qKyc8wo6BYvinqf21cmNcfwBwgvOYAWuGi2sQjvq5RGTJuGB458GsP2eMcUF9zxcSFJjKhIWJN4UrpUf4E8eS3iniUL+1/xUQomY9LEbLQHnVZBQizHSgWxxS8= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Mon, 20 Oct 2025 13:11:17 +0100 Lorenzo Stoakes wrote: > Since commit c84bf6dd2b83 ("mm: introduce new .mmap_prepare() file > callback"), The f_op->mmap hook has been deprecated in favour of > f_op->mmap_prepare. > > This was introduced in order to make it possible for us to eventually > eliminate the f_op->mmap hook which is highly problematic as it allows > drivers and filesystems raw access to a VMA which is not yet correctly > initialised. > > This hook also introduced complexity for the memory mapping operation, as > we must correctly unwind what we do should an error arises. > > Overall this interface being so open has caused significant problems for > us, including security issues, it is important for us to simply eliminate > this as a source of problems. > > Therefore this series continues what was established by extending the > functionality further to permit more drivers and filesystems to use > mmap_prepare. Thanks, I (re-)added this series to mm.git. I suppressed the usual emails.