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

Thomas Weißschuh posted 2 patches 11 months ago
drivers/infiniband/hw/hfi1/sysfs.c    | 14 +++++++-------
drivers/infiniband/hw/qib/qib_sysfs.c | 16 ++++++++--------
2 files changed, 15 insertions(+), 15 deletions(-)
[PATCH 0/2] RDMA: Constify 'struct bin_attribute'
Posted by Thomas Weißschuh 11 months ago
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,
-- 
Thomas Weißschuh <linux@weissschuh.net>

Re: [PATCH 0/2] RDMA: Constify 'struct bin_attribute'
Posted by Leon Romanovsky 10 months, 4 weeks ago
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,
-- 
Leon Romanovsky <leon@kernel.org>