configfs
A virtual filesystem (typically mounted at /sys/kernel/config) that allows userspace applications to create, configure, and manage kernel subsystems through a hierarchical directory structure.
configfs is a pseudo-filesystem that exports kernel objects as directories and files, enabling dynamic configuration of kernel features without recompiling or reloading modules. Unlike sysfs which is read-mostly, configfs is designed for two-way communication where userspace can create and destroy kernel objects.
Applications interact with configfs by creating directories and writing to files within them. For example, to configure an iSCSI target, you might create a directory under /sys/kernel/config/target/iscsi/, set parameters by writing to files within it, and the kernel responds by activating that target. When you remove the directory, the kernel tears down the associated resource.
Common uses include configuring network namespaces, storage targets (iSCSI, NVMe-oF), USB gadget functionality, and DLCI (frame relay) interfaces. It's typically mounted automatically by systemd, but can be manually mounted with: mount -t configfs none /sys/kernel/config