Files
linux/include/linux
Thomas Weißschuh 906c508afd sysfs: attribute_group: allow registration of const bin_attribute
To be able to constify instances of struct bin_attribute it has to be
possible to add them to string attribute_group.
The current type of the bin_attrs member however is not compatible with
that.
Introduce a union that allows registration of both const and non-const
attributes to enable a piecewise transition.
As both union member types are compatible no logic needs to be adapted.

Technically it is now possible register a const struct
bin_attribute and receive it as mutable pointer in the callbacks.
This is a soundness issue.
But this same soundness issue already exists today in
sysfs_create_bin_file().
Also the struct definition and callback implementation are always
closely linked and are meant to be moved to const in lockstep.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20241115-b4-sysfs-const-bin_attr-group-v1-1-2c9bb12dfc48@weissschuh.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-15 19:29:16 +01:00
..
2024-09-01 10:04:56 -04:00
2024-04-24 11:06:26 -07:00
2024-04-25 20:55:49 -07:00
2024-08-29 04:32:32 -06:00
2024-08-28 06:53:58 -07:00
2024-10-22 15:42:56 -07:00
2024-04-29 16:28:07 -07:00
2024-07-08 01:51:05 -06:00
2024-09-03 21:15:36 -07:00
2024-06-24 18:29:20 +02:00
2024-06-11 12:57:49 -05:00
2024-10-01 17:01:40 +02:00
2024-05-19 14:36:17 -07:00
2024-09-09 16:39:05 -07:00
2024-08-29 10:39:37 +02:00
2024-08-23 20:50:19 +02:00
2024-07-31 13:49:48 +01:00
2024-08-08 17:15:02 +02:00
2024-06-24 22:24:56 -07:00
2024-08-27 14:12:51 +02:00
2024-09-03 21:15:46 -07:00
2024-09-20 18:28:26 +03:00
2024-09-01 20:26:03 -07:00
2024-09-09 16:39:04 -07:00
2024-07-03 19:30:23 -07:00
2024-05-03 10:44:42 +01:00
2024-07-10 12:14:54 -07:00
2024-08-11 17:04:29 +01:00
2024-07-31 09:57:18 -07:00
2024-09-03 21:15:44 -07:00
2024-07-28 16:47:51 -06:00
2024-09-23 15:03:30 -04:00
2024-06-24 22:25:02 -07:00
2024-08-30 08:22:38 +02:00
2024-09-19 14:25:32 -05:00
2024-09-19 14:25:34 -05:00
2024-09-17 01:06:59 -07:00
2024-09-05 11:14:14 +02:00
2024-09-11 20:44:31 -07:00
2024-09-11 20:44:32 -07:00
2024-08-12 23:50:58 +05:30
2024-05-04 18:57:21 +02:00
2024-07-10 07:59:03 +02:00
2024-05-06 12:05:00 +02:00
2024-08-06 13:42:40 +02:00
2024-09-12 12:20:39 +02:00
2024-09-09 16:39:04 -07:00
2024-09-01 20:25:43 -07:00
2024-06-24 18:16:44 +01:00
2024-04-25 20:55:48 -07:00