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 454C7C7EE2A for ; Thu, 19 Jun 2025 20:25:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=WPsxJQ/JXacvbaipg//fOLi1s4GO46A+9y4pCE6t2y4=; b=c8X/NF9eqqJ7pRjD0xiUHSRG0z Hh2xq06DRq5EbUJctoBaVb6gL6ScEkK75B4lwqdic1YxiSSlUrQw3TKcFz6Zlfl+BQ4qgldCRssC2 ckh7oAIiTx4GvGYbszpro0L4QCWsL7DRei5jjcv0iU03sFE1c/OJBzTu6BH8XLiCY4tF/THCk11nr 87r3Sw5/GEw0//EFps49HRej1XsNTqR67US7NEctKHEzeYtf3ZLebfIRLxiyc0X0S/XdPHNw16C5Z 8cQAzEsRKGkfq7xQ4yTOoTCMRij8+xY+uPhF9evlC09dCD81IiTgjiFc61TZY+Of7v4qFW6tQ/krh WEwZGTdA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uSLp9-0000000ECJQ-4BGn; Thu, 19 Jun 2025 20:25:28 +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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailman-Approved-At: Thu, 19 Jun 2025 13:21:43 -0700 X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+linux-um=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.