Thread (16 messages) flat view 16 messages, 4 authors, 2026-03-20

Re: [PATCH RFC 0/2] configfs: enable kernel-space item registration

From: Breno Leitao <leitao@debian.org>
Date: 2025-12-05 18:03:28
Also in: linux-fsdevel, lkml

Hello Andreas,

On Fri, Dec 05, 2025 at 06:35:12PM +0100, Andreas Hindborg wrote:
"Breno Leitao" [off-list ref] writes:
quoted
This series introduces a new kernel-space item registration API for configfs
to enable subsystems to programmatically create configfs items whose lifecycle
is controlled by the kernel rather than userspace.

Currently, configfs items can only be created via userspace mkdir operations,
which limits their utility for kernel-driven configuration scenarios such as
boot parameters or hardware auto-detection.
I thought sysfs would handle this kind of scenarios?
sysfs has gaps as well, to manage user-create items.

Netconsole has two types of "targets". Those created dynamically
(CONFIG_NETCONSOLE_DYNAMIC), where user can create and remove as many
targets as it needs, and netconsole would send to it. This fits very
well in configfs.

  mkdir /sys/kernel/config/netconsole/mytarget
  .. manage the target using configfs items/files
  rmdir /sys/kernel/config/netconsole/mytarget

This is a perfect fit for configfs, and I don't see how it would work
with sysfs.

On top of that, there are netconsole targets that are coming from
cmdline (basically to cover while userspace is not initialized). These
are coming from cmdline and its life-cycle is managed by the kernel.
I.e, the kernel knows about them, and wants to expose it to the user
(which can even disable them later). This is the problem I this patch
addresses (exposing them easily).

It is kind of a mix of kernel and user-managed configuration items in
coexisting.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help