Re: [PATCH v5 1/2] mm/process_vm_access: pidfd and nowait support for process_vm_readv/writev
From: David Hildenbrand (Arm)
Date: Wed Jun 03 2026 - 10:04:28 EST
> However, the exited-leader case is a real limitation for profilers.
> OpenTelemetry eBPF Profiler wants to profile a process where the main thread
> has exited but secondary threads are still running [2].
> [2] https://github.com/open-telemetry/opentelemetry-ebpf-profiler/pull/376
>
> Using plain TIDs (flags=0) would work, but it means users cannot use
> PROCESS_VM_PIDFD in this scenario.
>
> What do you think this patch should do? I see two options:
> - Address this limitation in a separate future patch that fixes
> pidfd_get_task() to use PIDTYPE_PID when PIDFD_THREAD is detected in
> f_flags, benefiting all callers (process_vm_readv, process_madvise,
> and any future users).
Extending it consistently for that scenario seems like the right thing to do?
@Christian?
--
Cheers,
David