Re: [PATCH 1/2] proc: protect ptrace_may_access() with exec_update_lock (part 1)
From: Jann Horn
Date: Tue May 26 2026 - 10:30:25 EST
On Tue, May 26, 2026 at 11:44 AM Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
> Perhaps proc_pid_make_inode() can record task->self_exec_id in
> proc_inode ? At least this can help to fix the
> "if (ptrace_may_access(task)) mm = get_task_mm(task)" pattern...
Yes, I think something like that might be a good idea for files that
access the process in read/write handlers, though I think recording it
somewhere in file->private_data would be better than putting it in the
proc_inode.