]> www.infradead.org Git - users/jedix/linux-maple.git/commit
firmware: qemu_fw_cfg: constify 'struct bin_attribute'
authorThomas Weißschuh <linux@weissschuh.net>
Tue, 14 Jan 2025 21:50:20 +0000 (22:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 08:20:32 +0000 (09:20 +0100)
commit80f756cabfbf81d0d629b45eb8e3f9f0196728d2
treedcdb3e32b8bf90eb932969ef9bda2997aa2df268
parent4aad348d0fa62f816ae3e9dfbfc6663443357c0c
firmware: qemu_fw_cfg: 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>
Acked-by: Gabriel Somlo <somlo@cmu.edu>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Link: https://lore.kernel.org/r/20250114-sysfs-const-bin_attr-qemu_fw_cfg-v1-1-76f525a3ee72@weissschuh.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/firmware/qemu_fw_cfg.c