mbox series

[0/2] RDMA: Constify 'struct bin_attribute'

Message ID 20250114-sysfs-const-bin_attr-infiniband-v1-0-397aaa94d453@weissschuh.net (mailing list archive)
Headers show
Series RDMA: Constify 'struct bin_attribute' | expand

Message

Thomas Weißschuh Jan. 14, 2025, 9:32 p.m. UTC
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>
---
Thomas Weißschuh (2):
      RDMA/hfi1: Constify 'struct bin_attribute'
      RDMA/qib: Constify 'struct bin_attribute'

 drivers/infiniband/hw/hfi1/sysfs.c    | 14 +++++++-------
 drivers/infiniband/hw/qib/qib_sysfs.c | 16 ++++++++--------
 2 files changed, 15 insertions(+), 15 deletions(-)
---
base-commit: 7f5b6a8ec18e3add4c74682f60b90c31bdf849f2
change-id: 20250114-sysfs-const-bin_attr-infiniband-fce6de3fb8b9

Best regards,

Comments

Leon Romanovsky Jan. 19, 2025, 8:59 a.m. UTC | #1
On Tue, 14 Jan 2025 22:32:12 +0100, Thomas Weißschuh wrote:
> 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.
> 
> 

Applied, thanks!

[1/2] RDMA/hfi1: Constify 'struct bin_attribute'
      https://git.kernel.org/rdma/rdma/c/39d772f6654a17
[2/2] RDMA/qib: Constify 'struct bin_attribute'
      https://git.kernel.org/rdma/rdma/c/f5f01c5c409e69

Best regards,