lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <176602332484.688213.11232314346072982565.stgit@frogsfrogsfrogs>
Date: Wed, 17 Dec 2025 18:02:50 -0800
From: "Darrick J. Wong" <djwong@...nel.org>
To: brauner@...nel.org, djwong@...nel.org
Cc: linux-ext4@...r.kernel.org, linux-xfs@...r.kernel.org, hch@....de,
 linux-fsdevel@...r.kernel.org
Subject: [PATCHSET V4 2/2] fs: send uevents on mount and unmount

Hi all,

To support a self healing filesystem, we need a way to autostart the
xfs_healer userspace daemon as soon as a filesystem mounts.  Since XFS
actually creates a file in the sysfs namespace, the kernel can emit
a uevent for that sysfs file when the filesystem mounts.  In turn, udev
will process the uevent according to the uevent rules, which means that
we have an easy way to start the background service.

This short series adds some common code to emit filesystem uevents and
teaches xfs to take advantage of it.  Unfortunately this isn't a fully
generic solution because not all filesystems actually create kobjects
for themselves.

This is also a prerequisite for the XFS self-healing V4 series which
will come at a later time.

If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.

This has been running on the djcloud for months with no problems.  Enjoy!
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=filesystem-uevents

fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=filesystem-uevents
---
Commits in this patchset:
 * fs: send uevents for filesystem mount events
 * xfs: send uevents when major filesystem events happen
 * ext4: convert ext4_root to a kset
 * ext4: send uevents when major filesystem events happen
---
 include/linux/fsevent.h |   33 ++++++++++++
 fs/Makefile             |    2 -
 fs/ext4/ioctl.c         |    2 +
 fs/ext4/super.c         |    6 ++
 fs/ext4/sysfs.c         |   22 +++++---
 fs/fsevent.c            |  128 +++++++++++++++++++++++++++++++++++++++++++++++
 fs/xfs/xfs_fsops.c      |    2 +
 fs/xfs/xfs_super.c      |   10 ++++
 8 files changed, 195 insertions(+), 10 deletions(-)
 create mode 100644 include/linux/fsevent.h
 create mode 100644 fs/fsevent.c


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ