On June 16, 2025 12:33:22 PM PDT, Lorenzo Stoakes <lorenzo.stoa...@oracle.com> 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. > >Signed-off-by: Lorenzo Stoakes <lorenzo.stoa...@oracle.com> >--- > fs/backing-file.c | 2 +- > fs/binfmt_elf.c | 4 ++-- > fs/binfmt_elf_fdpic.c | 2 +- Thanks for the refactoring! Acked-by: Kees Cook<k...@kernel.org> -- Kees Cook _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH 03/10] fs: consistently use file_has_valid_mmap_hooks() helper
Kees Cook via Linux-f2fs-devel Mon, 16 Jun 2025 14:51:09 -0700
- Re: [f2fs-dev] [PATCH 02/10] ... Jan Kara
- [f2fs-dev] [PATCH 07/10] mm/filema... Lorenzo Stoakes via Linux-f2fs-devel
- Re: [f2fs-dev] [PATCH 07/10] ... Jan Kara
- [f2fs-dev] [PATCH 06/10] fs/xfs: t... Lorenzo Stoakes via Linux-f2fs-devel
- Re: [f2fs-dev] [PATCH 06/10] ... Christoph Hellwig
- Re: [f2fs-dev] [PATCH 06/... Christian Brauner via Linux-f2fs-devel
- [f2fs-dev] [PATCH 08/10] fs: conve... Lorenzo Stoakes via Linux-f2fs-devel
- Re: [f2fs-dev] [PATCH 08/10] ... Viacheslav Dubeyko via Linux-f2fs-devel
- Re: [f2fs-dev] [PATCH 08/10] ... Jan Kara
- [f2fs-dev] [PATCH 03/10] fs: consi... Lorenzo Stoakes via Linux-f2fs-devel
- Re: [f2fs-dev] [PATCH 03/10] ... Kees Cook via Linux-f2fs-devel
- Re: [f2fs-dev] [PATCH 03/10] ... Christoph Hellwig
- Re: [f2fs-dev] [PATCH 03/... Lorenzo Stoakes via Linux-f2fs-devel
- Re: [f2fs-dev] [PATCH... Christoph Hellwig
- Re: [f2fs-dev] [PATCH... Jan Kara
- Re: [f2fs-dev] [P... Christian Brauner via Linux-f2fs-devel
- [f2fs-dev] [PATCH 10/10] fs: repla... Lorenzo Stoakes via Linux-f2fs-devel
- Re: [f2fs-dev] [PATCH 10/10] ... Damien Le Moal via Linux-f2fs-devel
- Re: [f2fs-dev] [PATCH 10/10] ... Viacheslav Dubeyko via Linux-f2fs-devel
- Re: [f2fs-dev] [PATCH 10/10] ... Jan Kara
- Re: [f2fs-dev] [PATCH 10/... Christian Brauner via Linux-f2fs-devel