Linux filesystem development
 help / color / mirror / Atom feed
* [PATCH v4 0/2] fanotify: lift pidfd reporting restrictions
@ 2026-06-03  0:15 AnonymeMeow
  2026-06-03  0:15 ` [PATCH v4 1/2] fanotify: report thread pidfds for FAN_REPORT_TID AnonymeMeow
  2026-06-03  0:15 ` [PATCH v4 2/2] fanotify: allow reporting pidfds for reaped tasks AnonymeMeow
  0 siblings, 2 replies; 20+ messages in thread
From: AnonymeMeow @ 2026-06-03  0:15 UTC (permalink / raw)
  To: jack; +Cc: amir73il, brauner, linux-fsdevel, linux-kernel, AnonymeMeow

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 v3:
 - Make fanotify_alloc_event() fail if pidfs_register_pid() fails.

v3: https://lore.kernel.org/lkml/20260530013732.50811-1-anonymemeow@gmail.com/

AnonymeMeow (2):
  fanotify: report thread pidfds for FAN_REPORT_TID
  fanotify: allow reporting pidfds for reaped tasks

 fs/notify/fanotify/fanotify.c      | 16 +++++++++------
 fs/notify/fanotify/fanotify_user.c | 33 +++++++-----------------------
 2 files changed, 17 insertions(+), 32 deletions(-)

-- 
2.54.0


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2026-06-10  7:42 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-03  0:15 [PATCH v4 0/2] fanotify: lift pidfd reporting restrictions AnonymeMeow
2026-06-03  0:15 ` [PATCH v4 1/2] fanotify: report thread pidfds for FAN_REPORT_TID AnonymeMeow
2026-06-03  9:55   ` Amir Goldstein
2026-06-03  0:15 ` [PATCH v4 2/2] fanotify: allow reporting pidfds for reaped tasks AnonymeMeow
2026-06-03  3:11   ` AnonymeMeow
2026-06-03 10:00     ` Amir Goldstein
2026-06-03 10:28       ` Christian Brauner
2026-06-03 10:58         ` Amir Goldstein
2026-06-03 11:25           ` Christian Brauner
2026-06-03 12:02             ` Amir Goldstein
2026-06-04 20:29             ` AnonymeMeow
2026-06-05  7:54               ` Christian Brauner
2026-06-05  8:15                 ` Amir Goldstein
2026-06-05  8:19                   ` Christian Brauner
2026-06-05  8:28                     ` Amir Goldstein
2026-06-06 23:45                 ` AnonymeMeow
2026-06-10  7:42                   ` Christian Brauner
2026-06-04 19:46       ` [DRAFT][PATCH] fanotify: lift pidfd reporting restrictions AnonymeMeow
2026-06-05  8:23         ` Amir Goldstein
2026-06-05 10:04           ` Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox