Skip to content

fanotify: lift pidfd reporting restrictions

AnonymeMeow linux-fsdevel lkml ltp 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest2 patches 3 repliesIn review
  2. v42 patches 14 repliesSuperseded
  3. v32 patches 3 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v21 patch4 repliesSuperseded
v11 patch2 repliesSuperseded

Changes in v5 from the cover letter

- Add a pidfs_register_pid_gfp() helper function to pass in custom flags.

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2fanotify: report thread pidfds for FAN_REPORT_TIDfs/notify/fanotify/fanotify_user.c+8 -190 replies
2/2fanotify: allow reporting pidfds for reaped tasksfs/notify/fanotify/fanotify.c fs/notify/fanotify/fanotify_user.c fs/pidfs.c +1 more+39 -240 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAmir GoldsteinJan Kara
SeriesR-b R-b R-b R-b R-b
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/2] fanotify: lift pidfd reporting restrictions

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.

Changes since v4:
- Add a pidfs_register_pid_gfp() helper function to pass in custom flags.

v4: https://lore.kernel.org/lkml/[email protected]/

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

 fs/notify/fanotify/fanotify.c      | 17 +++++++++------
 fs/notify/fanotify/fanotify_user.c | 33 +++++++-----------------------
 fs/pidfs.c                         | 10 +++++----
 include/linux/pidfs.h              | 18 +++++++++++++++-
 4 files changed, 41 insertions(+), 37 deletions(-)
Signature · 1 line
2.54.0