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-prev] [day] [month] [year] [list]
Message-ID: <rrhhdxjo5igua66ttfoyij7xewoftyjsmg6oogcuipihmnqopw@cf7dh34h63sj>
Date: Thu, 14 Aug 2025 01:55:23 -0700
From: Breno Leitao <leitao@...ian.org>
To: Andreas Hindborg <a.hindborg@...nel.org>
Cc: Lucas De Marchi <lucas.demarchi@...el.com>, 
	linux-kernel@...r.kernel.org, john.c.harrison@...el.com
Subject: Re: RFC: configfs attribute description

On Wed, Aug 13, 2025 at 08:06:05PM +0200, Andreas Hindborg wrote:
> "Lucas De Marchi" <lucas.demarchi@...el.com> writes:
> 
> > Hi,
> >
> > In the drm/xe drivers we recently started to use configfs for a few
> > things that would be added as module parameters in the past. Configfs
> > seems a much better fit for us in these cases.
> >
> > One thing we are missing from module parameters is the description.
> > I can point people to https://docs.kernel.org/gpu/xe/xe_configfs.html,
> > but having a short description somewhere of each config at runtime would
> > be good. I thought of 2 alternatives and would like to know your opinion
> > or if there's a different way you envision for this.
> >
> > 1) Add description to a module info. This would allow to show "all
> > configfs attributes this module implements":
> >
> > configfs.h:
> > #define CONFIGFS_ATTR_DESC(_name, _desc) \
> > 	MODULE_INFO(configfs_attr_ ## _name, _desc)
> >
> > xe_configfs.c:
> > #define XE_CONFIGFS_ATTR(_name, _desc) \
> > 	CONFIGFS_ATTR(, survivability_mode); \
> > 	CONFIGFS_ATTR_DESC(survivability_mode, \
> > 			   "Bind device in a survivability mode useful to unbrick it")
> >
> > Or provide a single macro in configfs itself. This would "standardize"
> > module info to contain configfs_attr_xxxxx to describe each entry a
> > module implements. Main benefit here is that I can take a module and run
> >
> > 2) Add description in the fs tree itself, similarly to how perf adds a
> > .unit: 2 attributes are created, with the second being RO:

What is this perf .unit exactly? Is it what we see when listing the
perf events?

>From a broader kernel perspective, debugfs and sysfs don't have such
a feature, but, module params do, and they are useful sometimes.

But, in general, the kernel documentation is detached from the
binary.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ