Re: [PATCH 1/2] proc: protect ptrace_may_access() with exec_update_lock (part 1)
From: Oleg Nesterov
Date: Tue May 26 2026 - 14:23:04 EST
On 05/26, Jann Horn wrote:
>
> On Tue, May 26, 2026 at 10:48 AM Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
> > On 05/18, Jann Horn wrote:
> > >
> > > Fix the easy cases where procfs currently calls ptrace_may_access() without
> > > exec_update_lock protection, where the fix is to simply add the extra lock
> > > or use mm_access():
> >
> > I thought about this too, but I do not know if it is fine performance wise...
> >
> > And what about proc_coredump_filter_write() which doesn't use ptrace_may_access() ?
>
> Yeah, this series doesn't fix everything,
Aah... Of course, I understand. I wasn't clear. Sorry if it looked as
"you missed proc_coredump_filter_write" from my side.
What I actually tried to ask:
- Do you think it makes sense to fix proc_coredump_filter_write()
as well?
- If yes. Do you think we should add another down_read(exec_update_lock) +
ptrace_may_access() into proc_coredump_filter_write() ? Or perhaps we
should discuss other approaches (exec_id/seqcount/etc) from the very
beginning?
Oleg.