The patch titled Subject: perf: MAP_EXECUTABLE does not indicate VM_MAYEXEC has been added to the -mm tree. Its filename is perf-map_executable-does-not-indicate-vm_mayexec.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/perf-map_executable-does-not-indicate-vm_mayexec.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/perf-map_executable-does-not-indicate-vm_mayexec.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: David Hildenbrand <david@xxxxxxxxxx> Subject: perf: MAP_EXECUTABLE does not indicate VM_MAYEXEC Patch series "perf/binfmt/mm: remove in-tree usage of MAP_EXECUTABLE". Stumbling over the history of MAP_EXECUTABLE, I noticed that we still have some in-tree users that we can get rid of. This patch (of 3): Before commit e9714acf8c43 ("mm: kill vma flag VM_EXECUTABLE and mm->num_exe_file_vmas"), VM_EXECUTABLE indicated MAP_EXECUTABLE. MAP_EXECUTABLE is nowadays essentially ignored by the kernel and does not relate to VM_MAYEXEC. Link: https://lkml.kernel.org/r/20210421093453.6904-1-david@xxxxxxxxxx Link: https://lkml.kernel.org/r/20210421093453.6904-2-david@xxxxxxxxxx Fixes: f972eb63b100 ("perf: Pass protection and flags bits through mmap2 interface") Signed-off-by: David Hildenbrand <david@xxxxxxxxxx> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Acked-by: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx> Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: Borislav Petkov <bp@xxxxxxxxx> Cc: "H. Peter Anvin" <hpa@xxxxxxxxx> Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx> Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> Cc: Mark Rutland <mark.rutland@xxxxxxx> Cc: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx> Cc: Jiri Olsa <jolsa@xxxxxxxxxx> Cc: Namhyung Kim <namhyung@xxxxxxxxxx> Cc: Greg Ungerer <gerg@xxxxxxxxxxxxxx> Cc: Mike Rapoport <rppt@xxxxxxxxxx> Cc: Catalin Marinas <catalin.marinas@xxxxxxx> Cc: Kevin Brodsky <Kevin.Brodsky@xxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxx> Cc: Feng Tang <feng.tang@xxxxxxxxx> Cc: Don Zickus <dzickus@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/events/core.c | 2 -- 1 file changed, 2 deletions(-) --- a/kernel/events/core.c~perf-map_executable-does-not-indicate-vm_mayexec +++ a/kernel/events/core.c @@ -8306,8 +8306,6 @@ static void perf_event_mmap_event(struct if (vma->vm_flags & VM_DENYWRITE) flags |= MAP_DENYWRITE; - if (vma->vm_flags & VM_MAYEXEC) - flags |= MAP_EXECUTABLE; if (vma->vm_flags & VM_LOCKED) flags |= MAP_LOCKED; if (is_vm_hugetlb_page(vma)) _ Patches currently in -mm which might be from david@xxxxxxxxxx are perf-map_executable-does-not-indicate-vm_mayexec.patch binfmt-remove-in-tree-usage-of-map_executable.patch mm-ignore-map_executable-in-ksys_mmap_pgoff.patch