mbox series

[0/2] Fix encoding overlayfs fid for fanotify delete events

Message ID 20250105162404.357058-1-amir73il@gmail.com (mailing list archive)
Headers show
Series Fix encoding overlayfs fid for fanotify delete events | expand

Message

Amir Goldstein Jan. 5, 2025, 4:24 p.m. UTC
Christian,

This is a followup fix to the reported regression [1] that was
introduced by overlayfs non-decodable file handles support in v6.6.

The first fix posted two weeks ago [2] was a quick band aid which is
justified on its own and is still queued on your vfs.fixes branch.

This followup fix fixes the root cause of overlayfs file handle encoding
failure and it also solves a bug with fanotify FAN_DELETE_SELF events on
overlayfs, that was discovered from analysis of the first report.

The fix to fanotify delete events was verified with a new LTP test [3].

Thanks,
Amir.

[1] https://lore.kernel.org/linux-fsdevel/CAOQ4uxiie81voLZZi2zXS1BziXZCM24nXqPAxbu8kxXCUWdwOg@mail.gmail.com/
[2] https://lore.kernel.org/linux-fsdevel/20241219115301.465396-1-amir73il@gmail.com/
[3] https://github.com/amir73il/ltp/commits/ovl_encode_fid/

Amir Goldstein (2):
  ovl: pass realinode to ovl_encode_real_fh() instead of realdentry
  ovl: support encoding fid from inode with no alias

 fs/overlayfs/copy_up.c   | 11 +++++----
 fs/overlayfs/export.c    | 49 ++++++++++++++++++++++------------------
 fs/overlayfs/namei.c     |  4 ++--
 fs/overlayfs/overlayfs.h |  2 +-
 4 files changed, 36 insertions(+), 30 deletions(-)