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 <li...@weissschuh.net> --- Thomas Weißschuh (5): powerpc/secvar: Mark __init functions as such powerpc/secvar: Constify 'struct bin_attribute' powerpc/powernv/ultravisor: Constify 'struct bin_attribute' powerpc/powernv/opal: Constify 'struct bin_attribute' powerpc/perf/hv-24x7: Constify 'struct bin_attribute' arch/powerpc/kernel/secvar-sysfs.c | 24 ++++++++++++------------ arch/powerpc/perf/hv-24x7.c | 8 ++++---- arch/powerpc/platforms/powernv/opal-core.c | 10 +++++----- arch/powerpc/platforms/powernv/opal-dump.c | 4 ++-- arch/powerpc/platforms/powernv/opal-elog.c | 4 ++-- arch/powerpc/platforms/powernv/opal-flash.c | 4 ++-- arch/powerpc/platforms/powernv/opal-msglog.c | 6 +++--- arch/powerpc/platforms/powernv/ultravisor.c | 6 +++--- 8 files changed, 33 insertions(+), 33 deletions(-) --- base-commit: dccbe2047a5b0859de24bf463dae9eeea8e01c1e change-id: 20241215-sysfs-const-bin_attr-powerpc-8c3e5b79be31 Best regards, -- Thomas Weißschuh <li...@weissschuh.net>