]> www.infradead.org Git - users/dwmw2/linux.git/commit
x86/sysfs: Constify 'struct bin_attribute'
authorThomas Weißschuh <linux@weissschuh.net>
Mon, 2 Dec 2024 19:43:24 +0000 (20:43 +0100)
committerIngo Molnar <mingo@kernel.org>
Fri, 6 Dec 2024 10:06:14 +0000 (11:06 +0100)
commita3eaa2be7004ed7ce5cf8939c660e44a15fc3665
tree01856136be686469e6e3f103ea89f4d140bca435
parent5a82223e0743fb36bcb99657772513739d1a9936
x86/sysfs: Constify 'struct bin_attribute'

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.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20241202-sysfs-const-bin_attr-x86-v1-1-b767d5f0ac5c@weissschuh.net
arch/x86/kernel/ksysfs.c