Re: [PATCH v5 0/2] fanotify: lift pidfd reporting restrictions
From: Christian Brauner
Date: Wed Jun 10 2026 - 03:32:15 EST
On Tue, Jun 09, 2026 at 12:29:05PM +0200, Jan Kara wrote:
> On Sun 07-06-26 08:33:41, AnonymeMeow wrote:
> > The pidfd API now supports pidfds for tasks that are not thread group leaders,
> > but fanotify has not caught up yet. This patch set lifts that restriction and
> > allows fanotify to report pidfds referring to the event-generating thread.
> >
> > Additionally, this patch set allows fanotify to hand out pidfds for reaped
> > tasks by registering the event pid with pidfs when pidfd reporting is
> > requested and dropping the pid_has_task() check before the pidfd_prepare()
> > call, as suggested by Christian.
> >
> > Link: https://lore.kernel.org/lkml/20260528-schmuckvoll-heilen-garen-be77b4208671@brauner/
> > Link: https://lore.kernel.org/lkml/20260602-patzt-sturz-segen-f1f305d61b75@brauner/
> >
> > Changes since v4:
> > - Add a pidfs_register_pid_gfp() helper function to pass in custom flags.
> >
> > v4: https://lore.kernel.org/lkml/20260603001516.26234-1-anonymemeow@xxxxxxxxx/
>
> The patches look good to me. Thanks! I'd prefer the change adding gfp
> argument to pidfs_register_pid() was a separate commit but unless Christian
> objects I can live with that. I'll wait for Christian's ack for pidfs
I would also prefer it to be a separate commit but same as you I'm not
gonna insist. :)
> changes before merging this through my tree.
Signed-off-by: Christian Brauner (Amutable) <brauner@xxxxxxxxxx>