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] [thread-next>] [day] [month] [year] [list]
Date: Fri, 26 Apr 2024 10:40:53 -0700
From: Dan Williams <dan.j.williams@...el.com>
To: Lukas Wunner <lukas@...ner.de>, Greg Kroah-Hartman
	<gregkh@...uxfoundation.org>
CC: "Rafael J. Wysocki" <rafael@...nel.org>, <linux-kernel@...r.kernel.org>,
	Alan Stern <stern@...land.harvard.edu>, Jonathan Cameron
	<Jonathan.Cameron@...wei.com>, Dan Williams <dan.j.williams@...el.com>
Subject: RE: [PATCH] sysfs: Allow bin_attributes to be added to groups

Lukas Wunner wrote:
> Commit dfa87c824a9a ("sysfs: allow attributes to be added to groups")
> introduced dynamic addition of sysfs attributes to groups.
> 
> Allow the same for bin_attributes, in support of a forthcoming commit
> which adds various bin_attributes every time a PCI device is
> authenticated.
> 
> Addition of bin_attributes to groups differs from regular attributes in
> that different kernfs_ops are selected by sysfs_add_bin_file_mode_ns()
> vis-à-vis sysfs_add_file_mode_ns().
> 
> So call either of those two functions from sysfs_add_file_to_group()
> based on an additional boolean parameter and add two wrapper functions,
> one for bin_attributes and another for regular attributes.
> 
> Removal of bin_attributes from groups does not require a differentiation
> for bin_attributes and can use the same code path as regular attributes.
> 
> Signed-off-by: Lukas Wunner <lukas@...ner.de>
> Cc: Alan Stern <stern@...land.harvard.edu>
> ---
> Submitting this ahead of my PCI device authentication v2 patches.
> Not sure if the patch is acceptable without an accompanying user,
> but even if it's not, perhaps someone has early review feedback
> or wants to provide an Acked-by?  Thank you!

On the one hand it makes sense from a symmetry perspective, on the other
hand the expectation and the infrastructure for dynamic sysfs visibilty
has increased since 2007.

That is why I would like to see the use case to understand why a
dynamically added a bin_attribute is needed compared with a statically
defined attribute with dynamic visibility.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ