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 3A11121CA00; Tue, 17 Jun 2025 11:48:30 +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=1750160911; cv=none; b=Ogd2BApvtD8CrMhKTAMPUF24o6Wz45GkICKPluA/UDzrt6KXPx4Q8I724DFWECqvfhDGoZiOB6gX5dVzy//6J7B3HsJ8vJlSHA/a5RrL/3ujkUXrQ0rGLh8q7UD9eHdyQP/n5pG2ThQ4frRf1yxGSX3m2yszLqxdd3NiEZOm5mg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750160911; c=relaxed/simple; bh=Vnr3kmvDQPz8s5uZNmSkWKP9XPj/+f6PNSLS1Tx/MzQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pEuwAgYZqbkt3u3F8Av7K9o6QoQh5o2dkY5g2NA1wJFBVG7jrXA+9FILMasvqLjrNaecGVukjOiqQ/lN1isvIuVw/7j1JaFkSDRwfYWWIurA/xvRztYZY3UBNp6WLLhVMO/PTOM+XSMPK2s1dKt5yULVPc4S6KNMoQNWkhZWFzs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=i76Wd947; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="i76Wd947" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40C6FC4CEE3; Tue, 17 Jun 2025 11:48:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1750160910; bh=Vnr3kmvDQPz8s5uZNmSkWKP9XPj/+f6PNSLS1Tx/MzQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=i76Wd947DS4XwAcDpAS8fpuf+Ela4lfUx5B4Zl+sE1WJ8kzwgrCbFciE3rigUUS/6 wkwvrTbKDnBSYG4C5HYytRyvy7B3ZkCeJ/5F35ij31zEXxn65NXesNNhKSYHlLq/2D R33NY8eYZWteN9O+9G//EUF0UQxUiz+Y2C7gC+ejd2PqldQ355joR8oksRp/9Bu+B9 HCJ+eqE2ygFdOjJuUuFVDO+rKmgk2g66UaZmVaAWhJlsobI+L+ldnr5kvasHnLLQtL 3ZDhNpWvRvvYFALgNe61XXKpKO8zT2d+3DmY+NeMp1GFEAHy45cWCYw7RMgE+f8kCe WOUfPvP6PlRuw== Date: Tue, 17 Jun 2025 13:48:04 +0200 From: Christian Brauner To: Jan Kara Cc: Lorenzo Stoakes , Christoph Hellwig , 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 , 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: <20250617-mitstreiter-bewahren-455b96bd1d50@brauner> References: Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On Tue, Jun 17, 2025 at 12:08:13PM +0200, Jan Kara wrote: > On Tue 17-06-25 06:25:34, Lorenzo Stoakes wrote: > > On Mon, Jun 16, 2025 at 10:11:28PM -0700, Christoph Hellwig wrote: > > > 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. > > > > > > > can_mmap_file()? > > I like this name more as well :). With this patch looks good to me. Again a Fixed in-tree.