diff mbox series

[v1,1/3] perf: MAP_EXECUTABLE does not indicate VM_MAYEXEC

Message ID 20210421093453.6904-2-david@redhat.com (mailing list archive)
State New, archived
Headers show
Series perf/binfmt/mm: remove in-tree usage of MAP_EXECUTABLE | expand

Commit Message

David Hildenbrand April 21, 2021, 9:34 a.m. UTC
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.

Fixes: f972eb63b100 ("perf: Pass protection and flags bits through mmap2 interface")
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: David Hildenbrand <david@redhat.com>
---
 kernel/events/core.c | 2 --
 1 file changed, 2 deletions(-)
diff mbox series

Patch

diff --git a/kernel/events/core.c b/kernel/events/core.c
index 03db40f6cba9..3dfd463f1831 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -8186,8 +8186,6 @@  static void perf_event_mmap_event(struct perf_mmap_event *mmap_event)
 
 	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))