From mboxrd@z Thu Jan 1 00:00:00 1970 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.subspace.kernel.org (Postfix) with ESMTPS id 43D66238141; Tue, 17 Jun 2025 05:11:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750137114; cv=none; b=ojsJNNMyjsL+bMki1YX1uMf/6EZx0aKnq//v/NpFG/ncnx363UVJXOMgNKVrwhons7Ul+p+qIqVRLrjwHBQ3xVge1u+ydMUESwesNu7HyOJKCCc+XelJUt9Yyqh98FAXPibvV/lpIuhWNjGMsWK6+X4FQk1ly+LcaMTGFNUrH+s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750137114; c=relaxed/simple; bh=zwDhcZ3iwZfysFzZ7PmGyzc3MDX6jSf8oomGiv2bx7U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=d5LS+xY/uPcXj58mYHMJ678ZfmWDsF2mky0e5HBElF2ooUtDBmTxfmC6KHwZ78hFYHLLFV4+Tx++ajVdmWQWuWZhVvTK1ER0XRtracp2D02fpahbJi9WGXzhX8pWyvvCKr3/aC/cKPvm8FGEbkLLqMpZn7PNKkXXaDHwC3vSgQ4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=xCxiDspW; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="xCxiDspW" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=WPsxJQ/JXacvbaipg//fOLi1s4GO46A+9y4pCE6t2y4=; b=xCxiDspWK79oWST3sh2t7cjJwF 3VtKzrTMd1ZyyEY3Yl1sQsmN0c46B/BWpmLx7GLhCFM16aw7g83BPPAETUVk7GelPlveK5I6sQ8E5 ZxtytrGUEhUU9WZrIuJuMFvFwuFp4vj1nvN+EaRMqHi+KIfudASk+LhjQu9+lmF+F3IZYi7Ydf/Wk JTa1n3Fl61HKkjYiCIqjoqvwn7L3e/9n7XP0zshPQ9POdY/W9y4mdeV8e8mm04X6AEWaAswnDA8V3 ZzeHtQqEnK2Y08dx0p/c6HZZCAPv4hvcg6CW2TmaFuNbCfjDhPGzoMVT4DrV3ggoDKSwdUATpVwPQ nIJAAeQw==; Received: from hch by bombadil.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1uRObY-00000006ERs-1HY9; Tue, 17 Jun 2025 05:11:28 +0000 Date: Mon, 16 Jun 2025 22:11:28 -0700 From: Christoph Hellwig To: Lorenzo Stoakes Cc: Andrew Morton , "Liam R . Howlett" , Jens Axboe , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Simona Vetter , Eric Van Hensbergen , Latchesar Ionkov , Dominique Martinet , Christian Schoenebeck , David Sterba , David Howells , Marc Dionne , Alexander Viro , Christian Brauner , Jan Kara , Benjamin LaHaise , Miklos Szeredi , Amir Goldstein , Kent Overstreet , "Tigran A . Aivazian" , Kees Cook , Chris Mason , Josef Bacik , Xiubo Li , Ilya Dryomov , Jan Harkes , coda@cs.cmu.edu, Tyler Hicks , Gao Xiang , Chao Yu , Yue Hu , Jeffle Xu , Sandeep Dhavale , Hongbo Li , Namjae Jeon , Sungjong Seo , Yuezhang Mo , Theodore Ts'o , Andreas Dilger , Jaegeuk Kim , OGAWA Hirofumi , Viacheslav Dubeyko , John Paul Adrian Glaubitz , Yangtao Li , Richard Weinberger , Anton Ivanov , Johannes Berg , Mikulas Patocka , David Woodhouse , Dave Kleikamp , Trond Myklebust , Anna Schumaker , Ryusuke Konishi , Konstantin Komarov , Mark Fasheh , Joel Becker , Joseph Qi , Bob Copeland , Mike Marshall , Martin Brandenburg , Steve French , Paulo Alcantara , Ronnie Sahlberg , Shyam Prasad N , Tom Talpey , Bharath SM , Zhihao Cheng , Hans de Goede , Carlos Maiolino , Damien Le Moal , Naohiro Aota , Johannes Thumshirn , Dan Williams , Matthew Wilcox , Vlastimil Babka , Jann Horn , Pedro Falcato , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, v9fs@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-afs@lists.infradead.org, linux-aio@kvack.org, linux-unionfs@vger.kernel.org, linux-bcachefs@vger.kernel.org, linux-mm@kvack.org, linux-btrfs@vger.kernel.org, ceph-devel@vger.kernel.org, codalist@coda.cs.cmu.edu, ecryptfs@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-um@lists.infradead.org, linux-mtd@lists.infradead.org, jfs-discussion@lists.sourceforge.net, linux-nfs@vger.kernel.org, linux-nilfs@vger.kernel.org, ntfs3@lists.linux.dev, ocfs2-devel@lists.linux.dev, linux-karma-devel@lists.sourceforge.net, devel@lists.orangefs.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-xfs@vger.kernel.org, nvdimm@lists.linux.dev Subject: Re: [PATCH 03/10] fs: consistently use file_has_valid_mmap_hooks() helper Message-ID: References: Precedence: bulk X-Mailing-List: ceph-devel@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: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Mon, Jun 16, 2025 at 08:33:22PM +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(). > > Additionally, commit bb666b7c2707 ("mm: add mmap_prepare() compatibility > layer for nested file systems") permits the use of the .mmap_prepare() hook > even in nested filesystems like overlayfs. > > There are a number of places where we check only for f_op->mmap - this is > incorrect now mmap_prepare exists, so update all of these to use the > general helper file_has_valid_mmap_hooks(). > > Most notably, this updates the elf logic to allow for the ability to > execute binaries on filesystems which have the .mmap_prepare hook, but > additionally we update nested filesystems. Can you please give the function a better name before spreading it? file operations aren't hooks by any classic definition. 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 lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (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 472F2C71155 for ; Tue, 17 Jun 2025 05:12:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:In-Reply-To:MIME-Version:References:Message-ID:To:From:Date:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vhJOcpt1Sfz8yUkIObJ6H4OoVhRfi44bzmL5FQKRFqc=; b=ICeL2pHtP5cC3hyPXHk0iTBSp5 MpboOSJ9VoufflJqhwlzZKaKgE7EgnO6Ld6d3qfpGKtR4xJd8o6166RyL48oEZ4UHu5VLKldOCGJl Bvm9Z6HO53IoUxVcstTHrDKHfWS/1ucXRJPZLFInnh3+YB2xKUh/TFkzf7pEujag5GCU=; Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1uROc9-0006JO-UR; Tue, 17 Jun 2025 05:12:05 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1uROc8-0006JB-GP; Tue, 17 Jun 2025 05:12:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=WPsxJQ/JXacvbaipg//fOLi1s4GO46A+9y4pCE6t2y4=; b=S2zlx5Eo5NtgpI1nBj/iVcZdxS 2531A6ft0Uy+oNj/LbVdj2qrw6/SJsKkFaODXAsa4DO+hCsJg5DmpHuPeW6H7/YxnM5BDNJsEwxgm KFk3Ub9eTxz5/im5p8dk6SnDvnoHN46bY9UwG8Xv5Q+GEuWwIyQhqgZmVLs9Fm8/ViWI=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=WPsxJQ/JXacvbaipg//fOLi1s4GO46A+9y4pCE6t2y4=; b=Vr5lAuoVrCnG2sAjuxQrAFu/rm 2rDH4IneZnqELm0WK5uNOWBONnC6f4ifF4ym88AeE2MJKCRNOuNa6wiB/3MPlxJSWpaOaEOh7Wp7a KPdg4Stn50QdOMjHZGRmvqZ2S5Kv5KcRv9KpwtK1SNMEUx4XUZr+BoZ6Zfpq1mGk1e9g=; Received: from bombadil.infradead.org ([198.137.202.133]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1uROc8-0002ju-5k; Tue, 17 Jun 2025 05:12:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=WPsxJQ/JXacvbaipg//fOLi1s4GO46A+9y4pCE6t2y4=; b=xCxiDspWK79oWST3sh2t7cjJwF 3VtKzrTMd1ZyyEY3Yl1sQsmN0c46B/BWpmLx7GLhCFM16aw7g83BPPAETUVk7GelPlveK5I6sQ8E5 ZxtytrGUEhUU9WZrIuJuMFvFwuFp4vj1nvN+EaRMqHi+KIfudASk+LhjQu9+lmF+F3IZYi7Ydf/Wk JTa1n3Fl61HKkjYiCIqjoqvwn7L3e/9n7XP0zshPQ9POdY/W9y4mdeV8e8mm04X6AEWaAswnDA8V3 ZzeHtQqEnK2Y08dx0p/c6HZZCAPv4hvcg6CW2TmaFuNbCfjDhPGzoMVT4DrV3ggoDKSwdUATpVwPQ nIJAAeQw==; Received: from hch by bombadil.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1uRObY-00000006ERs-1HY9; Tue, 17 Jun 2025 05:11:28 +0000 Date: Mon, 16 Jun 2025 22:11:28 -0700 From: Christoph Hellwig To: Lorenzo Stoakes Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Headers-End: 1uROc8-0002ju-5k Subject: Re: [f2fs-dev] [PATCH 03/10] fs: consistently use file_has_valid_mmap_hooks() helper X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Latchesar Ionkov , nvdimm@lists.linux.dev, Paulo Alcantara , dri-devel@lists.freedesktop.org, ceph-devel@vger.kernel.org, Mike Marshall , linux-xfs@vger.kernel.org, Tyler Hicks , devel@lists.orangefs.org, Shyam Prasad N , Jan Harkes , linux-um@lists.infradead.org, Joel Becker , Ronnie Sahlberg , John Paul Adrian Glaubitz , Eric Van Hensbergen , Christian Brauner , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Andrew Morton , Trond Myklebust , Dave Kleikamp , Sandeep Dhavale , Simona Vetter , linux-cifs@vger.kernel.org, linux-nilfs@vger.kernel.org, codalist@coda.cs.cmu.edu, Namjae Jeon , ecryptfs@vger.kernel.org, Yangtao Li , Jani Nikula , ocfs2-devel@lists.linux.dev, Pedro Falcato , OGAWA Hirofumi , linux-block@vger.kernel.org, Theodore Ts'o , linux-f2fs-devel@lists.sourceforge.net, Hongbo Li , Anna Schumaker , Martin Brandenburg , Kees Cook , Yuezhang Mo , Carlos Maiolino , Joonas Lahtinen , Chris Mason , linux-mtd@lists.infradead.org, Jaegeuk Kim , Marc Dionne , Tvrtko Ursulin , linux-afs@lists.infradead.org, Naohiro Aota , Miklos Szeredi , Matthew Wilcox , coda@cs.cmu.edu, Viacheslav Dubeyko , Ilya Dryomov , linux-ext4@vger.kernel.org, Amir Goldstein , intel-gfx@lists.freedesktop.org, Damien Le Moal , Rodrigo Vivi , Dan Williams , Gao Xiang , David Howells , linux-nfs@vger.kernel.org, linux-mm@kvack.org, samba-technical@lists.samba.org, Steve French , ntfs3@lists.linux.dev, linux-erofs@lists.ozlabs.org, jfs-discussion@lists.sourceforge.net, Jan Kara , linux-aio@kvack.org, Dominique Martinet , Christian Schoenebeck , Bob Copeland , Konstantin Komarov , Joseph Qi , Andreas Dilger , Mikulas Patocka , David Airlie , Anton Ivanov , Yue Hu , Richard Weinberger , Mark Fasheh , linux-bcachefs@vger.kernel.org, Jann Horn , Josef Bacik , "Liam R . Howlett" , Tom Talpey , Hans de Goede , Bharath SM , "Tigran A . Aivazian" , David Sterba , Xiubo Li , Ryusuke Konishi , Vlastimil Babka , Jens Axboe , Sungjong Seo , v9fs@lists.linux.dev, Kent Overstreet , linux-unionfs@vger.kernel.org, Benjamin LaHaise , Jeffle Xu , Johannes Berg , Johannes Thumshirn , David Woodhouse , linux-karma-devel@lists.sourceforge.net, linux-btrfs@vger.kernel.org, Alexander Viro Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Mon, Jun 16, 2025 at 08:33:22PM +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(). > > Additionally, commit bb666b7c2707 ("mm: add mmap_prepare() compatibility > layer for nested file systems") permits the use of the .mmap_prepare() hook > even in nested filesystems like overlayfs. > > There are a number of places where we check only for f_op->mmap - this is > incorrect now mmap_prepare exists, so update all of these to use the > general helper file_has_valid_mmap_hooks(). > > Most notably, this updates the elf logic to allow for the ability to > execute binaries on filesystems which have the .mmap_prepare hook, but > additionally we update nested filesystems. Can you please give the function a better name before spreading it? file operations aren't hooks by any classic definition. _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel 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 517B8C7114A for ; Tue, 17 Jun 2025 05:11:32 +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:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iuqL4xApLDNoFhD4gRfFONudaR/0fhSPOWYsC1Ft7nQ=; b=VzpnyFXG6v26RS cpsESbxAgrEys50Mq0taJf1FJT2VCmZiOPRpJCsYs0K9/7W4z8RLJRvmUi6U6+mDQcOaG7wY8O8ss 7p+ii9F5bvgdNt4nmNYsld5xzsZSn/9Li3mfegybPQIgPNerJXTlzthAaQChpZrh9F4gdS0DQSiqB 1ErdR0uHOxvPHYqJKWQ4inE5sqneCNlz4/HbFei9Kc/oi1bIbyd/CoS8cMlg6qJknAOgMquTU0yH/ dJbeeqV8kzVEl15wKMrifpYvO61fpNCDcSGX/56sc7LLcBU3wtBIMcT8TsXYJ6LzU6diSpbropBCw 2AjEMz35MU7JdPIE9Q1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uROba-00000006ETf-3Hwb; Tue, 17 Jun 2025 05:11:30 +0000 Received: from hch by bombadil.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1uRObY-00000006ERs-1HY9; Tue, 17 Jun 2025 05:11:28 +0000 Date: Mon, 16 Jun 2025 22:11:28 -0700 From: Christoph Hellwig To: Lorenzo Stoakes Cc: Andrew Morton , "Liam R . Howlett" , Jens Axboe , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Simona Vetter , Eric Van Hensbergen , Latchesar Ionkov , Dominique Martinet , Christian Schoenebeck , David Sterba , David Howells , Marc Dionne , Alexander Viro , Christian Brauner , Jan Kara , Benjamin LaHaise , Miklos Szeredi , Amir Goldstein , Kent Overstreet , "Tigran A . Aivazian" , Kees Cook , Chris Mason , Josef Bacik , Xiubo Li , Ilya Dryomov , Jan Harkes , coda@cs.cmu.edu, Tyler Hicks , Gao Xiang , Chao Yu , Yue Hu , Jeffle Xu , Sandeep Dhavale , Hongbo Li , Namjae Jeon , Sungjong Seo , Yuezhang Mo , Theodore Ts'o , Andreas Dilger , Jaegeuk Kim , OGAWA Hirofumi , Viacheslav Dubeyko , John Paul Adrian Glaubitz , Yangtao Li , Richard Weinberger , Anton Ivanov , Johannes Berg , Mikulas Patocka , David Woodhouse , Dave Kleikamp , Trond Myklebust , Anna Schumaker , Ryusuke Konishi , Konstantin Komarov , Mark Fasheh , Joel Becker , Joseph Qi , Bob Copeland , Mike Marshall , Martin Brandenburg , Steve French , Paulo Alcantara , Ronnie Sahlberg , Shyam Prasad N , Tom Talpey , Bharath SM , Zhihao Cheng , Hans de Goede , Carlos Maiolino , Damien Le Moal , Naohiro Aota , Johannes Thumshirn , Dan Williams , Matthew Wilcox , Vlastimil Babka , Jann Horn , Pedro Falcato , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, v9fs@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-afs@lists.infradead.org, linux-aio@kvack.org, linux-unionfs@vger.kernel.org, linux-bcachefs@vger.kernel.org, linux-mm@kvack.org, linux-btrfs@vger.kernel.org, ceph-devel@vger.kernel.org, codalist@coda.cs.cmu.edu, ecryptfs@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-um@lists.infradead.org, linux-mtd@lists.infradead.org, jfs-discussion@lists.sourceforge.net, linux-nfs@vger.kernel.org, linux-nilfs@vger.kernel.org, ntfs3@lists.linux.dev, ocfs2-devel@lists.linux.dev, linux-karma-devel@lists.sourceforge.net, devel@lists.orangefs.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-xfs@vger.kernel.org, nvdimm@lists.linux.dev Subject: Re: [PATCH 03/10] fs: consistently use file_has_valid_mmap_hooks() helper Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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 Mon, Jun 16, 2025 at 08:33:22PM +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(). > > Additionally, commit bb666b7c2707 ("mm: add mmap_prepare() compatibility > layer for nested file systems") permits the use of the .mmap_prepare() hook > even in nested filesystems like overlayfs. > > There are a number of places where we check only for f_op->mmap - this is > incorrect now mmap_prepare exists, so update all of these to use the > general helper file_has_valid_mmap_hooks(). > > Most notably, this updates the elf logic to allow for the ability to > execute binaries on filesystems which have the .mmap_prepare hook, but > additionally we update nested filesystems. Can you please give the function a better name before spreading it? file operations aren't hooks by any classic definition. ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/