[PATCH 00/11] scsi: Constify 'struct bin_attribute'

Thomas Weißschuh posted 11 patches 1 year ago
drivers/scsi/3w-sas.c             | 12 +++---
drivers/scsi/arcmsr/arcmsr_attr.c | 12 +++---
drivers/scsi/esas2r/esas2r.h      | 12 +++---
drivers/scsi/esas2r/esas2r_main.c | 32 ++++++++--------
drivers/scsi/ibmvscsi/ibmvfc.c    |  6 +--
drivers/scsi/ipr.c                | 26 ++++++-------
drivers/scsi/lpfc/lpfc_attr.c     | 20 +++++-----
drivers/scsi/qedf/qedf_attr.c     | 10 ++---
drivers/scsi/qedf/qedf_dbg.h      |  2 +-
drivers/scsi/qedi/qedi_dbg.h      |  2 +-
drivers/scsi/qla2xxx/qla_attr.c   | 80 +++++++++++++++++++--------------------
drivers/scsi/qla4xxx/ql4_attr.c   | 12 +++---
drivers/scsi/scsi_sysfs.c         | 16 ++++----
13 files changed, 121 insertions(+), 121 deletions(-)
[PATCH 00/11] scsi: Constify 'struct bin_attribute'
Posted by Thomas Weißschuh 1 year 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 (11):
      scsi: core: Constify 'struct bin_attribute'
      scsi: 3w-sas: Constify 'struct bin_attribute'
      scsi: arcmsr: Constify 'struct bin_attribute'
      scsi: esas2r: Constify 'struct bin_attribute'
      scsi: ibmvfc: Constify 'struct bin_attribute'
      scsi: lpfc: Constify 'struct bin_attribute'
      scsi: ipr: Constify 'struct bin_attribute'
      scsi: qedf: Constify 'struct bin_attribute'
      scsi: qedi: Constify 'struct bin_attribute'
      scsi: qla2xxx: Constify 'struct bin_attribute'
      scsi: qla4xxx: Constify 'struct bin_attribute'

 drivers/scsi/3w-sas.c             | 12 +++---
 drivers/scsi/arcmsr/arcmsr_attr.c | 12 +++---
 drivers/scsi/esas2r/esas2r.h      | 12 +++---
 drivers/scsi/esas2r/esas2r_main.c | 32 ++++++++--------
 drivers/scsi/ibmvscsi/ibmvfc.c    |  6 +--
 drivers/scsi/ipr.c                | 26 ++++++-------
 drivers/scsi/lpfc/lpfc_attr.c     | 20 +++++-----
 drivers/scsi/qedf/qedf_attr.c     | 10 ++---
 drivers/scsi/qedf/qedf_dbg.h      |  2 +-
 drivers/scsi/qedi/qedi_dbg.h      |  2 +-
 drivers/scsi/qla2xxx/qla_attr.c   | 80 +++++++++++++++++++--------------------
 drivers/scsi/qla4xxx/ql4_attr.c   | 12 +++---
 drivers/scsi/scsi_sysfs.c         | 16 ++++----
 13 files changed, 121 insertions(+), 121 deletions(-)
---
base-commit: 2d8308bf5b67dff50262d8a9260a50113b3628c6
change-id: 20241215-sysfs-const-bin_attr-scsi-bf43eb2f7f9e

Best regards,
-- 
Thomas Weißschuh <linux@weissschuh.net>

Re: [PATCH 00/11] scsi: Constify 'struct bin_attribute'
Posted by Martin K. Petersen 11 months, 1 week ago
On Mon, 16 Dec 2024 12:29:07 +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 to 6.14/scsi-queue, thanks!

[01/11] scsi: core: Constify 'struct bin_attribute'
        https://git.kernel.org/mkp/scsi/c/e4dab5d1ded3
[02/11] scsi: 3w-sas: Constify 'struct bin_attribute'
        https://git.kernel.org/mkp/scsi/c/1cf448bd2e6a
[03/11] scsi: arcmsr: Constify 'struct bin_attribute'
        https://git.kernel.org/mkp/scsi/c/3e72fc051d4c
[04/11] scsi: esas2r: Constify 'struct bin_attribute'
        https://git.kernel.org/mkp/scsi/c/61e2d41cafc6
[05/11] scsi: ibmvfc: Constify 'struct bin_attribute'
        https://git.kernel.org/mkp/scsi/c/af58c759836b
[06/11] scsi: lpfc: Constify 'struct bin_attribute'
        https://git.kernel.org/mkp/scsi/c/4594a1f827d4
[07/11] scsi: ipr: Constify 'struct bin_attribute'
        https://git.kernel.org/mkp/scsi/c/f6af41ff6671
[08/11] scsi: qedf: Constify 'struct bin_attribute'
        https://git.kernel.org/mkp/scsi/c/a8116aa2898b
[09/11] scsi: qedi: Constify 'struct bin_attribute'
        https://git.kernel.org/mkp/scsi/c/f9d0a8450ee3
[10/11] scsi: qla2xxx: Constify 'struct bin_attribute'
        https://git.kernel.org/mkp/scsi/c/06a9ceb95f86
[11/11] scsi: qla4xxx: Constify 'struct bin_attribute'
        https://git.kernel.org/mkp/scsi/c/ea4f2219dd40

-- 
Martin K. Petersen	Oracle Linux Engineering
Re: [PATCH 00/11] scsi: Constify 'struct bin_attribute'
Posted by Martin K. Petersen 11 months, 2 weeks ago
Thomas,

> 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 to 6.14/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering