On June 16, 2025 12:33:22 PM PDT, Lorenzo Stoakes <[email protected]> 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 <[email protected]> >--- > fs/backing-file.c | 2 +- > fs/binfmt_elf.c | 4 ++-- > fs/binfmt_elf_fdpic.c | 2 +- Thanks for the refactoring! Acked-by: Kees Cook<[email protected]> -- Kees Cook
- Re: [PATCH 04/10] fs/dax: make it possible to ... Christian Brauner
- [PATCH 07/10] mm/filemap: introduce generic_file_*_mmap... Lorenzo Stoakes
- [PATCH 01/10] mm: rename call_mmap/mmap_prepare to vfs_... Lorenzo Stoakes
- Re: [PATCH 01/10] mm: rename call_mmap/mmap_prepar... Christoph Hellwig
- Re: [PATCH 01/10] mm: rename call_mmap/mmap_pr... Lorenzo Stoakes
- [PATCH 08/10] fs: convert simple use of generic_file_*_... Lorenzo Stoakes
- Re: [PATCH 08/10] fs: convert simple use of gener... Viacheslav Dubeyko
- Re: [PATCH 08/10] fs: convert simple use of generi... Jan Kara
- [PATCH 03/10] fs: consistently use file_has_valid_mmap_... Lorenzo Stoakes
- Re: [PATCH 03/10] fs: consistently use file_has_va... Kees Cook
- Re: [PATCH 03/10] fs: consistently use file_has_va... Christoph Hellwig
- Re: [PATCH 03/10] fs: consistently use file_ha... Lorenzo Stoakes
- Re: [PATCH 03/10] fs: consistently use fil... Christoph Hellwig
- Re: [PATCH 03/10] fs: consistently use fil... Jan Kara
- Re: [PATCH 03/10] fs: consistently use... Christian Brauner
- [PATCH 06/10] fs/xfs: transition from deprecated .mmap ... Lorenzo Stoakes
- Re: [PATCH 06/10] fs/xfs: transition from deprecat... Christoph Hellwig
- Re: [PATCH 06/10] fs/xfs: transition from depr... Christian Brauner
- [PATCH 10/10] fs: replace mmap hook with .mmap_prepare ... Lorenzo Stoakes
- Re: [PATCH 10/10] fs: replace mmap hook with .mmap... Damien Le Moal
