Message ID | 20241202-sysfs-const-bin_attr-hid-v1-0-16369423a48a@weissschuh.net |
---|---|
Headers | show |
Series | HID: constify 'struct bin_attribute' | expand |
On Mon, 2 Dec 2024, Thomas Weißschuh wrote: > The sysfs core now allows instances of 'struct bin_attribute' to be > moved into read-only memory. Make use of that to protect them against > accidental or malicious modifications. > > The usage of read_new/write_new/bin_attrs_new is a transition mechanism > and will be reverted again after the transition is complete. > > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Applied to hid.git#for-6.14/constify-bin-attribute, thanks.
The sysfs core now allows instances of 'struct bin_attribute' to be moved into read-only memory. Make use of that to protect them against accidental or malicious modifications. The usage of read_new/write_new/bin_attrs_new is a transition mechanism and will be reverted again after the transition is complete. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> --- Thomas Weißschuh (10): HID: core: use utility macros to define sysfs attributes HID: core: constify 'struct bin_attribute' HID: roccat: common, konepure, ryos, savu: constify 'struct bin_attribute' HID: roccat: arvo: constify 'struct bin_attribute' HID: roccat: isku: constify 'struct bin_attribute' HID: roccat: kone: constify 'struct bin_attribute' HID: roccat: koneplus: constify 'struct bin_attribute' HID: roccat: kovaplus: constify 'struct bin_attribute' HID: roccat: lua: constify 'struct bin_attribute' HID: roccat: pyro: constify 'struct bin_attribute' drivers/hid/hid-core.c | 27 ++++++++------------- drivers/hid/hid-roccat-arvo.c | 20 ++++++++-------- drivers/hid/hid-roccat-common.h | 22 ++++++++--------- drivers/hid/hid-roccat-isku.c | 22 ++++++++--------- drivers/hid/hid-roccat-kone.c | 22 ++++++++--------- drivers/hid/hid-roccat-koneplus.c | 42 ++++++++++++++++---------------- drivers/hid/hid-roccat-konepure.c | 4 ++-- drivers/hid/hid-roccat-kovaplus.c | 38 ++++++++++++++--------------- drivers/hid/hid-roccat-lua.c | 10 ++++---- drivers/hid/hid-roccat-pyra.c | 50 +++++++++++++++++++-------------------- drivers/hid/hid-roccat-ryos.c | 4 ++-- drivers/hid/hid-roccat-savu.c | 4 ++-- 12 files changed, 129 insertions(+), 136 deletions(-) --- base-commit: e70140ba0d2b1a30467d4af6bcfe761327b9ec95 change-id: 20241201-sysfs-const-bin_attr-hid-c249ed557cb6 Best regards,