[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250125-sysfs-const-bin_attr-dmi-v2-0-ece1895936f4@weissschuh.net>
Date: Sat, 25 Jan 2025 11:12:13 +0100
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Jean Delvare <jdelvare@...e.com>
Cc: linux-kernel@...r.kernel.org,
Thomas Weißschuh <linux@...ssschuh.net>
Subject: [PATCH v2 0/3] firmware: dmi: 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@...ssschuh.net>
---
Changes in v2:
- Rebase on current torvalds/master
- Add patches 2 and 3
- Link to v1: https://lore.kernel.org/r/20241122-sysfs-const-bin_attr-dmi-v1-1-febd12fb27d9@weissschuh.net
---
Thomas Weißschuh (3):
firmware: dmi: Mark bin_attributes as __ro_after_init
firmware: dmi: Define bin_attributes through macro
firmware: dmi: Constify 'struct bin_attribute'
drivers/firmware/dmi-sysfs.c | 28 +++++++++++-----------------
drivers/firmware/dmi_scan.c | 4 ++--
2 files changed, 13 insertions(+), 19 deletions(-)
---
base-commit: 68732c0bf97cf946ad08660203e8eabfea11463e
change-id: 20241122-sysfs-const-bin_attr-dmi-40c387a93dda
Best regards,
--
Thomas Weißschuh <linux@...ssschuh.net>
Powered by blists - more mailing lists