Merge tag 'perf_urgent_for_v6.18_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf fixes from Borislav Petkov:

- Make sure perf reporting works correctly in setups using
overlayfs or FUSE

- Move the uprobe optimization to a better location logically

* tag 'perf_urgent_for_v6.18_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf/core: Fix MMAP2 event device with backing files
perf/core: Fix MMAP event path names with backing files
perf/core: Fix address filter match with backing files
uprobe: Move arch_uprobe_optimize right after handlers execution

Changed files
+7 -7
kernel
events
+4 -4
kernel/events/core.c
··· 9403 9403 flags |= MAP_HUGETLB; 9404 9404 9405 9405 if (file) { 9406 - struct inode *inode; 9406 + const struct inode *inode; 9407 9407 dev_t dev; 9408 9408 9409 9409 buf = kmalloc(PATH_MAX, GFP_KERNEL); ··· 9416 9416 * need to add enough zero bytes after the string to handle 9417 9417 * the 64bit alignment we do later. 9418 9418 */ 9419 - name = file_path(file, buf, PATH_MAX - sizeof(u64)); 9419 + name = d_path(file_user_path(file), buf, PATH_MAX - sizeof(u64)); 9420 9420 if (IS_ERR(name)) { 9421 9421 name = "//toolong"; 9422 9422 goto cpy_name; 9423 9423 } 9424 - inode = file_inode(vma->vm_file); 9424 + inode = file_user_inode(vma->vm_file); 9425 9425 dev = inode->i_sb->s_dev; 9426 9426 ino = inode->i_ino; 9427 9427 gen = inode->i_generation; ··· 9492 9492 if (!filter->path.dentry) 9493 9493 return false; 9494 9494 9495 - if (d_inode(filter->path.dentry) != file_inode(file)) 9495 + if (d_inode(filter->path.dentry) != file_user_inode(file)) 9496 9496 return false; 9497 9497 9498 9498 if (filter->offset > offset + size)
+3 -3
kernel/events/uprobes.c
··· 2765 2765 2766 2766 handler_chain(uprobe, regs); 2767 2767 2768 + /* Try to optimize after first hit. */ 2769 + arch_uprobe_optimize(&uprobe->arch, bp_vaddr); 2770 + 2768 2771 /* 2769 2772 * If user decided to take execution elsewhere, it makes little sense 2770 2773 * to execute the original instruction, so let's skip it. 2771 2774 */ 2772 2775 if (instruction_pointer(regs) != bp_vaddr) 2773 2776 goto out; 2774 - 2775 - /* Try to optimize after first hit. */ 2776 - arch_uprobe_optimize(&uprobe->arch, bp_vaddr); 2777 2777 2778 2778 if (arch_uprobe_skip_sstep(&uprobe->arch, regs)) 2779 2779 goto out;