Skip to content

Commit

Permalink
/proc/pid/map_files: fake all lineage symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
backslashxx committed Dec 16, 2024
1 parent 5c7b57d commit ea7585f
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -2190,11 +2190,17 @@ static int map_files_get_link(struct dentry *dentry, struct path *path)
rc = -ENOENT;
down_read(&mm->mmap_sem);
vma = find_exact_vma(mm, vm_start, vm_end);
if (vma && vma->vm_file) {
*path = vma->vm_file->f_path;
path_get(path);
rc = 0;
}
if (vma) {
if (vma->vm_file) {
if (strstr(vma->vm_file->f_path.dentry->d_name.name, "lineage")) {
rc = kern_path("/dev/ashmem (deleted)", LOOKUP_FOLLOW, path);
} else {
*path = vma->vm_file->f_path;
path_get(path);
rc = 0;
}
}
}
up_read(&mm->mmap_sem);

out_mmput:
Expand Down

0 comments on commit ea7585f

Please sign in to comment.