]> www.infradead.org Git - users/jedix/linux-maple.git/commit
platform/x86/amd/hsmp: Constify 'struct bin_attribute'
authorThomas Weißschuh <linux@weissschuh.net>
Mon, 2 Dec 2024 19:38:36 +0000 (20:38 +0100)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 17 Dec 2024 11:12:59 +0000 (13:12 +0200)
commit8fa1a2e1053ad780eaf48fc05e3a4a24bc809ee2
treeb63f1266b441f90967568ccafa4efdaebe31e4aa
parent7ff2fecc8bc2e855bd17bd75358973c6bb4accbd
platform/x86/amd/hsmp: 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>
Link: https://lore.kernel.org/r/20241202-sysfs-const-bin_attr-pdx86-v1-5-9ab204c2a814@weissschuh.net
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/amd/hsmp/acpi.c
drivers/platform/x86/amd/hsmp/plat.c