You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(19) |
Nov
(18) |
Dec
(34) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(14) |
Feb
(14) |
Mar
(3) |
Apr
(10) |
May
(10) |
Jun
(17) |
Jul
(15) |
Aug
(24) |
Sep
(24) |
Oct
(11) |
Nov
(13) |
Dec
(15) |
2008 |
Jan
(10) |
Feb
(46) |
Mar
(20) |
Apr
(42) |
May
(44) |
Jun
(22) |
Jul
(59) |
Aug
(8) |
Sep
(15) |
Oct
(52) |
Nov
(30) |
Dec
(38) |
2009 |
Jan
(27) |
Feb
(27) |
Mar
(47) |
Apr
(85) |
May
(74) |
Jun
(41) |
Jul
(70) |
Aug
(64) |
Sep
(97) |
Oct
(147) |
Nov
(67) |
Dec
(48) |
2010 |
Jan
(68) |
Feb
(33) |
Mar
(53) |
Apr
(98) |
May
(55) |
Jun
(71) |
Jul
(99) |
Aug
(132) |
Sep
(291) |
Oct
(220) |
Nov
(344) |
Dec
(300) |
2011 |
Jan
(57) |
Feb
(25) |
Mar
(59) |
Apr
(104) |
May
(60) |
Jun
(155) |
Jul
(143) |
Aug
(43) |
Sep
(53) |
Oct
(20) |
Nov
(35) |
Dec
(103) |
2012 |
Jan
(62) |
Feb
(43) |
Mar
(29) |
Apr
(80) |
May
(75) |
Jun
(61) |
Jul
(52) |
Aug
(58) |
Sep
(33) |
Oct
(32) |
Nov
(69) |
Dec
(37) |
2013 |
Jan
(77) |
Feb
(28) |
Mar
(52) |
Apr
(18) |
May
(37) |
Jun
(21) |
Jul
(22) |
Aug
(55) |
Sep
(29) |
Oct
(74) |
Nov
(50) |
Dec
(44) |
2014 |
Jan
(77) |
Feb
(62) |
Mar
(81) |
Apr
(99) |
May
(59) |
Jun
(95) |
Jul
(55) |
Aug
(34) |
Sep
(78) |
Oct
(33) |
Nov
(48) |
Dec
(51) |
2015 |
Jan
(56) |
Feb
(120) |
Mar
(37) |
Apr
(15) |
May
(22) |
Jun
(196) |
Jul
(54) |
Aug
(33) |
Sep
(32) |
Oct
(42) |
Nov
(149) |
Dec
(61) |
2016 |
Jan
(15) |
Feb
(26) |
Mar
(37) |
Apr
(27) |
May
(14) |
Jun
(11) |
Jul
(13) |
Aug
(64) |
Sep
(2) |
Oct
(36) |
Nov
(18) |
Dec
(46) |
2017 |
Jan
(6) |
Feb
(1) |
Mar
(2) |
Apr
(50) |
May
(42) |
Jun
(11) |
Jul
(4) |
Aug
(12) |
Sep
(11) |
Oct
(21) |
Nov
(15) |
Dec
(42) |
2018 |
Jan
(33) |
Feb
(27) |
Mar
(20) |
Apr
(5) |
May
(4) |
Jun
(1) |
Jul
(42) |
Aug
(29) |
Sep
(11) |
Oct
(40) |
Nov
(312) |
Dec
(18) |
2019 |
Jan
(44) |
Feb
(98) |
Mar
(125) |
Apr
(160) |
May
(123) |
Jun
(33) |
Jul
(56) |
Aug
(81) |
Sep
(24) |
Oct
(23) |
Nov
(52) |
Dec
(86) |
2020 |
Jan
(6) |
Feb
(17) |
Mar
(62) |
Apr
(21) |
May
(118) |
Jun
(42) |
Jul
(52) |
Aug
(62) |
Sep
(20) |
Oct
(5) |
Nov
(23) |
Dec
(111) |
2021 |
Jan
(31) |
Feb
(8) |
Mar
(26) |
Apr
(13) |
May
(54) |
Jun
(31) |
Jul
(17) |
Aug
(10) |
Sep
(83) |
Oct
(8) |
Nov
(21) |
Dec
(33) |
2022 |
Jan
(67) |
Feb
(11) |
Mar
(4) |
Apr
(46) |
May
(12) |
Jun
(17) |
Jul
(19) |
Aug
(7) |
Sep
(53) |
Oct
(14) |
Nov
(29) |
Dec
(22) |
2023 |
Jan
(20) |
Feb
(4) |
Mar
(37) |
Apr
(25) |
May
(15) |
Jun
(20) |
Jul
(38) |
Aug
(1) |
Sep
(1) |
Oct
(34) |
Nov
|
Dec
(8) |
2024 |
Jan
(15) |
Feb
(10) |
Mar
|
Apr
(4) |
May
(23) |
Jun
|
Jul
(8) |
Aug
(2) |
Sep
(18) |
Oct
(1) |
Nov
(18) |
Dec
(15) |
2025 |
Jan
(5) |
Feb
(1) |
Mar
(7) |
Apr
(4) |
May
(18) |
Jun
(7) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Gleb C. <lna...@ya...> - 2025-04-21 11:23:29
|
Commit: d8db7de GitHub URL: https://github.com/SCST-project/scst/commit/d8db7deb2bee39919d8ff1320c1ec8a1b9ae4702 Author: Gleb Chesnokov Date: 2025-04-21T14:22:43+03:00 Log Message: ----------- Makefile: Actualise help target Sync the `help` target with the actual Makefile rules: - Include missing targets (tags, cov-build, docs, scstadm, scstadm-rpm) - Reorder and align target groups - Update `.PHONY` list Modified Paths: -------------- Makefile | 280 ++++++++------- 1 file changed, 148 insertions(+), 132 deletions(-) =================================================================== diff --git a/Makefile b/Makefile index bdcca82..102c2b9 100644 --- a/Makefile +++ b/Makefile @@ -91,82 +91,88 @@ SCST_SOURCE_FILES = $(shell if [ -e scripts/list-source-files ]; then \ fi) help: - @echo " all : make all" - @echo " clean : clean files" - @echo " extraclean : clean + clean dependencies" - @echo " install : install" - @echo " uninstall : uninstall" + @echo " tags : make tags" + @echo " cov-build : make coverity build" @echo "" - @echo " scst : make scst only" - @echo " scst_clean : scst: clean " - @echo " scst_extraclean : scst: clean + clean dependencies" - @echo " scst_install : scst: install" - @echo " scst_uninstall : scst: uninstall" + @echo " all : make all" + @echo " clean : clean files" + @echo " extraclean : clean + clean dependencies" + @echo " install : install" + @echo " uninstall : uninstall" @echo "" - @echo " scstadm_install : scstadmin: install" - @echo " scstadm_uninstall : scstadmin: uninstall" + @echo " scst : make scst only" + @echo " scst_clean : scst: clean" + @echo " scst_extraclean : scst: clean + clean dependencies" + @echo " scst_install : scst: install" + @echo " scst_uninstall : scst: uninstall" @echo "" - @echo " qla : make QLA target driver" - @echo " qla_clean : qla target: clean " - @echo " qla_extraclean : qla target: clean + clean dependencies" - @echo " qla_install : qla target: install" - @echo " qla_uninstall : qla target: uninstall" + @echo " docs : make docs" + @echo " docs_clean : docs: clean" + @echo " docs_extraclean : docs: clean + clean dependencies" @echo "" - @echo " iscsi : make iSCSI target" - @echo " iscsi_clean : ISCSI target: clean " - @echo " iscsi_extraclean : ISCSI target: clean + clean dependencies" - @echo " iscsi_install : ISCSI target: install" - @echo " iscsi_uninstall : ISCSI target: uninstall" + @echo " scstadm : make scstadmin" + @echo " scstadm_clean : scstadmin: clean" + @echo " scstadm_extraclean : scstadmin: clean + clean dependencies" + @echo " scstadm_install : scstadmin: install" + @echo " scstadm_uninstall : scstadmin: uninstall" @echo "" - @echo " emulex : make Emulex target" - @echo " emulex_clean : Emulex target: clean " - @echo " emulex_extraclean : Emulex target: clean + clean dependencies" - @echo " emulex_install : Emulex target: install" - @echo " emulex_uninstall : Emulex target: uninstall" + @echo " qla : make QLA target driver" + @echo " qla_clean : qla target: clean" + @echo " qla_extraclean : qla target: clean + clean dependencies" + @echo " qla_install : qla target: install" + @echo " qla_uninstall : qla target: uninstall" @echo "" - @echo " srpt : make SRP target" - @echo " srpt_clean : srp target: clean " - @echo " srpt_extraclean : srp target: clean + clean dependencies" - @echo " srpt_install : srp target: install" - @echo " srpt_uninstall : srp target: uninstall" + @echo " iscsi : make iSCSI target" + @echo " iscsi_clean : ISCSI target: clean" + @echo " iscsi_extraclean : ISCSI target: clean + clean dependencies" + @echo " iscsi_install : ISCSI target: install" + @echo " iscsi_uninstall : ISCSI target: uninstall" @echo "" - @echo " fcst : make FCoE target" - @echo " fcst_clean : FCoE target: clean " - @echo " fcst_extraclean : FCoE target: clean + clean dependencies" - @echo " fcst_install : FCoE target: install" - @echo " fcst_uninstall : FCoE target: uninstall" + @echo " emulex : make Emulex target" + @echo " emulex_clean : Emulex target: clean" + @echo " emulex_extraclean : Emulex target: clean + clean dependencies" + @echo " emulex_install : Emulex target: install" + @echo " emulex_uninstall : Emulex target: uninstall" @echo "" - @echo " scst_local : make scst_local target" - @echo " scst_local_install : scst_local target: install" - @echo " scst_local_uninstall : scst_local target: uninstall" + @echo " srpt : make SRP target" + @echo " srpt_clean : srp target: clean" + @echo " srpt_extraclean : srp target: clean + clean dependencies" + @echo " srpt_install : srp target: install" + @echo " srpt_uninstall : srp target: uninstall" @echo "" - @echo " usr : make user space targets" - @echo " usr_clean : usr target: clean " - @echo " usr_extraclean : usr target: clean + clean dependencies" - @echo " usr_install : usr target: install" - @echo " usr_uninstall : usr target: uninstall" + @echo " fcst : make FCoE target" + @echo " fcst_clean : FCoE target: clean" + @echo " fcst_extraclean : FCoE target: clean + clean dependencies" + @echo " fcst_install : FCoE target: install" + @echo " fcst_uninstall : FCoE target: uninstall" @echo "" - @echo " scst-rpm : make SCST RPM packages" - @echo " scst-dkms-rpm : make SCST DKMS RPM packages" - @echo " rpm : make both SCST and scstadmin RPM packages" - @echo " rpm-dkms : make both SCST DKMS and scstadmin RPM packages" + @echo " scst_local : make scst_local target" + @echo " scst_local_clean : scst_local target: clean" + @echo " scst_local_extraclean : scst_local target: clean + clean dependencies" + @echo " scst_local_install : scst_local target: install" + @echo " scst_local_uninstall : scst_local target: uninstall" @echo "" - @echo " dpkg : make SCST dpkg packages" + @echo " usr : make user space targets" + @echo " usr_clean : usr target: clean" + @echo " usr_extraclean : usr target: clean + clean dependencies" + @echo " usr_install : usr target: install" + @echo " usr_uninstall : usr target: uninstall" @echo "" - @echo " 2perf : changes debug state to full performance" - @echo " 2release : changes debug state to release" - @echo " 2debug : changes debug state to full debug" + @echo " scst-rpm : make SCST RPM packages" + @echo " scst-dkms-rpm : make SCST DKMS RPM packages" + @echo " scstadm-rpm : make scstadmin RPM packages" + @echo " rpm : make both SCST and scstadmin RPM packages" + @echo " rpm-dkms : make both SCST DKMS and scstadmin RPM packages" + @echo "" + @echo " dpkg : make SCST dpkg packages" + @echo "" + @echo " 2perf : changes debug state to full performance" + @echo " 2release : changes debug state to release" + @echo " 2debug : changes debug state to full debug" @echo "" @echo " Note:" @echo " - install and uninstall may need root privileges" -all install uninstall clean extraclean: - -if [ $@ = extraclean ]; then rm -f TAGS tags cscope.out; fi - -for d in $(SCST_DIR) $(ISCSI_DIR) $(QLA_DIR) $(SRP_DIR) \ - $(SCST_LOCAL_DIR) $(FCST_DIR) $(USR_DIR) $(SCSTADM_DIR); do \ - $(MAKE) -j$$(nproc) -C "$$d" $@ || break; \ - done - tags: find . -type f -name "*.[ch]" | ctags --c-kinds=+p --fields=+iaS --extra=+q -e -L- @@ -180,21 +186,28 @@ cov-build: fi \ done +all clean extraclean install uninstall: + -if [ $@ = extraclean ]; then rm -f TAGS tags cscope.out; fi + -for d in $(SCST_DIR) $(ISCSI_DIR) $(QLA_DIR) $(SRP_DIR) \ + $(SCST_LOCAL_DIR) $(FCST_DIR) $(USR_DIR) $(SCSTADM_DIR); do \ + $(MAKE) -j$$(nproc) -C "$$d" $@ || break; \ + done + scst: cd $(SCST_DIR) && $(MAKE) all -scst_install: - cd $(SCST_DIR) && $(MAKE) install - -scst_uninstall: - cd $(SCST_DIR) && $(MAKE) uninstall - scst_clean: cd $(SCST_DIR) && $(MAKE) clean scst_extraclean: cd $(SCST_DIR) && $(MAKE) extraclean +scst_install: + cd $(SCST_DIR) && $(MAKE) install + +scst_uninstall: + cd $(SCST_DIR) && $(MAKE) uninstall + docs: cd $(DOC_DIR) && $(MAKE) all @@ -207,26 +220,20 @@ docs_extraclean: scstadm: cd $(SCSTADM_DIR) && $(MAKE) all -scstadm_install: - cd $(SCSTADM_DIR) && $(MAKE) install - -scstadm_uninstall: - cd $(SCSTADM_DIR) && $(MAKE) uninstall - scstadm_clean: cd $(SCSTADM_DIR) && $(MAKE) clean scstadm_extraclean: cd $(SCSTADM_DIR) && $(MAKE) extraclean -qla: - cd $(QLA_DIR) && $(MAKE) all +scstadm_install: + cd $(SCSTADM_DIR) && $(MAKE) install -qla_install: - cd $(QLA_DIR) && $(MAKE) install +scstadm_uninstall: + cd $(SCSTADM_DIR) && $(MAKE) uninstall -qla_uninstall: - cd $(QLA_DIR) && $(MAKE) uninstall +qla: + cd $(QLA_DIR) && $(MAKE) all qla_clean: cd $(QLA_DIR) && $(MAKE) clean @@ -234,14 +241,14 @@ qla_clean: qla_extraclean: cd $(QLA_DIR) && $(MAKE) extraclean -iscsi: - cd $(ISCSI_DIR) && $(MAKE) all +qla_install: + cd $(QLA_DIR) && $(MAKE) install -iscsi_install: - cd $(ISCSI_DIR) && $(MAKE) install +qla_uninstall: + cd $(QLA_DIR) && $(MAKE) uninstall -iscsi_uninstall: - cd $(ISCSI_DIR) && $(MAKE) uninstall +iscsi: + cd $(ISCSI_DIR) && $(MAKE) all iscsi_clean: cd $(ISCSI_DIR) && $(MAKE) clean @@ -249,14 +256,14 @@ iscsi_clean: iscsi_extraclean: cd $(ISCSI_DIR) && $(MAKE) extraclean -emulex: - cd $(EMULEX_DIR) && $(MAKE) all +iscsi_install: + cd $(ISCSI_DIR) && $(MAKE) install -emulex_install: - cd $(EMULEX_DIR) && $(MAKE) install +iscsi_uninstall: + cd $(ISCSI_DIR) && $(MAKE) uninstall -emulex_uninstall: - cd $(EMULEX_DIR) && $(MAKE) uninstall +emulex: + cd $(EMULEX_DIR) && $(MAKE) all emulex_clean: cd $(EMULEX_DIR) && $(MAKE) clean @@ -264,29 +271,44 @@ emulex_clean: emulex_extraclean: cd $(EMULEX_DIR) && $(MAKE) extraclean +emulex_install: + cd $(EMULEX_DIR) && $(MAKE) install + +emulex_uninstall: + cd $(EMULEX_DIR) && $(MAKE) uninstall + srpt: cd $(SRP_DIR) && $(MAKE) all +srpt_clean: + cd $(SRP_DIR) && $(MAKE) clean + +srpt_extraclean: + cd $(SRP_DIR) && $(MAKE) extraclean + srpt_install: cd $(SRP_DIR) && $(MAKE) install srpt_uninstall: cd $(SRP_DIR) && $(MAKE) uninstall -srpt_clean: - cd $(SRP_DIR) && $(MAKE) clean +fcst: + cd $(FCST_DIR) && $(MAKE) all -srpt_extraclean: - cd $(SRP_DIR) && $(MAKE) extraclean +fcst_clean: + cd $(FCST_DIR) && $(MAKE) clean -scst_local: - cd $(SCST_LOCAL_DIR) && $(MAKE) all +fcst_extraclean: + cd $(FCST_DIR) && $(MAKE) extraclean -scst_local_install: - cd $(SCST_LOCAL_DIR) && $(MAKE) install +fcst_install: + cd $(FCST_DIR) && $(MAKE) install -scst_local_uninstall: - cd $(SCST_LOCAL_DIR) && $(MAKE) uninstall +fcst_uninstall: + cd $(FCST_DIR) && $(MAKE) uninstall + +scst_local: + cd $(SCST_LOCAL_DIR) && $(MAKE) all scst_local_clean: cd $(SCST_LOCAL_DIR) && $(MAKE) clean @@ -294,14 +316,14 @@ scst_local_clean: scst_local_extraclean: cd $(SCST_LOCAL_DIR) && $(MAKE) extraclean -usr: - cd $(USR_DIR) && $(MAKE) +scst_local_install: + cd $(SCST_LOCAL_DIR) && $(MAKE) install -usr_install: - cd $(USR_DIR) && $(MAKE) install +scst_local_uninstall: + cd $(SCST_LOCAL_DIR) && $(MAKE) uninstall -usr_uninstall: - cd $(USR_DIR) && $(MAKE) uninstall +usr: + cd $(USR_DIR) && $(MAKE) usr_clean: cd $(USR_DIR) && $(MAKE) clean @@ -309,20 +331,11 @@ usr_clean: usr_extraclean: cd $(USR_DIR) && $(MAKE) extraclean -fcst: - cd $(FCST_DIR) && $(MAKE) all - -fcst_install: - cd $(FCST_DIR) && $(MAKE) install - -fcst_uninstall: - cd $(FCST_DIR) && $(MAKE) uninstall - -fcst_clean: - cd $(FCST_DIR) && $(MAKE) clean +usr_install: + cd $(USR_DIR) && $(MAKE) install -fcst_extraclean: - cd $(FCST_DIR) && $(MAKE) extraclean +usr_uninstall: + cd $(USR_DIR) && $(MAKE) uninstall # Make an SCST source code archive. $(1) is the tar compression option, $(2) # is the tar filename compression suffix, $(3) is the version and $(4) is the @@ -386,9 +399,12 @@ scst-dkms-rpm: -ba $${name}.spec && \ rm -f scst-$(VERSION).tar.bz2 +scstadm-rpm: + $(MAKE) -C scstadmin rpm + rpm: $(MAKE) scst-rpm - $(MAKE) -C scstadmin rpm + $(MAKE) scstadm-rpm @if [ "$$(id -u)" != 0 ]; then \ echo; \ echo "The following RPMs have been built:"; \ @@ -397,7 +413,7 @@ rpm: rpm-dkms: $(MAKE) scst-dkms-rpm - $(MAKE) -C scstadmin rpm + $(MAKE) scstadm-rpm @if [ "$$(id -u)" != 0 ]; then \ echo; \ echo "The following RPMs have been built:"; \ @@ -489,16 +505,16 @@ multiple-release-archives: 2debug: cd $(SCST_DIR) && $(MAKE) $@ -.PHONY: all install uninstall clean extraclean tags help \ - qla qla_install qla_uninstall qla_clean qla_extraclean \ - iscsi iscsi_install iscsi_uninstall iscsi_clean iscsi_extraclean \ - emulex emulex_install emulex_uninstall emulex_clean emulex_extraclean \ - scst scst_install scst_uninstall scst_clean scst_extraclean \ +.PHONY: help tags cov-build all clean extraclean install uninstall \ + scst scst_clean scst_extraclean scst_install scst_uninstall \ docs docs_clean docs_extraclean \ - scstadm scstadm_install scstadm_uninstall scstadm_clean scstadm_extraclean \ - srpt srpt_install srpt_uninstall srpt_clean srpt_extraclean \ - usr usr_install usr_uninstall usr_clean usr_extraclean \ - scst_local scst_local_install scst_local_uninstall scst_local_clean scst_local_extraclean \ - fcst fcst_install fcst_uninstall fcst_clean fcst_extraclean \ - scst-rpm scst-dkms-rpm dpkg \ + scstadm scstadm_clean scstadm_extraclean scstadm_install scstadm_uninstall \ + qla qla_clean qla_extraclean qla_install qla_uninstall \ + iscsi iscsi_clean iscsi_extraclean iscsi_install iscsi_uninstall \ + emulex emulex_clean emulex_extraclean emulex_install emulex_uninstall \ + srpt srpt_clean srpt_extraclean srpt_install srpt_uninstall \ + fcst fcst_clean fcst_extraclean fcst_install fcst_uninstall \ + scst_local scst_local_clean scst_local_extraclean scst_local_install scst_local_uninstall \ + usr usr_clean usr_extraclean usr_install usr_uninstall \ + scst-rpm scst-dkms-rpm scstadm-rpm rpm rpm-dkms dpkg \ 2perf 2release 2debug |
From: Gleb C. <lna...@ya...> - 2025-04-18 15:57:01
|
Commit: c934aee GitHub URL: https://github.com/SCST-project/scst/commit/c934aee1a87d93f2cccb2fe83fb43bc6e7965792 Author: Gleb Chesnokov Date: 2025-04-18T18:54:20+03:00 Log Message: ----------- Makefile, specs: Honour %{_sbindir} for helper tools Fedora 42 maps %{_sbindir} to /usr/bin. Export SBINDIR=%{_sbindir} in the spec files and let the iscsi-scst/scstadmin Makefiles honour that variable. Fixes "File not found: .../iscsi-scst-adm" on unified-/usr systems while keeping older distros unchanged. Modified Paths: -------------- iscsi-scst/Makefile | 2 +- scst-dkms.spec.in | 2 +- scst.spec.in | 2 +- scstadmin/scstadmin.spec.in | 2 +- scstadmin/scstadmin.sysfs/Makefile | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) =================================================================== diff --git a/iscsi-scst/Makefile b/iscsi-scst/Makefile index f153e35..3f7cc28 100644 --- a/iscsi-scst/Makefile +++ b/iscsi-scst/Makefile @@ -12,7 +12,7 @@ endif SHELL=/bin/bash SCST_DIR := $(shell echo "$$PWD")/../scst/src -SBINDIR := $(PREFIX)/sbin +SBINDIR ?= $(PREFIX)/sbin INITDIR := /etc/init.d RCDIR := /etc/rc.d MANDIR ?= $(PREFIX)/man diff --git a/scst-dkms.spec.in b/scst-dkms.spec.in index ab43bb1..6c3cd63 100644 --- a/scst-dkms.spec.in +++ b/scst-dkms.spec.in @@ -148,7 +148,7 @@ for d in scst fcst iscsi-scst qla2x00t-32gbit/qla2x00-target scst_local srpt; do done %install -export KVER=%{kversion} PREFIX=%{_prefix} MANDIR=%{_mandir} DEPMOD=true +export KVER=%{kversion} PREFIX=%{_prefix} MANDIR=%{_mandir} SBINDIR=%{_sbindir} DEPMOD=true export BUILD_2X_MODULE=y CONFIG_SCSI_QLA_FC=y CONFIG_SCSI_QLA2XXX_TARGET=y for d in scst; do DESTDIR=%{buildroot} %{make} -C $d install diff --git a/scst.spec.in b/scst.spec.in index ba4f40d..6998a20 100644 --- a/scst.spec.in +++ b/scst.spec.in @@ -142,7 +142,7 @@ done %install %{?kdir:export KDIR=%{kdir}} %{!?kdir:%{?kversion:export KVER=%{kversion}}} -export PREFIX=%{_prefix} MANDIR=%{_mandir} DEPMOD=true +export PREFIX=%{_prefix} MANDIR=%{_mandir} SBINDIR=%{_sbindir} DEPMOD=true export BUILD_2X_MODULE=y CONFIG_SCSI_QLA_FC=y CONFIG_SCSI_QLA2XXX_TARGET=y for d in scst; do DESTDIR=%{buildroot} %{make} -C $d install diff --git a/scstadmin/scstadmin.spec.in b/scstadmin/scstadmin.spec.in index 2016520..0d32e69 100644 --- a/scstadmin/scstadmin.spec.in +++ b/scstadmin/scstadmin.spec.in @@ -56,7 +56,7 @@ export PREFIX=%{_prefix} DESTDIR=%{buildroot} MANDIR=%{buildroot}%{_mandir} %{make} %install -export PREFIX=%{_prefix} DESTDIR=%{buildroot} MANDIR=%{buildroot}%{_mandir} +export PREFIX=%{_prefix} DESTDIR=%{buildroot} MANDIR=%{buildroot}%{_mandir} SBINDIR=%{_sbindir} %{make} install_vendor %scstadmin_perl_process_packlist rm -rf %{buildroot}/var/adm/perl-modules/scst diff --git a/scstadmin/scstadmin.sysfs/Makefile b/scstadmin/scstadmin.sysfs/Makefile index c749bb4..51b8d06 100644 --- a/scstadmin/scstadmin.sysfs/Makefile +++ b/scstadmin/scstadmin.sysfs/Makefile @@ -5,7 +5,7 @@ endif MODULE_VERSION = 1.0.0 TOOL = scstadmin -SBINDIR := $(PREFIX)/sbin +SBINDIR ?= $(PREFIX)/sbin all: perl-module |
From: Gleb C. <lna...@ya...> - 2025-04-18 15:56:55
|
Commit: ef37ad2 GitHub URL: https://github.com/SCST-project/scst/commit/ef37ad252c9e13f29e9b0e331f4451eb5975cfb7 Author: Gleb Chesnokov Date: 2025-04-18T18:54:20+03:00 Log Message: ----------- scst_lib: Mark devkey string as nonstring Fix the following GCC 15 warnings: initializer-string for array of ‘unsigned char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (17 chars into 16 available) This patch doesn't change any functionality. Modified Paths: -------------- scst/include/backport.h | 8 ++++ scst/src/scst_lib.c | 36 +++++++-------- 2 files changed, 26 insertions(+), 18 deletions(-) =================================================================== diff --git a/scst/include/backport.h b/scst/include/backport.h index 79c6870..e9d978d 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -419,6 +419,14 @@ static inline void be32_to_cpu_array(u32 *dst, const __be32 *src, size_t len) #endif #endif +/* + * See also commit 92676236917d ("Compiler Attributes: add support for + * __nonstring (gcc >= 8)") # v4.20. + */ +#ifndef __nonstring +#define __nonstring +#endif + /* <linux/debugfs.h> */ /* diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 75ead70..91404cf 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -456,24 +456,24 @@ static int get_cdb_info_dyn_runtime_attr(struct scst_cmd *cmd, struct scst_sdbops { uint8_t ops; /* SCSI-2 op codes */ - uint8_t devkey[16]; /* Key for every device type M,O,V,R - * type_disk devkey[0] - * type_tape devkey[1] - * type_printer devkey[2] - * type_processor devkey[3] - * type_worm devkey[4] - * type_cdrom devkey[5] - * type_scanner devkey[6] - * type_mod devkey[7] - * type_changer devkey[8] - * type_commdev devkey[9] - * type_reserv devkey[A] - * type_reserv devkey[B] - * type_raid devkey[C] - * type_enclosure devkey[D] - * type_reserv devkey[E] - * type_reserv devkey[F] - */ + uint8_t devkey[16] __nonstring; /* Key for every device type M,O,V,R + * type_disk devkey[0] + * type_tape devkey[1] + * type_printer devkey[2] + * type_processor devkey[3] + * type_worm devkey[4] + * type_cdrom devkey[5] + * type_scanner devkey[6] + * type_mod devkey[7] + * type_changer devkey[8] + * type_commdev devkey[9] + * type_reserv devkey[A] + * type_reserv devkey[B] + * type_raid devkey[C] + * type_enclosure devkey[D] + * type_reserv devkey[E] + * type_reserv devkey[F] + */ uint8_t info_lba_off; /* LBA offset in cdb */ uint8_t info_lba_len; /* LBA length in cdb */ uint8_t info_len_off; /* length offset in cdb */ |
From: Gleb C. <lna...@ya...> - 2025-04-18 15:55:13
|
Commit: f32f464 GitHub URL: https://github.com/SCST-project/scst/commit/f32f4641906bc6f4c48aaea51d2a7a1a0a95df3f Author: Gleb Chesnokov Date: 2025-04-18T18:54:20+03:00 Log Message: ----------- iscsi-scstd: Fix redefinition of bool when building with GCC 15 GCC 15 (C23) now reserves bool/true/false, so the local typedef in iscsid.d breaks the build: error: cannot use keyword 'false' as enumeration constant error: expected ';', identifier or '(' before 'bool' Include <stdbool.h> and drop the typedef. Modified Paths: -------------- iscsi-scst/usr/iscsid.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) =================================================================== diff --git a/iscsi-scst/usr/iscsid.h b/iscsi-scst/usr/iscsid.h index b3beb3a..63ffab2 100644 --- a/iscsi-scst/usr/iscsid.h +++ b/iscsi-scst/usr/iscsid.h @@ -23,6 +23,7 @@ #include <assert.h> #include <netdb.h> #include <syslog.h> +#include <stdbool.h> #include "types.h" #ifdef INSIDE_KERNEL_TREE @@ -36,10 +37,6 @@ #include "param.h" #include "misc.h" -#ifndef bool -typedef enum {false = 0, true} bool; -#endif - #define sBUG() assert(0) #define sBUG_ON(p) assert(!(p)) |
From: Gleb C. <lna...@ya...> - 2025-03-25 15:59:54
|
Commit: 86d3d4b GitHub URL: https://github.com/SCST-project/scst/commit/86d3d4bb1d1478d1385bfb7f5df57f964a1175af Author: Gleb Chesnokov Date: 2025-03-25T18:57:32+03:00 Log Message: ----------- kbuild: Enable additional compiler warnings Add additional compiler flags to improve code compliance. Modified Paths: -------------- fcst/Kbuild | 30 +++++++--- iscsi-scst/kernel/Kbuild | 20 ++++++- iscsi-scst/kernel/conn.c | 2 +- iscsi-scst/kernel/isert-scst/Kbuild | 24 ++++++-- iscsi-scst/kernel/isert-scst/iser_rdma.c | 7 +-- qla2x00t-32gbit/Kbuild | 17 +++++- qla2x00t-32gbit/qla2x00-target/Kbuild | 19 +++++- qla2x00t/Kbuild | 17 +++++- qla2x00t/qla2x00-target/Kbuild | 19 +++++- scst/src/Kbuild | 46 ++++++++++----- scst/src/dev_handlers/Kbuild | 21 ++++++- scst/src/scst_mem.c | 6 +- scst/src/scst_sysfs.c | 35 ++++++----- scst_local/Kbuild | 20 ++++++- srpt/src/Kbuild | 19 +++++- 15 files changed, 237 insertions(+), 65 deletions(-) =================================================================== diff --git a/fcst/Kbuild b/fcst/Kbuild index be21875..f9e3611 100644 --- a/fcst/Kbuild +++ b/fcst/Kbuild @@ -1,10 +1,26 @@ -KBUILD_EXTRA_SYMBOLS=$(src)/../scst/src/Module.symvers -ccflags-y += -I$(src)/../scst/include $(shell if [ -e include/scsi ]; then header_dir=.; else header_dir=$$(sed -n 's/^include[[:blank:]]\+\(.*\)\/Makefile$$/\1/p;s/^MAKEARGS := -C \([^ ]*\) .*/\1/p' Makefile); fi; if false; then echo "header_dir=$${header_dir}" >&2; fi; grep -qw fc_fill_fc_hdr "$${header_dir}/include/scsi/fc_encode.h" 2>/dev/null && echo -DFC_FILL_FC_HDR_IN_SCSI_FC_ENCODE_H) +KBUILD_EXTRA_SYMBOLS = $(src)/../scst/src/Module.symvers + +ccflags-y := -I$(src)/../scst/include $(shell if [ -e include/scsi ]; then header_dir=.; else header_dir=$$(sed -n 's/^include[[:blank:]]\+\(.*\)\/Makefile$$/\1/p;s/^MAKEARGS := -C \([^ ]*\) .*/\1/p' Makefile); fi; if false; then echo "header_dir=$${header_dir}" >&2; fi; grep -qw fc_fill_fc_hdr "$${header_dir}/include/scsi/fc_encode.h" 2>/dev/null && echo -DFC_FILL_FC_HDR_IN_SCSI_FC_ENCODE_H) + +ccflags-y += -Wall \ + -Wextra \ + -Wno-type-limits \ + -Wno-missing-field-initializers \ + -Wno-unused-parameter \ + -Wformat \ + -O2 \ + -Werror=format-security \ + -Werror=implicit-function-declaration \ + -pipe \ + -g \ + -grecord-gcc-switches \ + -fstack-clash-protection \ + -fstack-protector-strong \ + -Wstrict-prototypes obj-$(CONFIG_FCST) += fcst.o -fcst-objs := \ - ft_cmd.o \ - ft_io.o \ - ft_scst.o \ - ft_sess.o +fcst-objs := ft_cmd.o \ + ft_io.o \ + ft_scst.o \ + ft_sess.o diff --git a/iscsi-scst/kernel/Kbuild b/iscsi-scst/kernel/Kbuild index c6d3340..6fa853e 100644 --- a/iscsi-scst/kernel/Kbuild +++ b/iscsi-scst/kernel/Kbuild @@ -16,7 +16,24 @@ KBUILD_EXTRA_SYMBOLS = $(src)/../../scst/src/Module.symvers -ccflags-y += -I$(src)/../include -I$(src)/../../scst/include +ccflags-y := -I$(src)/../include \ + -I$(src)/../../scst/include \ + -Wall \ + -Wextra \ + -Wno-type-limits \ + -Wno-missing-field-initializers \ + -Wno-unused-parameter \ + -Wformat \ + -O2 \ + -Werror=format-security \ + -Werror=implicit-function-declaration \ + -pipe \ + -g \ + -grecord-gcc-switches \ + -fstack-clash-protection \ + -fstack-protector-strong \ + -Wstrict-prototypes + ccflags-y += $(CONFTEST_CFLAGS) #ccflags-y += -DCONFIG_SCST_ISCSI_DEBUG_DIGEST_FAILURES @@ -24,4 +41,3 @@ obj-m += iscsi-scst.o iscsi-scst-objs := iscsi.o nthread.o config.o digest.o \ conn.o session.o target.o event.o param.o \ iscsit_transport.o - diff --git a/iscsi-scst/kernel/conn.c b/iscsi-scst/kernel/conn.c index 212e973..fdeffc9 100644 --- a/iscsi-scst/kernel/conn.c +++ b/iscsi-scst/kernel/conn.c @@ -269,7 +269,7 @@ restart: } res = kobject_init_and_add(&conn->conn_kobj, &iscsi_conn_ktype, - scst_sysfs_get_sess_kobj(session->scst_sess), addr); + scst_sysfs_get_sess_kobj(session->scst_sess), "%s", addr); if (res != 0) { PRINT_ERROR("Unable create sysfs entries for conn %s", addr); diff --git a/iscsi-scst/kernel/isert-scst/Kbuild b/iscsi-scst/kernel/isert-scst/Kbuild index b6ecd0c..e6ecfa6 100644 --- a/iscsi-scst/kernel/isert-scst/Kbuild +++ b/iscsi-scst/kernel/isert-scst/Kbuild @@ -15,16 +15,30 @@ # GNU General Public License for more details. LINUXINCLUDE := $(ISER_CFLAGS) $(LINUXINCLUDE) -KBUILD_EXTRA_SYMBOLS+=$(src)/../../../scst/src/Module.symvers -KBUILD_EXTRA_SYMBOLS+= \ +KBUILD_EXTRA_SYMBOLS += $(src)/../../../scst/src/Module.symvers +KBUILD_EXTRA_SYMBOLS += \ $(src)/../../kernel/Module.symvers \ $(shell for d in /usr/src/ofa_kernel/default/Module.symvers; do \ [ -e $$d ] || continue; echo $$d; break; done) -ccflags-y += -I$(src)/../../../scst/include -ccflags-y += -I$(src)/../../include +ccflags-y := -I$(src)/../../../scst/include \ + -I$(src)/../../include \ + -Wall \ + -Wextra \ + -Wno-type-limits \ + -Wno-missing-field-initializers \ + -Wno-unused-parameter \ + -Wformat \ + -O2 \ + -Werror=format-security \ + -Werror=implicit-function-declaration \ + -pipe \ + -g \ + -grecord-gcc-switches \ + -fstack-clash-protection \ + -fstack-protector-strong \ + -Wstrict-prototypes obj-m += isert-scst.o isert-scst-objs := isert.o isert_login.o \ iser_datamover.o iser_rdma.o iser_buf.o iser_pdu.o iser_global.o - diff --git a/iscsi-scst/kernel/isert-scst/iser_rdma.c b/iscsi-scst/kernel/isert-scst/iser_rdma.c index a096d6f..3971106 100644 --- a/iscsi-scst/kernel/isert-scst/iser_rdma.c +++ b/iscsi-scst/kernel/isert-scst/iser_rdma.c @@ -901,7 +901,6 @@ static struct isert_device *isert_device_create(struct ib_device *ib_dev) struct ib_mr *mr; #endif struct ib_cq *cq; - char wq_name[64]; int i, j; TRACE_ENTRY(); @@ -975,9 +974,9 @@ static struct isert_device *isert_device_create(struct ib_device *ib_dev) cq_desc->idx = i; INIT_WORK(&cq_desc->cq_comp_work, isert_cq_comp_work_cb); - snprintf(wq_name, sizeof(wq_name), "isert_cq_%p", cq_desc); - cq_desc->cq_workqueue = alloc_workqueue(wq_name, - WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM, 1); + cq_desc->cq_workqueue = alloc_workqueue("isert_cq_%p", + WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM, 1, + cq_desc); if (unlikely(!cq_desc->cq_workqueue)) { PRINT_ERROR("Failed to alloc iser cq work queue for dev:%s", ib_dev->name); diff --git a/qla2x00t-32gbit/Kbuild b/qla2x00t-32gbit/Kbuild index a975475..31cb059 100644 --- a/qla2x00t-32gbit/Kbuild +++ b/qla2x00t-32gbit/Kbuild @@ -1,4 +1,19 @@ -ccflags-y := -I$(src)/../scst/include -I$(src)/include +ccflags-y := -I$(src)/../scst/include \ + -I$(src)/include \ + -Wall \ + -Wextra \ + -Wno-type-limits \ + -Wno-missing-field-initializers \ + -Wno-unused-parameter \ + -Wformat \ + -O2 \ + -Werror=implicit-function-declaration \ + -pipe \ + -g \ + -grecord-gcc-switches \ + -fstack-clash-protection \ + -fstack-protector-strong \ + -Wstrict-prototypes ifneq ($(CONFIG_SCSI_QLA2XXX_TARGET),) ccflags-y += -DCONFIG_SCSI_QLA2XXX_TARGET=$(CONFIG_SCSI_QLA2XXX_TARGET) diff --git a/qla2x00t-32gbit/qla2x00-target/Kbuild b/qla2x00t-32gbit/qla2x00-target/Kbuild index c3b0c09..24251e3 100644 --- a/qla2x00t-32gbit/qla2x00-target/Kbuild +++ b/qla2x00t-32gbit/qla2x00-target/Kbuild @@ -1,6 +1,23 @@ KBUILD_EXTRA_SYMBOLS = $(src)/../../scst/src/Module.symvers \ $(src)/../Module.symvers -ccflags-y += -I$(src)/../../scst/include -I$(src)/.. +ccflags-y := -I$(src)/../../scst/include \ + -I$(src)/.. \ + -Wall \ + -Wextra \ + -Wno-type-limits \ + -Wno-missing-field-initializers \ + -Wno-unused-parameter \ + -Wformat \ + -O2 \ + -Werror=format-security \ + -Werror=implicit-function-declaration \ + -pipe \ + -g \ + -grecord-gcc-switches \ + -fstack-clash-protection \ + -fstack-protector-strong \ + -Wstrict-prototypes + #ccflags-y += -DCONFIG_QLA_TGT_DEBUG_WORK_IN_THREAD #ccflags-y += -DCONFIG_QLA_TGT_DEBUG_SRR diff --git a/qla2x00t/Kbuild b/qla2x00t/Kbuild index f0eab43..e3deaec 100644 --- a/qla2x00t/Kbuild +++ b/qla2x00t/Kbuild @@ -1,4 +1,19 @@ -ccflags-y := -I$(src)/../scst/include +ccflags-y := -I$(src)/../scst/include \ + -Wall \ + -Wextra \ + -Wno-type-limits \ + -Wno-missing-field-initializers \ + -Wno-unused-parameter \ + -Wformat \ + -O2 \ + -Werror=format-security \ + -Werror=implicit-function-declaration \ + -pipe \ + -g \ + -grecord-gcc-switches \ + -fstack-clash-protection \ + -fstack-protector-strong \ + -Wstrict-prototypes ifneq ($(CONFIG_SCSI_QLA2XXX_TARGET),) ccflags-y += -DCONFIG_SCSI_QLA2XXX_TARGET=$(CONFIG_SCSI_QLA2XXX_TARGET) diff --git a/qla2x00t/qla2x00-target/Kbuild b/qla2x00t/qla2x00-target/Kbuild index be16e05..9f78e1b 100644 --- a/qla2x00t/qla2x00-target/Kbuild +++ b/qla2x00t/qla2x00-target/Kbuild @@ -1,6 +1,23 @@ KBUILD_EXTRA_SYMBOLS = $(src)/../../scst/src/Module.symvers \ $(src)/../Module.symvers -ccflags-y += -I$(src)/../../scst/include -I$(src)/.. +ccflags-y := -I$(src)/../../scst/include \ + -I$(src)/.. \ + -Wall \ + -Wextra \ + -Wno-type-limits \ + -Wno-missing-field-initializers \ + -Wno-unused-parameter \ + -Wformat \ + -O2 \ + -Werror=format-security \ + -Werror=implicit-function-declaration \ + -pipe \ + -g \ + -grecord-gcc-switches \ + -fstack-clash-protection \ + -fstack-protector-strong \ + -Wstrict-prototypes + #ccflags-y += -DCONFIG_QLA_TGT_DEBUG_WORK_IN_THREAD #ccflags-y += -DCONFIG_QLA_TGT_DEBUG_SRR diff --git a/scst/src/Kbuild b/scst/src/Kbuild index 425e128..de1df2e 100644 --- a/scst/src/Kbuild +++ b/scst/src/Kbuild @@ -1,4 +1,19 @@ -ccflags-y := -I$(src)/../include +ccflags-y := -I$(src)/../include \ + -Wall \ + -Wextra \ + -Wno-type-limits \ + -Wno-missing-field-initializers \ + -Wno-unused-parameter \ + -Wformat \ + -O2 \ + -Werror=format-security \ + -Werror=implicit-function-declaration \ + -pipe \ + -g \ + -grecord-gcc-switches \ + -fstack-clash-protection \ + -fstack-protector-strong \ + -Wstrict-prototypes ccflags-y += $(shell [ -n "${CONFIG_SCST_NO_DLM}" ] && echo -DCONFIG_SCST_NO_DLM) \ $(shell [ -n "${REVISION}" ] && echo -DSCST_REVISION=${REVISION}) @@ -20,17 +35,18 @@ ccflags-y += $(shell [ -n "${CONFIG_SCST_NO_DLM}" ] && echo -DCONFIG_SCST_NO_DLM obj-m := scst.o -scst-y += scst_copy_mgr.o -scst-y += scst_debug.o -scst-y += scst_dlm.o -scst-y += scst_event.o -scst-y += scst_lib.o -scst-y += scst_local_cmd.o -scst-y += scst_main.o -scst-y += scst_mem.o -scst-y += scst_no_dlm.o -scst-y += scst_pres.o -scst-y += scst_sysfs.o -scst-y += scst_targ.o -scst-y += scst_tg.o -obj-$(CONFIG_SCST) += scst.o dev_handlers/ +scst-y += scst_copy_mgr.o \ + scst_debug.o \ + scst_dlm.o \ + scst_event.o \ + scst_lib.o \ + scst_local_cmd.o \ + scst_main.o \ + scst_mem.o \ + scst_no_dlm.o \ + scst_pres.o \ + scst_sysfs.o \ + scst_targ.o \ + scst_tg.o + +obj-$(CONFIG_SCST) += scst.o dev_handlers/ diff --git a/scst/src/dev_handlers/Kbuild b/scst/src/dev_handlers/Kbuild index 4674acc..8a813a1 100644 --- a/scst/src/dev_handlers/Kbuild +++ b/scst/src/dev_handlers/Kbuild @@ -1,5 +1,22 @@ -KBUILD_EXTRA_SYMBOLS=$(src)/../Module.symvers -ccflags-y += -I$(src)/../../include +KBUILD_EXTRA_SYMBOLS = $(src)/../Module.symvers + +ccflags-y := -I$(src)/../../include \ + -Wall \ + -Wextra \ + -Wno-type-limits \ + -Wno-missing-field-initializers \ + -Wno-unused-parameter \ + -Wformat \ + -O2 \ + -Werror=format-security \ + -Werror=implicit-function-declaration \ + -pipe \ + -g \ + -grecord-gcc-switches \ + -fstack-clash-protection \ + -fstack-protector-strong \ + -Wstrict-prototypes + #ccflags-y += -DCONFIG_DEBUG_EXT_COPY_REMAP obj-m := scst_cdrom.o scst_changer.o scst_disk.o scst_modisk.o scst_tape.o \ diff --git a/scst/src/scst_mem.c b/scst/src/scst_mem.c index 821d6b3..1e5c209 100644 --- a/scst/src/scst_mem.c +++ b/scst/src/scst_mem.c @@ -2080,8 +2080,8 @@ static int scst_sgv_sysfs_create(struct sgv_pool *pool) TRACE_ENTRY(); - res = kobject_init_and_add(&pool->sgv_kobj, &sgv_pool_ktype, - scst_sgv_kobj, pool->name); + res = kobject_init_and_add(&pool->sgv_kobj, &sgv_pool_ktype, scst_sgv_kobj, "%s", + pool->name); if (res != 0) { PRINT_ERROR("Can't add sgv pool %s to sysfs", pool->name); goto out; @@ -2147,7 +2147,7 @@ int scst_add_sgv_kobj(struct kobject *parent, const char *name) scst_sgv_kobj = kzalloc(sizeof(*scst_sgv_kobj), GFP_KERNEL); if (!scst_sgv_kobj) goto out; - res = kobject_init_and_add(scst_sgv_kobj, &sgv_ktype, parent, name); + res = kobject_init_and_add(scst_sgv_kobj, &sgv_ktype, parent, "%s", name); if (res != 0) goto out_free; out: diff --git a/scst/src/scst_sysfs.c b/scst/src/scst_sysfs.c index a336558..1695eb9 100644 --- a/scst/src/scst_sysfs.c +++ b/scst/src/scst_sysfs.c @@ -1083,8 +1083,8 @@ int scst_tgtt_sysfs_create(struct scst_tgt_template *tgtt) TRACE_ENTRY(); - res = kobject_init_and_add(&tgtt->tgtt_kobj, &tgtt_ktype, - scst_targets_kobj, tgtt->name); + res = kobject_init_and_add(&tgtt->tgtt_kobj, &tgtt_ktype, scst_targets_kobj, "%s", + tgtt->name); if (res != 0) { PRINT_ERROR("Can't add tgtt %s to sysfs", tgtt->name); goto out; @@ -3019,8 +3019,8 @@ int scst_tgt_sysfs_create(struct scst_tgt *tgt) TRACE_ENTRY(); - res = kobject_init_and_add(&tgt->tgt_kobj, &tgt_ktype, - &tgt->tgtt->tgtt_kobj, tgt->tgt_name); + res = kobject_init_and_add(&tgt->tgt_kobj, &tgt_ktype, &tgt->tgtt->tgtt_kobj, "%s", + tgt->tgt_name); if (res != 0) { PRINT_ERROR("Can't add tgt %s to sysfs", tgt->tgt_name); goto out; @@ -3983,8 +3983,8 @@ int scst_dev_sysfs_create(struct scst_device *dev) TRACE_ENTRY(); - res = kobject_init_and_add(&dev->dev_kobj, &scst_dev_ktype, - scst_devices_kobj, dev->virt_name); + res = kobject_init_and_add(&dev->dev_kobj, &scst_dev_ktype, scst_devices_kobj, "%s", + dev->virt_name); if (res != 0) { PRINT_ERROR("Can't add device %s to sysfs", dev->virt_name); goto out; @@ -4370,8 +4370,8 @@ int scst_tgt_dev_sysfs_create(struct scst_tgt_dev *tgt_dev) TRACE_ENTRY(); res = kobject_init_and_add(&tgt_dev->tgt_dev_kobj, &scst_tgt_dev_ktype, - &tgt_dev->sess->sess_kobj, "lun%lld", - (unsigned long long)tgt_dev->lun); + &tgt_dev->sess->sess_kobj, "lun%lld", + (unsigned long long)tgt_dev->lun); if (res != 0) { PRINT_ERROR("Can't add tgt_dev %lld to sysfs", (unsigned long long)tgt_dev->lun); @@ -5049,8 +5049,8 @@ int scst_sess_sysfs_create(struct scst_session *sess) name = sess->sess_name; TRACE_DBG("Adding session %s to sysfs", name); - res = kobject_init_and_add(&sess->sess_kobj, &scst_session_ktype, - sess->tgt->tgt_sess_kobj, name); + res = kobject_init_and_add(&sess->sess_kobj, &scst_session_ktype, sess->tgt->tgt_sess_kobj, + "%s", name); if (res != 0) { PRINT_ERROR("Can't add session %s to sysfs", name); goto out; @@ -5229,8 +5229,8 @@ int scst_acg_dev_sysfs_create(struct scst_acg_dev *acg_dev, TRACE_ENTRY(); - res = kobject_init_and_add(&acg_dev->acg_dev_kobj, &acg_dev_ktype, - parent, "%llu", acg_dev->lun); + res = kobject_init_and_add(&acg_dev->acg_dev_kobj, &acg_dev_ktype, parent, "%llu", + acg_dev->lun); if (res != 0) { PRINT_ERROR("Can't add acg_dev %p to sysfs", acg_dev); goto out; @@ -5647,8 +5647,8 @@ int scst_acg_sysfs_create(struct scst_tgt *tgt, TRACE_ENTRY(); - res = kobject_init_and_add(&acg->acg_kobj, &acg_ktype, - tgt->tgt_ini_grp_kobj, acg->acg_name); + res = kobject_init_and_add(&acg->acg_kobj, &acg_ktype, tgt->tgt_ini_grp_kobj, "%s", + acg->acg_name); if (res != 0) { PRINT_ERROR("Can't add acg '%s' to sysfs", acg->acg_name); goto out; @@ -6257,8 +6257,7 @@ int scst_devt_sysfs_create(struct scst_dev_type *devt) else parent = scst_handlers_kobj; - res = kobject_init_and_add(&devt->devt_kobj, &scst_devt_ktype, - parent, devt->name); + res = kobject_init_and_add(&devt->devt_kobj, &scst_devt_ktype, parent, "%s", devt->name); if (res != 0) { PRINT_ERROR("Can't add devt %s to sysfs", devt->name); goto out; @@ -8025,8 +8024,8 @@ int __init scst_sysfs_init(void) goto out; } - res = kobject_init_and_add(&scst_sysfs_root_kobj, - &scst_sysfs_root_ktype, kernel_kobj, "%s", "scst_tgt"); + res = kobject_init_and_add(&scst_sysfs_root_kobj, &scst_sysfs_root_ktype, kernel_kobj, + "%s", "scst_tgt"); if (res != 0) goto sysfs_root_add_error; diff --git a/scst_local/Kbuild b/scst_local/Kbuild index 115020e..0e9a878 100644 --- a/scst_local/Kbuild +++ b/scst_local/Kbuild @@ -1,4 +1,20 @@ KBUILD_EXTRA_SYMBOLS=$(src)/../scst/src/Module.symvers -ccflags-y += -I$(src)/../scst/include -obj-m := scst_local.o +ccflags-y := -I$(src)/../scst/include \ + -Wall \ + -Wextra \ + -Wno-type-limits \ + -Wno-missing-field-initializers \ + -Wno-unused-parameter \ + -Wformat \ + -O2 \ + -Werror=format-security \ + -Werror=implicit-function-declaration \ + -pipe \ + -g \ + -grecord-gcc-switches \ + -fstack-clash-protection \ + -fstack-protector-strong \ + -Wstrict-prototypes + +obj-m := scst_local.o diff --git a/srpt/src/Kbuild b/srpt/src/Kbuild index 990eacd..6962b26 100644 --- a/srpt/src/Kbuild +++ b/srpt/src/Kbuild @@ -1,8 +1,23 @@ LINUXINCLUDE := $(CONFTEST_CFLAGS) $(LINUXINCLUDE) -KBUILD_EXTRA_SYMBOLS=$(src)/../../scst/src/Module.symvers \ +KBUILD_EXTRA_SYMBOLS = $(src)/../../scst/src/Module.symvers \ $(shell for d in /usr/src/ofa_kernel/default/Module.symvers; do\ [ -e $$d ] || continue; echo $$d; break; done) -ccflags-y += -I$(src)/../../scst/include +ccflags-y += -I$(src)/../../scst/include \ + -Wall \ + -Wextra \ + -Wno-type-limits \ + -Wno-missing-field-initializers \ + -Wno-unused-parameter \ + -Wformat \ + -O2 \ + -Werror=format-security \ + -Werror=implicit-function-declaration \ + -pipe \ + -g \ + -grecord-gcc-switches \ + -fstack-clash-protection \ + -fstack-protector-strong \ + -Wstrict-prototypes obj-m += ib_srpt.o |
From: Gleb C. <lna...@ya...> - 2025-03-25 15:59:42
|
Commit: 12a00ff GitHub URL: https://github.com/SCST-project/scst/commit/12a00ffc8900c84223a2203fd74d75395724cb48 Author: Gleb Chesnokov Date: 2025-03-25T18:57:32+03:00 Log Message: ----------- nightly build: Update kernel versions Another kernel versions update Modified Paths: -------------- .github/workflows/run_regression_tests.yaml | 21 ++++++------ nightly/conf/nightly.conf | 25 ++++++++------- 2 files changed, 24 insertions(+), 22 deletions(-) =================================================================== diff --git a/.github/workflows/run_regression_tests.yaml b/.github/workflows/run_regression_tests.yaml index e9767cb..16c03cf 100644 --- a/.github/workflows/run_regression_tests.yaml +++ b/.github/workflows/run_regression_tests.yaml @@ -16,24 +16,25 @@ jobs: fail-fast: false matrix: version: [ - '6.13', - '6.12.10', + '6.14', + '6.13.8', + '6.12.20', '6.11.11', '6.10.14', '6.9.12', '6.8.12', '6.7.12', - '6.6.72', - '6.1.126', - '5.15.176', - '5.10.233', - '5.4.289', + '6.6.83', + '6.1.131', + '5.15.179', + '5.10.235', + '5.4.291', '4.19.325', '4.14.336', '4.9.337', '3.18.140', '3.10.108', - '5.14.0-503.21.1.el9_5^AlmaLinux^9.5', + '5.14.0-503.33.1.el9_5^AlmaLinux^9.5', '5.14.0-427.42.1.el9_4^AlmaLinux^9.4', '5.14.0-362.24.2.el9_3^AlmaLinux^9.3', '5.14.0-284.30.1.el9_2^AlmaLinux^9.2', @@ -42,8 +43,8 @@ jobs: '4.18.0-425.19.2.el8_7^AlmaLinux^8.7', '4.18.0-372.32.1.el8_6^AlmaLinux^8.6', '3.10.0-1160.118.1.el7^CentOS^7.9.2009', - '5.15.0-303.171.5.2.1.el9uek^UEK^9', - '5.4.17-2136.338.4.2.el8uek^UEK^8', + '5.15.0-306.177.4.el9uek^UEK^9', + '5.4.17-2136.341.3.3.el8uek^UEK^8', '4.14.35-2047.543.3.el7uek^UEK^7', '4.1.12-124.92.3.el6uek^UEK^6' ] diff --git a/nightly/conf/nightly.conf b/nightly/conf/nightly.conf index a0cf754..76d1d80 100644 --- a/nightly/conf/nightly.conf +++ b/nightly/conf/nightly.conf @@ -3,36 +3,37 @@ ABT_DETAILS="x86_64" ABT_JOBS=5 ABT_KERNELS=" \ -6.13 \ -6.12.10-nc \ +6.14 \ +6.13.8-nc \ +6.12.20-nc \ 6.11.11-nc \ 6.10.14-nc \ 6.9.12-nc \ 6.8.12-nc \ 6.7.12-nc \ -6.6.72-nc \ +6.6.83-nc \ 6.5.13-nc \ 6.4.16-nc \ 6.3.13-nc \ 6.2.16-nc \ -6.1.126-nc \ +6.1.131-nc \ 6.0.19-nc \ 5.19.17-nc \ 5.18.19-nc \ 5.17.15-nc \ 5.16.20-nc \ -5.15.176-nc \ +5.15.179-nc \ 5.14.21-nc \ 5.13.19-nc \ 5.12.19-nc \ 5.11.22-nc \ -5.10.233-nc \ +5.10.235-nc \ 5.9.16-nc \ 5.8.18-nc \ 5.7.19-nc \ 5.6.19-nc \ 5.5.19-nc \ -5.4.289-nc \ +5.4.291-nc \ 5.3.18-nc \ 5.2.21-nc \ 5.1.21-nc \ @@ -68,7 +69,7 @@ ABT_KERNELS=" \ 3.12.74-nc \ 3.11.10-nc \ 3.10.108-nc \ -5.14.0-503.21.1.el9_5^AlmaLinux^9.5-nc \ +5.14.0-503.33.1.el9_5^AlmaLinux^9.5-nc \ 5.14.0-427.42.1.el9_4^AlmaLinux^9.4-nc \ 5.14.0-362.24.2.el9_3^AlmaLinux^9.3-nc \ 5.14.0-284.30.1.el9_2^AlmaLinux^9.2-nc \ @@ -89,13 +90,13 @@ ABT_KERNELS=" \ 3.10.0-1062.18.1.el7^CentOS^7.7.1908-nc \ 3.10.0-957.27.2.el7^CentOS^7.6.1810-nc \ 3.10.0-862.14.4.el7^CentOS^7.5.1804-nc \ -5.15.0-303.171.5.2.1.el9uek^UEK^9-nc \ -5.15.0-303.171.5.2.1.el8uek^UEK^8-nc \ -5.4.17-2136.338.4.2.el8uek^UEK^8-nc \ +5.15.0-306.177.4.el9uek^UEK^9-nc \ +5.15.0-306.177.4.el8uek^UEK^8-nc \ +5.4.17-2136.341.3.3.el8uek^UEK^8-nc \ 5.4.17-2102.206.1.el8uek^UEK^8-nc \ 5.4.17-2036.104.5.el8uek^UEK^8-nc \ 5.4.17-2011.7.4.el8uek^UEK^8-nc \ -5.4.17-2136.338.4.2.el7uek^UEK^7-nc \ +5.4.17-2136.341.3.3.el7uek^UEK^7-nc \ 5.4.17-2102.206.1.el7uek^UEK^7-nc \ 5.4.17-2036.104.5.el7uek^UEK^7-nc \ 5.4.17-2011.7.4.el7uek^UEK^7-nc \ |
From: Gleb C. <lna...@ya...> - 2025-03-25 15:58:06
|
Commit: d09f360 GitHub URL: https://github.com/SCST-project/scst/commit/d09f360b930de478701c2fa422bffa3419cceb4f Author: Gleb Chesnokov Date: 2025-03-25T18:57:32+03:00 Log Message: ----------- scripts: Fix shellcheck warnings for checkpatch scripts - Switching from 'set -e' to 'set -euo pipefail' for better error handling. - Quoting all variable expansions to prevent word splitting and globbing. - Replacing legacy unquoted $(...) and $@ with quoted forms. - Using array-safe idioms where necessary (e.g., "${src_files[@]}"). This patch doesn't change any functionality. Modified Paths: -------------- scripts/checkpatch | 8 +++--- scripts/checkpatch_commits | 20 +++++++-------- scripts/checkpatch_diff | 12 ++++----- scripts/checkpatch_scan | 20 +++++++-------- 4 files changed, 30 insertions(+), 30 deletions(-) =================================================================== diff --git a/scripts/checkpatch b/scripts/checkpatch index ef48338..8b56c6d 100755 --- a/scripts/checkpatch +++ b/scripts/checkpatch @@ -1,8 +1,8 @@ #!/usr/bin/env bash -set -e +set -euo pipefail -scriptpath=${CHECKPATCH_PATH:-/lib/modules/$(uname -r)/build/scripts} +scriptpath="${CHECKPATCH_PATH:-/lib/modules/$(uname -r)/build/scripts}" ignore=( MISSING_SIGN_OFF @@ -20,6 +20,6 @@ ignore=( MACRO_ARG_REUSE IF_0 ) -ignore_str=${ignore[*]} +ignore_str="${ignore[*]}" -${scriptpath}/checkpatch.pl --no-tree --show-types --strict --ignore="${ignore_str// /,}" $@ +"${scriptpath}/checkpatch.pl" --no-tree --show-types --strict --ignore="${ignore_str// /,}" "$@" diff --git a/scripts/checkpatch_commits b/scripts/checkpatch_commits index d832851..0aa0cc1 100755 --- a/scripts/checkpatch_commits +++ b/scripts/checkpatch_commits @@ -1,21 +1,21 @@ #!/usr/bin/env bash -set -e +set -euo pipefail -rootdir=$(readlink -f $(dirname $0)/..) -scriptsdir=${rootdir}/scripts -base_commit=${1:-master} +rootdir="$(readlink -f "$(dirname "$0")/..")" +scriptsdir="${rootdir}/scripts" +base_commit="${1:-master}" -commits=$(cd ${rootdir} && git log --pretty=format:"%h" ${base_commit}..HEAD) +commits=$(cd "${rootdir}" && git log --pretty=format:"%h" "${base_commit}"..HEAD) err=0 -for commit in $commits; do - echo "Running checkpatch for commit $commit" +for commit in ${commits}; do + echo "Running checkpatch for commit ${commit}" echo -e "========================================\n" - (cd ${rootdir} && - git format-patch -1 --stdout $commit | ${scriptsdir}/checkpatch -) || err=1 + (cd "${rootdir}" && + git format-patch -1 --stdout "${commit}" | "${scriptsdir}/checkpatch" -) || err=1 echo -e "\n" done -exit $err +exit "${err}" diff --git a/scripts/checkpatch_diff b/scripts/checkpatch_diff index 02b064a..8ab3af4 100755 --- a/scripts/checkpatch_diff +++ b/scripts/checkpatch_diff @@ -1,13 +1,13 @@ #!/usr/bin/env bash -set -e +set -euo pipefail -rootdir=$(readlink -f $(dirname $0)/..) -scriptsdir=${rootdir}/scripts -base_commit=${1:-master} +rootdir="$(readlink -f "$(dirname "$0")/..")" +scriptsdir="${rootdir}/scripts" +base_commit="${1:-master}" err=0 -(cd ${rootdir} && git diff ${base_commit} | ${scriptsdir}/checkpatch -) || err=1 +(cd "${rootdir}" && git diff "${base_commit}" | "${scriptsdir}/checkpatch" -) || err=1 -exit $err +exit "${err}" diff --git a/scripts/checkpatch_scan b/scripts/checkpatch_scan index cc539b3..b2ecaa4 100755 --- a/scripts/checkpatch_scan +++ b/scripts/checkpatch_scan @@ -1,23 +1,23 @@ #!/usr/bin/env bash -set -e +set -euo pipefail -rootdir=$(readlink -f $(dirname $0)/..) -scriptsdir=${rootdir}/scripts -outputfile=checkpatch.out +rootdir="$(readlink -f "$(dirname "$0")/..")" +scriptsdir="${rootdir}/scripts" +outputfile="checkpatch.out" -src_files=$(${scriptsdir}/list-source-files ${rootdir} | \ +mapfile -t src_files < <( + "${scriptsdir}/list-source-files" "${rootdir}" | \ grep -vE '^debian/|^fcst/linux-patches|patch$|pdf$|png$|^iscsi-scst/usr|^qla|^scripts/|^scstadmin/|^usr/|^www/' | \ while read -r filename; do echo "${rootdir}/$filename"; done) -${scriptsdir}/checkpatch -f $src_files 1> ${outputfile} || true +"${scriptsdir}/checkpatch" -f "${src_files[@]}" 1> "${outputfile}" || true -errors=$(grep -c '^ERROR' "${outputfile}") -warnings=$(grep -c '^WARNING' "${outputfile}") -checks=$(grep -c '^CHECK' "${outputfile}") +errors=$(grep -c '^ERROR' "${outputfile}" || true) +warnings=$(grep -c '^WARNING' "${outputfile}" || true) +checks=$(grep -c '^CHECK' "${outputfile}" || true) echo "${errors} errors / ${warnings} warnings / ${checks} checks." - grep -E '^WARNING|^ERROR|^CHECK' "${outputfile}" | sort | sed 's/^CHECK:CAMELCASE: Avoid CamelCase:.*/CHECK:CAMELCASE Avoid CamelCase/' | |
From: Gleb C. <lna...@ya...> - 2025-03-25 14:19:51
|
Commit: 2e92bd0 GitHub URL: https://github.com/SCST-project/scst/commit/2e92bd0bb3341a06910767570611ba3d75a5c08c Author: Gleb Chesnokov Date: 2025-03-25T17:19:08+03:00 Log Message: ----------- qla2x00t-32gbit: Move FCE Trace buffer allocation to user control Currently FCE Tracing is enabled to log additional ELS events. Instead, user will enable or disable this feature through debugfs. Modify existing DFS knob to allow user to enable or disable this feature. echo [1 | 0] > /sys/kernel/debug/qla2xxx/qla2xxx_??/fce cat /sys/kernel/debug/qla2xxx/qla2xxx_??/fce Cc: st...@vg... Fixes: df613b96077c ("[SCSI] qla2xxx: Add Fibre Channel Event (FCE) tracing support.") Signed-off-by: Quinn Tran <qu...@ma...> Signed-off-by: Nilesh Javali <nj...@ma...> Link: https://lore.kernel.org/r/202...@ma... Reviewed-by: Himanshu Madhani <him...@or...> Signed-off-by: Martin K. Petersen <mar...@or...> [ commit 841df27d619e upstream ] Modified Paths: -------------- qla2x00t-32gbit/qla_def.h | 2 + qla2x00t-32gbit/qla_dfs.c | 124 ++++++++++++--- qla2x00t-32gbit/qla_gbl.h | 3 + qla2x00t-32gbit/qla_init.c | 28 ++-- 4 files changed, 126 insertions(+), 31 deletions(-) =================================================================== diff --git a/qla2x00t-32gbit/qla_def.h b/qla2x00t-32gbit/qla_def.h index 2707055..b34b673 100644 --- a/qla2x00t-32gbit/qla_def.h +++ b/qla2x00t-32gbit/qla_def.h @@ -4159,6 +4159,8 @@ struct qla_hw_data { uint32_t npiv_supported :1; uint32_t pci_channel_io_perm_failure :1; uint32_t fce_enabled :1; + uint32_t user_enabled_fce :1; + uint32_t fce_dump_buf_alloced :1; uint32_t fac_supported :1; uint32_t chip_reset_done :1; diff --git a/qla2x00t-32gbit/qla_dfs.c b/qla2x00t-32gbit/qla_dfs.c index 51e1d14..fbfe051 100644 --- a/qla2x00t-32gbit/qla_dfs.c +++ b/qla2x00t-32gbit/qla_dfs.c @@ -413,26 +413,31 @@ qla2x00_dfs_fce_show(struct seq_file *s, void *unused) mutex_lock(&ha->fce_mutex); - seq_puts(s, "FCE Trace Buffer\n"); - seq_printf(s, "In Pointer = %llx\n\n", (unsigned long long)ha->fce_wr); - seq_printf(s, "Base = %llx\n\n", (unsigned long long) ha->fce_dma); - seq_puts(s, "FCE Enable Registers\n"); - seq_printf(s, "%08x %08x %08x %08x %08x %08x\n", - ha->fce_mb[0], ha->fce_mb[2], ha->fce_mb[3], ha->fce_mb[4], - ha->fce_mb[5], ha->fce_mb[6]); - - fce = (uint32_t *) ha->fce; - fce_start = (unsigned long long) ha->fce_dma; - for (cnt = 0; cnt < fce_calc_size(ha->fce_bufs) / 4; cnt++) { - if (cnt % 8 == 0) - seq_printf(s, "\n%llx: ", - (unsigned long long)((cnt * 4) + fce_start)); - else - seq_putc(s, ' '); - seq_printf(s, "%08x", *fce++); - } + if (ha->flags.user_enabled_fce) { + seq_puts(s, "FCE Trace Buffer\n"); + seq_printf(s, "In Pointer = %llx\n\n", (unsigned long long)ha->fce_wr); + seq_printf(s, "Base = %llx\n\n", (unsigned long long)ha->fce_dma); + seq_puts(s, "FCE Enable Registers\n"); + seq_printf(s, "%08x %08x %08x %08x %08x %08x\n", + ha->fce_mb[0], ha->fce_mb[2], ha->fce_mb[3], ha->fce_mb[4], + ha->fce_mb[5], ha->fce_mb[6]); + + fce = (uint32_t *)ha->fce; + fce_start = (unsigned long long)ha->fce_dma; + for (cnt = 0; cnt < fce_calc_size(ha->fce_bufs) / 4; cnt++) { + if (cnt % 8 == 0) + seq_printf(s, "\n%llx: ", + (unsigned long long)((cnt * 4) + fce_start)); + else + seq_putc(s, ' '); + seq_printf(s, "%08x", *fce++); + } - seq_puts(s, "\nEnd\n"); + seq_puts(s, "\nEnd\n"); + } else { + seq_puts(s, "FCE Trace is currently not enabled\n"); + seq_puts(s, "\techo [ 1 | 0 ] > fce\n"); + } mutex_unlock(&ha->fce_mutex); @@ -471,7 +476,7 @@ qla2x00_dfs_fce_release(struct inode *inode, struct file *file) struct qla_hw_data *ha = vha->hw; int rval; - if (ha->flags.fce_enabled) + if (ha->flags.fce_enabled || !ha->fce) goto out; mutex_lock(&ha->fce_mutex); @@ -492,11 +497,88 @@ out: return single_release(inode, file); } +static ssize_t +qla2x00_dfs_fce_write(struct file *file, const char __user *buffer, + size_t count, loff_t *pos) +{ + struct seq_file *s = file->private_data; + struct scsi_qla_host *vha = s->private; + struct qla_hw_data *ha = vha->hw; + char *buf; + int rc = 0; + unsigned long enable; + + if (!IS_QLA25XX(ha) && !IS_QLA81XX(ha) && !IS_QLA83XX(ha) && + !IS_QLA27XX(ha) && !IS_QLA28XX(ha)) { + ql_dbg(ql_dbg_user, vha, 0xd034, + "this adapter does not support FCE."); + return -EINVAL; + } + + buf = memdup_user_nul(buffer, count); + if (IS_ERR(buf)) { + ql_dbg(ql_dbg_user, vha, 0xd037, + "fail to copy user buffer."); + return PTR_ERR(buf); + } + + enable = kstrtoul(buf, 0, 0); + rc = count; + + mutex_lock(&ha->fce_mutex); + + if (enable) { + if (ha->flags.user_enabled_fce) { + mutex_unlock(&ha->fce_mutex); + goto out_free; + } + ha->flags.user_enabled_fce = 1; + if (!ha->fce) { + rc = qla2x00_alloc_fce_trace(vha); + if (rc) { + ha->flags.user_enabled_fce = 0; + mutex_unlock(&ha->fce_mutex); + goto out_free; + } + + /* adjust fw dump buffer to take into account of this feature */ + if (!ha->flags.fce_dump_buf_alloced) + qla2x00_alloc_fw_dump(vha); + } + + if (!ha->flags.fce_enabled) + qla_enable_fce_trace(vha); + + ql_dbg(ql_dbg_user, vha, 0xd045, "User enabled FCE .\n"); + } else { + if (!ha->flags.user_enabled_fce) { + mutex_unlock(&ha->fce_mutex); + goto out_free; + } + ha->flags.user_enabled_fce = 0; + if (ha->flags.fce_enabled) { + qla2x00_disable_fce_trace(vha, NULL, NULL); + ha->flags.fce_enabled = 0; + } + + qla2x00_free_fce_trace(ha); + /* no need to re-adjust fw dump buffer */ + + ql_dbg(ql_dbg_user, vha, 0xd04f, "User disabled FCE .\n"); + } + + mutex_unlock(&ha->fce_mutex); +out_free: + kfree(buf); + return rc; +} + static const struct file_operations dfs_fce_ops = { .open = qla2x00_dfs_fce_open, .read = seq_read, .llseek = seq_lseek, .release = qla2x00_dfs_fce_release, + .write = qla2x00_dfs_fce_write, }; static int @@ -630,8 +712,6 @@ qla2x00_dfs_setup(scsi_qla_host_t *vha) if (!IS_QLA25XX(ha) && !IS_QLA81XX(ha) && !IS_QLA83XX(ha) && !IS_QLA27XX(ha) && !IS_QLA28XX(ha)) goto out; - if (!ha->fce) - goto out; if (qla2x00_dfs_root) goto create_dir; diff --git a/qla2x00t-32gbit/qla_gbl.h b/qla2x00t-32gbit/qla_gbl.h index dad7b66..e95ad2c 100644 --- a/qla2x00t-32gbit/qla_gbl.h +++ b/qla2x00t-32gbit/qla_gbl.h @@ -11,6 +11,9 @@ /* * Global Function Prototypes in qla_init.c source file. */ +int qla2x00_alloc_fce_trace(scsi_qla_host_t *); +void qla2x00_free_fce_trace(struct qla_hw_data *ha); +void qla_enable_fce_trace(scsi_qla_host_t *); extern int qla2x00_initialize_adapter(scsi_qla_host_t *); extern int qla24xx_post_prli_work(struct scsi_qla_host *vha, fc_port_t *fcport); diff --git a/qla2x00t-32gbit/qla_init.c b/qla2x00t-32gbit/qla_init.c index c93e345..e6b616a 100644 --- a/qla2x00t-32gbit/qla_init.c +++ b/qla2x00t-32gbit/qla_init.c @@ -2681,7 +2681,7 @@ exit: return rval; } -static void qla_enable_fce_trace(scsi_qla_host_t *vha) +void qla_enable_fce_trace(scsi_qla_host_t *vha) { int rval; struct qla_hw_data *ha = vha->hw; @@ -3720,25 +3720,24 @@ qla24xx_chip_diag(scsi_qla_host_t *vha) return rval; } -static void -qla2x00_alloc_fce_trace(scsi_qla_host_t *vha) +int qla2x00_alloc_fce_trace(scsi_qla_host_t *vha) { dma_addr_t tc_dma; void *tc; struct qla_hw_data *ha = vha->hw; if (!IS_FWI2_CAPABLE(ha)) - return; + return -EINVAL; if (!IS_QLA25XX(ha) && !IS_QLA81XX(ha) && !IS_QLA83XX(ha) && !IS_QLA27XX(ha) && !IS_QLA28XX(ha)) - return; + return -EINVAL; if (ha->fce) { ql_dbg(ql_dbg_init, vha, 0x00bd, "%s: FCE Mem is already allocated.\n", __func__); - return; + return -EIO; } /* Allocate memory for Fibre Channel Event Buffer. */ @@ -3748,7 +3747,7 @@ qla2x00_alloc_fce_trace(scsi_qla_host_t *vha) ql_log(ql_log_warn, vha, 0x00be, "Unable to allocate (%d KB) for FCE.\n", FCE_SIZE / 1024); - return; + return -ENOMEM; } ql_dbg(ql_dbg_init, vha, 0x00c0, @@ -3757,6 +3756,16 @@ qla2x00_alloc_fce_trace(scsi_qla_host_t *vha) ha->fce_dma = tc_dma; ha->fce = tc; ha->fce_bufs = FCE_NUM_BUFFERS; + return 0; +} + +void qla2x00_free_fce_trace(struct qla_hw_data *ha) +{ + if (!ha->fce) + return; + dma_free_coherent(&ha->pdev->dev, FCE_SIZE, ha->fce, ha->fce_dma); + ha->fce = NULL; + ha->fce_dma = 0; } static void @@ -3847,9 +3856,10 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha) if (ha->tgt.atio_ring) mq_size += ha->tgt.atio_q_length * sizeof(request_t); - qla2x00_alloc_fce_trace(vha); - if (ha->fce) + if (ha->fce) { fce_size = sizeof(struct qla2xxx_fce_chain) + FCE_SIZE; + ha->flags.fce_dump_buf_alloced = 1; + } qla2x00_alloc_eft_trace(vha); if (ha->eft) eft_size = EFT_SIZE; |
From: Gleb C. <lna...@ya...> - 2025-03-25 13:56:23
|
Commit: a2c1c2d GitHub URL: https://github.com/SCST-project/scst/commit/a2c1c2d8b2a5869fa70cc29d5c863780ef264a7c Author: Gleb Chesnokov Date: 2025-03-25T16:53:57+03:00 Log Message: ----------- qla2x00t, qla2x00t-32gbit, scst_local: Port to Linux kernel v6.14 Support for the following scsi layer changes in the Linux kernel v6.14: - ed638918f4df ("scsi: Rename .slave_alloc() and .slave_destroy()") - 49515b7fe50c ("scsi: Convert SCSI drivers to .sdev_configure()") - c9a71ca13f71 ("scsi: Constify struct pci_device_id") - bd326a5ad639 ("scsi: replace blk_mq_pci_map_queues with blk_mq_map_hw_queues") Modified Paths: -------------- iscsi-scst/usr/chap.c | 2 +- qla2x00t-32gbit/qla_nvme.c | 6 +++ qla2x00t-32gbit/qla_os.c | 29 +++++++++++-- qla2x00t/qla_os.c | 33 ++++++++++++--- scst_local/scst_local.c | 10 ++++- 5 files changed, 70 insertions(+), 10 deletions(-) =================================================================== diff --git a/iscsi-scst/usr/chap.c b/iscsi-scst/usr/chap.c index b5224ed..6a344af 100644 --- a/iscsi-scst/usr/chap.c +++ b/iscsi-scst/usr/chap.c @@ -354,7 +354,7 @@ chap_calc_digest_af_alg(char *alg, char chap_id, int datafd; ssize_t bytes; char buffer[1024]; - int res = 0; + ssize_t res = 0; datafd = af_alg_init(alg); if (datafd < 0) { diff --git a/qla2x00t-32gbit/qla_nvme.c b/qla2x00t-32gbit/qla_nvme.c index 038c10e..2e67893 100644 --- a/qla2x00t-32gbit/qla_nvme.c +++ b/qla2x00t-32gbit/qla_nvme.c @@ -13,7 +13,9 @@ #include <linux/delay.h> #include <linux/nvme.h> #include <linux/nvme-fc.h> +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) #include <linux/blk-mq-pci.h> +#endif #include <linux/blk-mq.h> static struct nvme_fc_port_template qla_nvme_fc_transport; @@ -867,7 +869,11 @@ static void qla_nvme_map_queues(struct nvme_fc_local_port *lport, { struct scsi_qla_host *vha = lport->private; +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) blk_mq_pci_map_queues(map, vha->hw->pdev, vha->irq_offset); +#else + blk_mq_map_hw_queues(map, &vha->hw->pdev->dev, vha->irq_offset); +#endif } #endif diff --git a/qla2x00t-32gbit/qla_os.c b/qla2x00t-32gbit/qla_os.c index f6d8a51..9dbb5b3 100644 --- a/qla2x00t-32gbit/qla_os.c +++ b/qla2x00t-32gbit/qla_os.c @@ -14,7 +14,8 @@ #include <linux/slab.h> #include <linux/workqueue.h> #include <linux/version.h> -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) && \ + LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) #include <linux/blk-mq-pci.h> #endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) @@ -1979,7 +1980,11 @@ qla2x00_abort_all_cmds(scsi_qla_host_t *vha, int res) } static int +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) qla2xxx_slave_alloc(struct scsi_device *sdev) +#else +qla2xxx_sdev_init(struct scsi_device *sdev) +#endif { struct fc_rport *rport = starget_to_rport(scsi_target(sdev)); @@ -1992,7 +1997,11 @@ qla2xxx_slave_alloc(struct scsi_device *sdev) } static int +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) qla2xxx_slave_configure(struct scsi_device *sdev) +#else +qla2xxx_sdev_configure(struct scsi_device *sdev, struct queue_limits *lim) +#endif { scsi_qla_host_t *vha = shost_priv(sdev->host); struct req_que *req = vha->req; @@ -2011,7 +2020,11 @@ qla2xxx_slave_configure(struct scsi_device *sdev) } static void +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) qla2xxx_slave_destroy(struct scsi_device *sdev) +#else +qla2xxx_sdev_destroy(struct scsi_device *sdev) +#endif { sdev->hostdata = NULL; } @@ -8174,7 +8187,12 @@ static MAP_QUEUES_RET qla2xxx_map_queues(struct Scsi_Host *shost) if (USER_CTRL_IRQ(vha->hw) || !vha->hw->mqiobase) blk_mq_map_queues(qmap); else +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) blk_mq_pci_map_queues(qmap, vha->hw->pdev, vha->irq_offset); +#else + blk_mq_map_hw_queues(qmap, &vha->hw->pdev->dev, + vha->irq_offset); +#endif #else if (USER_CTRL_IRQ(vha->hw)) blk_mq_map_queues(&shost->tag_set); @@ -8216,10 +8234,15 @@ struct scsi_host_template qla2xxx_driver_template = { .eh_bus_reset_handler = qla2xxx_eh_bus_reset, .eh_host_reset_handler = qla2xxx_eh_host_reset, +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) .slave_configure = qla2xxx_slave_configure, - .slave_alloc = qla2xxx_slave_alloc, .slave_destroy = qla2xxx_slave_destroy, +#else + .sdev_configure = qla2xxx_sdev_configure, + .sdev_init = qla2xxx_sdev_init, + .sdev_destroy = qla2xxx_sdev_destroy, +#endif .scan_finished = qla2xxx_scan_finished, .scan_start = qla2xxx_scan_start, #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0) @@ -8275,7 +8298,7 @@ static const struct pci_error_handlers qla2xxx_err_handler = { #endif }; -static struct pci_device_id qla2xxx_pci_tbl[] = { +static const struct pci_device_id qla2xxx_pci_tbl[] = { { PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2100) }, { PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2200) }, { PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2300) }, diff --git a/qla2x00t/qla_os.c b/qla2x00t/qla_os.c index 9bc1de5..2bb5718 100644 --- a/qla2x00t/qla_os.c +++ b/qla2x00t/qla_os.c @@ -243,11 +243,17 @@ MODULE_PARM_DESC(ql2xmdenable, /* * SCSI host template entry points */ -static int qla2xxx_slave_configure(struct scsi_device *device); -static int qla2xxx_slave_alloc(struct scsi_device *); +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) +static int qla2xxx_slave_configure(struct scsi_device *sdev); +static int qla2xxx_slave_alloc(struct scsi_device *sdev); +static void qla2xxx_slave_destroy(struct scsi_device *sdev); +#else +static int qla2xxx_sdev_configure(struct scsi_device *sdev, struct queue_limits *lim); +static int qla2xxx_sdev_init(struct scsi_device *sdev); +static void qla2xxx_sdev_destroy(struct scsi_device *sdev); +#endif static int qla2xxx_scan_finished(struct Scsi_Host *, unsigned long time); static void qla2xxx_scan_start(struct Scsi_Host *); -static void qla2xxx_slave_destroy(struct scsi_device *); #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) static int qla2xxx_queuecommand_lck(struct scsi_cmnd *cmd, void (*fn)(struct scsi_cmnd *)); @@ -277,10 +283,15 @@ struct scsi_host_template qla2xxx_driver_template = { .eh_bus_reset_handler = qla2xxx_eh_bus_reset, .eh_host_reset_handler = qla2xxx_eh_host_reset, +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) .slave_configure = qla2xxx_slave_configure, - .slave_alloc = qla2xxx_slave_alloc, .slave_destroy = qla2xxx_slave_destroy, +#else + .sdev_configure = qla2xxx_sdev_configure, + .sdev_init = qla2xxx_sdev_init, + .sdev_destroy = qla2xxx_sdev_destroy, +#endif .scan_finished = qla2xxx_scan_finished, .scan_start = qla2xxx_scan_start, #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0) @@ -1389,7 +1400,11 @@ qla2x00_abort_all_cmds(scsi_qla_host_t *vha, int res) } static int +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) qla2xxx_slave_alloc(struct scsi_device *sdev) +#else +qla2xxx_sdev_init(struct scsi_device *sdev) +#endif { struct fc_rport *rport = starget_to_rport(scsi_target(sdev)); @@ -1402,7 +1417,11 @@ qla2xxx_slave_alloc(struct scsi_device *sdev) } static int +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) qla2xxx_slave_configure(struct scsi_device *sdev) +#else +qla2xxx_sdev_configure(struct scsi_device *sdev, struct queue_limits *lim) +#endif { scsi_qla_host_t *vha = shost_priv(sdev->host); struct qla_hw_data *ha = vha->hw; @@ -1424,7 +1443,11 @@ qla2xxx_slave_configure(struct scsi_device *sdev) } static void +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) qla2xxx_slave_destroy(struct scsi_device *sdev) +#else +qla2xxx_sdev_destroy(struct scsi_device *sdev) +#endif { sdev->hostdata = NULL; } @@ -4732,7 +4755,7 @@ static struct pci_error_handlers qla2xxx_err_handler = { .resume = qla2xxx_pci_resume, }; -static struct pci_device_id qla2xxx_pci_tbl[] = { +static const struct pci_device_id qla2xxx_pci_tbl[] = { { PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2100) }, { PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2200) }, { PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2300) }, diff --git a/scst_local/scst_local.c b/scst_local/scst_local.c index e0c6f28..15160be 100644 --- a/scst_local/scst_local.c +++ b/scst_local/scst_local.c @@ -1050,7 +1050,11 @@ static int scst_local_slave_alloc(struct scsi_device *sdev) } #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) static int scst_local_slave_configure(struct scsi_device *sdev) +#else +static int scst_local_sdev_configure(struct scsi_device *sdev, struct queue_limits *lim) +#endif { int mqd; @@ -1370,7 +1374,11 @@ static const struct scsi_host_template scst_lcl_ini_driver_template = { #else .dma_alignment = (4096 - 1), #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) .slave_configure = scst_local_slave_configure, +#else + .sdev_configure = scst_local_sdev_configure, +#endif .eh_abort_handler = scst_local_abort, .eh_device_reset_handler = scst_local_device_reset, .eh_target_reset_handler = scst_local_target_reset, @@ -1382,7 +1390,7 @@ static const struct scsi_host_template scst_lcl_ini_driver_template = { /* * Set it low for the "Drop back to untagged" case in * scsi_track_queue_full(). We are adjusting it to a better - * default in slave_configure() + * default in sdev_configure() */ .cmd_per_lun = 3, .this_id = -1, |
From: Gleb C. <lna...@ya...> - 2025-03-25 13:54:43
|
Commit: 1f40850 GitHub URL: https://github.com/SCST-project/scst/commit/1f40850809b5703371bff215b177fab6583f4928 Author: Gleb Chesnokov Date: 2025-03-25T16:53:57+03:00 Log Message: ----------- scst_lib: Port to Linux kernel v6.14 Support for the following block layer changes in the Linux kernel v6.14: - 6aeb4f836480 ("block: remove bio_add_pc_page") Modified Paths: -------------- scst/src/scst_lib.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) =================================================================== diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 6fc4649..75ead70 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -8554,16 +8554,20 @@ static struct request *__blk_map_kern_sg(struct request_queue *q, TRACE_DBG("len %zd, bytes %zd, offset %zd", len, bytes, offset); +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) rc = bio_add_pc_page(q, bio, page, bytes, offset); +#else + rc = bio_add_page(bio, page, bytes, offset); +#endif if (rc < bytes) { if (unlikely(need_new_bio || rc < 0)) { rq = ERR_PTR(rc < 0 ? rc : -EIO); goto out_free_bios; - } else { - need_new_bio = true; - len -= rc; - offset += rc; } + + need_new_bio = true; + offset += rc; + len -= rc; } else { need_new_bio = false; offset = 0; |
From: Gleb C. <lna...@ya...> - 2025-03-25 13:10:20
|
Commit: 191a74d GitHub URL: https://github.com/SCST-project/scst/commit/191a74d127d4e17e177d817ea055d9f2a8263c5a Author: Gleb Chesnokov Date: 2025-03-25T16:09:35+03:00 Log Message: ----------- scst: Fix recently introduced Coverity warnings Add error handling for recently introduced SHA256 and SHA3-256 APIs. Modified Paths: -------------- iscsi-scst/kernel/iscsi.c | 8 +- iscsi-scst/usr/af_alg.c | 27 ++- iscsi-scst/usr/af_alg.h | 2 +- iscsi-scst/usr/chap.c | 164 +++++++++------ qla2x00t/qla2x00-target/qla2x00t.c | 2 +- scst/include/scst_debug.h | 56 +++-- scst/src/dev_handlers/scst_user.c | 4 +- scst/src/dev_handlers/scst_vdisk.c | 2 +- scst/src/scst_event.c | 2 +- scst/src/scst_lib.c | 12 +- scst/src/scst_pres.c | 2 +- scst/src/scst_targ.c | 2 +- usr/include/debug.h | 43 ++-- usr/stpgd/stpgd_main.c | 84 ++++---- 14 files changed, 228 insertions(+), 182 deletions(-) =================================================================== diff --git a/iscsi-scst/kernel/iscsi.c b/iscsi-scst/kernel/iscsi.c index 7242da2..1e0d11f 100644 --- a/iscsi-scst/kernel/iscsi.c +++ b/iscsi-scst/kernel/iscsi.c @@ -245,7 +245,7 @@ static struct iscsi_cmnd *iscsi_create_tm_clone(struct iscsi_cmnd *cmnd) PRINT_ERROR("Failed to create TM clone for cmnd %p", cmnd); } - TRACE_EXIT_HRES((unsigned long)tm_clone); + TRACE_EXIT_HRES(tm_clone); return tm_clone; } @@ -744,7 +744,7 @@ static struct iscsi_cmnd *iscsi_alloc_rsp(struct iscsi_cmnd *parent) cmnd_get(parent); - TRACE_EXIT_HRES((unsigned long)rsp); + TRACE_EXIT_HRES(rsp); return rsp; } @@ -759,7 +759,7 @@ static inline struct iscsi_cmnd *iscsi_alloc_main_rsp(struct iscsi_cmnd *parent) rsp = iscsi_alloc_rsp(parent); parent->main_rsp = rsp; - TRACE_EXIT_HRES((unsigned long)rsp); + TRACE_EXIT_HRES(rsp); return rsp; } @@ -1047,7 +1047,7 @@ struct iscsi_cmnd *create_status_rsp(struct iscsi_cmnd *req, int status, const u iscsi_init_status_rsp(rsp, status, sense_buf, sense_len); iscsi_set_resid(rsp); - TRACE_EXIT_HRES((unsigned long)rsp); + TRACE_EXIT_HRES(rsp); return rsp; } EXPORT_SYMBOL(create_status_rsp); diff --git a/iscsi-scst/usr/af_alg.c b/iscsi-scst/usr/af_alg.c index eeb44fb..a9d1476 100644 --- a/iscsi-scst/usr/af_alg.c +++ b/iscsi-scst/usr/af_alg.c @@ -22,6 +22,7 @@ #include <string.h> #include <sys/param.h> #include <stdbool.h> +#include <errno.h> int af_alg_init(const char *algorithm) { @@ -56,21 +57,33 @@ int af_alg_init(const char *algorithm) return datafd; } -void af_alg_update(int datafd, const void *data_in, size_t len) +int af_alg_update(int datafd, const void *data_in, size_t len) { - send(datafd, data_in, len, MSG_MORE); + ssize_t res; + + res = send(datafd, data_in, len, MSG_MORE); + if (res == -1) + return -errno; + + return 0; } ssize_t af_alg_final(int datafd, void *out, size_t len) { char buffer[1024]; - ssize_t bytes; + ssize_t res; + + res = send(datafd, NULL, 0, 0); + if (res == -1) + return -errno; + + res = recv(datafd, buffer, sizeof(buffer), 0); + if (res == -1) + return -errno; - send(datafd, NULL, 0, 0); + memcpy(out, buffer, MIN(len, res)); - bytes = recv(datafd, buffer, sizeof(buffer), 0); - memcpy(out, buffer, MIN(len, bytes)); - return bytes; + return res; } bool af_alg_supported(char *alg) diff --git a/iscsi-scst/usr/af_alg.h b/iscsi-scst/usr/af_alg.h index 7be0e73..b565e8f 100644 --- a/iscsi-scst/usr/af_alg.h +++ b/iscsi-scst/usr/af_alg.h @@ -23,7 +23,7 @@ #define SCST_AF_ALG_SHA3_256_NAME "sha3-256" int af_alg_init(const char *algorithm); -void af_alg_update(int datafd, const void *data_in, size_t len); +int af_alg_update(int datafd, const void *data_in, size_t len); ssize_t af_alg_final(int datafd, void *out, size_t len); bool af_alg_supported(char *alg); diff --git a/iscsi-scst/usr/chap.c b/iscsi-scst/usr/chap.c index 3d4aec7..b5224ed 100644 --- a/iscsi-scst/usr/chap.c +++ b/iscsi-scst/usr/chap.c @@ -33,6 +33,7 @@ #include "md5.h" #include "af_alg.h" #include <sys/param.h> +#include <errno.h> #include "iscsid.h" @@ -344,47 +345,66 @@ static inline void chap_calc_digest_sha1(char chap_id, const char *secret, int s sha1_final(&ctx, digest); } -static inline void +static inline int chap_calc_digest_af_alg(char *alg, char chap_id, const char *secret, int secret_len, const u8 *challenge, int challenge_len, u8 *digest, int digest_len) { - int datafd = af_alg_init(alg); + int datafd; + ssize_t bytes; char buffer[1024]; - int bytes; + int res = 0; + datafd = af_alg_init(alg); if (datafd < 0) { log_error("CHAP unable to use %s algorithm", alg); - return; + return -EINVAL; } - af_alg_update(datafd, &chap_id, 1); - af_alg_update(datafd, secret, secret_len); - af_alg_update(datafd, challenge, challenge_len); + res = af_alg_update(datafd, &chap_id, 1); + if (res) + goto out; + + res = af_alg_update(datafd, secret, secret_len); + if (res) + goto out; + + res = af_alg_update(datafd, challenge, challenge_len); + if (res) + goto out; + bytes = af_alg_final(datafd, buffer, sizeof(buffer)); + if (bytes < 0) { + res = bytes; + goto out; + } + + memcpy(digest, buffer, MIN(res, digest_len)); + +out: close(datafd); - memcpy(digest, buffer, MIN(bytes, digest_len)); + return res; } -static inline void +static inline int chap_calc_digest_sha256(char chap_id, const char *secret, int secret_len, const u8 *challenge, int challenge_len, u8 *digest) { - chap_calc_digest_af_alg(SCST_AF_ALG_SHA256_NAME, - chap_id, secret, secret_len, - challenge, challenge_len, - digest, CHAP_SHA256_DIGEST_LEN); + return chap_calc_digest_af_alg(SCST_AF_ALG_SHA256_NAME, + chap_id, secret, secret_len, + challenge, challenge_len, + digest, CHAP_SHA256_DIGEST_LEN); } -static inline void +static inline int chap_calc_digest_sha3_256(char chap_id, const char *secret, int secret_len, const u8 *challenge, int challenge_len, u8 *digest) { - chap_calc_digest_af_alg(SCST_AF_ALG_SHA3_256_NAME, - chap_id, secret, secret_len, - challenge, challenge_len, - digest, CHAP_SHA3_256_DIGEST_LEN); + return chap_calc_digest_af_alg(SCST_AF_ALG_SHA3_256_NAME, + chap_id, secret, secret_len, + challenge, challenge_len, + digest, CHAP_SHA3_256_DIGEST_LEN); } /* @@ -470,12 +490,12 @@ static int chap_initiator_auth_check_response(struct connection *conn) { char *value; u8 *his_digest = NULL, *our_digest = NULL; - int digest_len = 0, retval = 0, encoding_format; char pass[ISCSI_NAME_LEN]; + int digest_len = 0, retval = 0, encoding_format; + int res; if (accounts_empty(conn->tid, ISCSI_USER_DIR_INCOMING)) { - log_warning("CHAP initiator auth.: " - "No CHAP credentials configured"); + log_warning("CHAP initiator auth.: No CHAP credentials configured"); retval = CHAP_TARGET_ERROR; goto out; } @@ -486,15 +506,13 @@ static int chap_initiator_auth_check_response(struct connection *conn) } conn->user = strdup(value); - if (conn->user == NULL) { + if (!conn->user) log_error("Unable to duplicate initiator's USER %s", value); - } memset(pass, 0, sizeof(pass)); if (config_account_query(conn->tid, ISCSI_USER_DIR_INCOMING, value, pass) < 0) { - log_warning("CHAP initiator auth.: " - "No valid user/pass combination for initiator %s " - "found", conn->initiator); + log_warning("CHAP initiator auth.: No valid user/pass combination for initiator %s found", + conn->initiator); retval = CHAP_AUTH_ERROR; goto out; } @@ -527,11 +545,14 @@ static int chap_initiator_auth_check_response(struct connection *conn) goto out; } - if (!(his_digest = malloc(digest_len))) { + his_digest = malloc(digest_len); + if (!his_digest) { retval = CHAP_TARGET_ERROR; goto out; } - if (!(our_digest = malloc(digest_len))) { + + our_digest = malloc(digest_len); + if (!our_digest) { retval = CHAP_TARGET_ERROR; goto out; } @@ -555,16 +576,24 @@ static int chap_initiator_auth_check_response(struct connection *conn) our_digest); break; case CHAP_DIGEST_ALG_SHA256: - chap_calc_digest_sha256(conn->auth.chap.id, pass, strlen(pass), - conn->auth.chap.challenge, - conn->auth.chap.challenge_size, - our_digest); + res = chap_calc_digest_sha256(conn->auth.chap.id, pass, strlen(pass), + conn->auth.chap.challenge, + conn->auth.chap.challenge_size, + our_digest); + if (res) { + retval = CHAP_TARGET_ERROR; + goto out; + } break; case CHAP_DIGEST_ALG_SHA3_256: - chap_calc_digest_sha3_256(conn->auth.chap.id, pass, strlen(pass), - conn->auth.chap.challenge, - conn->auth.chap.challenge_size, - our_digest); + res = chap_calc_digest_sha3_256(conn->auth.chap.id, pass, strlen(pass), + conn->auth.chap.challenge, + conn->auth.chap.challenge_size, + our_digest); + if (res) { + retval = CHAP_TARGET_ERROR; + goto out; + } break; default: retval = CHAP_TARGET_ERROR; @@ -572,8 +601,7 @@ static int chap_initiator_auth_check_response(struct connection *conn) } if (memcmp(our_digest, his_digest, digest_len)) { - log_warning("CHAP initiator auth.: " - "authentication of %s failed (wrong secret!?)", + log_warning("CHAP initiator auth.: authentication of %s failed (wrong secret!?)", conn->initiator); retval = CHAP_AUTH_ERROR; goto out; @@ -581,10 +609,8 @@ static int chap_initiator_auth_check_response(struct connection *conn) conn->state = CHAP_AUTH_STATE_RESPONSE; out: - if (his_digest) - free(his_digest); - if (our_digest) - free(our_digest); + free(his_digest); + free(our_digest); return retval; } @@ -593,8 +619,9 @@ static int chap_target_auth_create_response(struct connection *conn) char chap_id, *value, *response = NULL; u8 *challenge = NULL, *digest = NULL; int encoding_format, response_len; - int challenge_len = 0, digest_len = 0, retval = 0; struct iscsi_attr *user; + int challenge_len = 0, digest_len = 0, retval = 0; + int res; if (!(value = text_key_find(conn, "CHAP_I"))) { /* Initiator doesn't want target auth!? */ @@ -606,16 +633,14 @@ static int chap_target_auth_create_response(struct connection *conn) user = account_get_first(conn->tid, ISCSI_USER_DIR_OUTGOING); if (user == NULL) { - log_warning("CHAP target auth.: " - "no outgoing credentials configured%s", + log_warning("CHAP target auth.: no outgoing credentials configured%s", conn->tid ? "." : " for discovery."); retval = CHAP_AUTH_ERROR; goto out; } if (!(value = text_key_find(conn, "CHAP_C"))) { - log_warning("CHAP target auth.: " - "got no challenge from initiator %s", + log_warning("CHAP target auth.: got no challenge from initiator %s", conn->initiator); retval = CHAP_INITIATOR_ERROR; goto out; @@ -629,9 +654,9 @@ static int chap_target_auth_create_response(struct connection *conn) retval = chap_alloc_decode_buffer(value, &challenge, encoding_format); if (retval <= 0) goto out; - else if (retval > 1024) { - log_warning("CHAP target auth.: " - "initiator %s sent challenge of invalid length %d", + + if (retval > 1024) { + log_warning("CHAP target auth.: initiator %s sent challenge of invalid length %d", conn->initiator, challenge_len); retval = CHAP_INITIATOR_ERROR; goto out; @@ -665,11 +690,14 @@ static int chap_target_auth_create_response(struct connection *conn) /* "0x" / "0b" and "\0": */ response_len += 3; - if (!(digest = malloc(digest_len))) { + digest = malloc(digest_len); + if (!digest) { retval = CHAP_TARGET_ERROR; goto out; } - if (!(response = malloc(response_len))) { + + response = malloc(response_len); + if (!response) { retval = CHAP_TARGET_ERROR; goto out; } @@ -684,8 +712,7 @@ static int chap_target_auth_create_response(struct connection *conn) if (!memcmp(challenge, conn->auth.chap.challenge, challenge_len)) { /* ToDo: RFC 3720 demands to close TCP conn */ - log_warning("CHAP target auth.: " - "initiator %s reflected our challenge", + log_warning("CHAP target auth.: initiator %s reflected our challenge", conn->initiator); retval = CHAP_INITIATOR_ERROR; goto out; @@ -702,14 +729,22 @@ static int chap_target_auth_create_response(struct connection *conn) strlen(ISCSI_USER_PASS(user)), challenge, challenge_len, digest); break; case CHAP_DIGEST_ALG_SHA256: - chap_calc_digest_sha256(chap_id, ISCSI_USER_PASS(user), - strlen(ISCSI_USER_PASS(user)), - challenge, challenge_len, digest); + res = chap_calc_digest_sha256(chap_id, ISCSI_USER_PASS(user), + strlen(ISCSI_USER_PASS(user)), + challenge, challenge_len, digest); + if (res) { + retval = CHAP_TARGET_ERROR; + goto out; + } break; case CHAP_DIGEST_ALG_SHA3_256: - chap_calc_digest_sha3_256(chap_id, ISCSI_USER_PASS(user), - strlen(ISCSI_USER_PASS(user)), - challenge, challenge_len, digest); + res = chap_calc_digest_sha3_256(chap_id, ISCSI_USER_PASS(user), + strlen(ISCSI_USER_PASS(user)), + challenge, challenge_len, digest); + if (res) { + retval = CHAP_TARGET_ERROR; + goto out; + } break; default: retval = CHAP_TARGET_ERROR; @@ -723,12 +758,9 @@ static int chap_target_auth_create_response(struct connection *conn) conn->state = STATE_SECURITY_DONE; out: - if (challenge) - free(challenge); - if (digest) - free(digest); - if (response) - free(response); + free(challenge); + free(digest); + free(response); return retval; } diff --git a/qla2x00t/qla2x00-target/qla2x00t.c b/qla2x00t/qla2x00-target/qla2x00t.c index e6357b8..3cce893 100644 --- a/qla2x00t/qla2x00-target/qla2x00t.c +++ b/qla2x00t/qla2x00-target/qla2x00t.c @@ -5841,7 +5841,7 @@ out_free_fcport: kfree(fcport); out: - TRACE_EXIT_HRES((unsigned long)sess); + TRACE_EXIT_HRES(sess); return sess; } diff --git a/scst/include/scst_debug.h b/scst/include/scst_debug.h index 8f5f4ec..0b1f348 100644 --- a/scst/include/scst_debug.h +++ b/scst/include/scst_debug.h @@ -305,56 +305,52 @@ do { \ #define TRACE_ENTRY() \ do { \ if (trace_flag & TRACE_ENTRYEXIT) { \ - if (trace_flag & TRACE_PID) { \ - PRINT(KERN_INFO, "[%d]: ENTRY %s", current->pid, \ - __func__); \ - } \ - else { \ - PRINT(KERN_INFO, "ENTRY %s", __func__); \ - } \ + if (trace_flag & TRACE_PID) \ + PRINT(KERN_INFO, "[%d]: ENTRY %s", \ + current->pid, __func__); \ + else \ + PRINT(KERN_INFO, "ENTRY %s", \ + __func__); \ } \ } while (0) #define TRACE_EXIT() \ do { \ if (trace_flag & TRACE_ENTRYEXIT) { \ - if (trace_flag & TRACE_PID) { \ - PRINT(KERN_INFO, "[%d]: EXIT %s", current->pid, \ - __func__); \ - } \ - else { \ - PRINT(KERN_INFO, "EXIT %s", __func__); \ - } \ + if (trace_flag & TRACE_PID) \ + PRINT(KERN_INFO, "[%d]: EXIT %s", \ + current->pid, __func__); \ + else \ + PRINT(KERN_INFO, "EXIT %s", \ + __func__); \ } \ } while (0) #define TRACE_EXIT_RES(res) \ do { \ - unsigned long lres = res; \ - \ if (trace_flag & TRACE_ENTRYEXIT) { \ - if (trace_flag & TRACE_PID) { \ - PRINT(KERN_INFO, "[%d]: EXIT %s: %ld", current->pid, \ - __func__, lres); \ - } else { \ + long lres = res; \ + \ + if (trace_flag & TRACE_PID) \ + PRINT(KERN_INFO, "[%d]: EXIT %s: %ld", \ + current->pid, __func__, lres); \ + else \ PRINT(KERN_INFO, "EXIT %s: %ld", \ - __func__, lres); \ - } \ + __func__, lres); \ } \ } while (0) #define TRACE_EXIT_HRES(res) \ do { \ - unsigned long lres = (unsigned long)(res); \ - \ if (trace_flag & TRACE_ENTRYEXIT) { \ - if (trace_flag & TRACE_PID) { \ - PRINT(KERN_INFO, "[%d]: EXIT %s: 0x%lx", current->pid, \ - __func__, lres); \ - } else { \ + unsigned long lres = (unsigned long)(res); \ + \ + if (trace_flag & TRACE_PID) \ + PRINT(KERN_INFO, "[%d]: EXIT %s: 0x%lx", \ + current->pid, __func__, lres); \ + else \ PRINT(KERN_INFO, "EXIT %s: %lx", \ - __func__, lres); \ - } \ + __func__, lres); \ } \ } while (0) #endif diff --git a/scst/src/dev_handlers/scst_user.c b/scst/src/dev_handlers/scst_user.c index b0fbb8a..7d3de9c 100644 --- a/scst/src/dev_handlers/scst_user.c +++ b/scst/src/dev_handlers/scst_user.c @@ -695,7 +695,7 @@ static struct scst_user_cmd *dev_user_alloc_ucmd(struct scst_user_dev *dev, gfp_ TRACE_MEM("ucmd %p allocated", ucmd); out: - TRACE_EXIT_HRES((unsigned long)ucmd); + TRACE_EXIT_HRES(ucmd); return ucmd; } @@ -2544,7 +2544,7 @@ out_unlock: spin_unlock_irq(&dev->udev_cmd_threads.cmd_list_lock); out: - TRACE_EXIT_HRES((__force unsigned int)res); + TRACE_EXIT_HRES(res); return res; } diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 0ba5ea1..7b163c8 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -695,7 +695,7 @@ static struct scst_vdisk_dev *vdev_find(const char *name) } } - TRACE_EXIT_HRES((unsigned long)res); + TRACE_EXIT_HRES(res); return res; } diff --git a/scst/src/scst_event.c b/scst/src/scst_event.c index ba759c2..a36c667 100644 --- a/scst/src/scst_event.c +++ b/scst/src/scst_event.c @@ -1038,7 +1038,7 @@ static __poll_t scst_event_poll(struct file *file, poll_table *wait) out_unlock: mutex_unlock(&scst_event_mutex); - TRACE_EXIT_HRES((__force unsigned int)res); + TRACE_EXIT_HRES(res); return res; } diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 835c573..6fc4649 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -2609,7 +2609,7 @@ struct scst_aen *scst_alloc_aen(struct scst_session *sess, aen->lun = scst_pack_lun(unpacked_lun, sess->acg->addr_method); out: - TRACE_EXIT_HRES((unsigned long)aen); + TRACE_EXIT_HRES(aen); return aen; } @@ -5154,7 +5154,7 @@ static struct scst_tgt_dev *scst_find_shared_io_tgt_dev( } out: - TRACE_EXIT_HRES((unsigned long)res); + TRACE_EXIT_HRES(res); return res; found: @@ -5934,7 +5934,7 @@ struct scst_cmd *__scst_create_prepare_internal_cmd(const uint8_t *cdb, scst_set_cmd_state(res, SCST_CMD_STATE_PARSE); out: - TRACE_EXIT_HRES((unsigned long)res); + TRACE_EXIT_HRES(res); return res; } @@ -5955,7 +5955,7 @@ static struct scst_cmd *scst_create_prepare_internal_cmd( res->atomic = scst_cmd_atomic(orig_cmd); out: - TRACE_EXIT_HRES((unsigned long)res); + TRACE_EXIT_HRES(res); return res; } @@ -13616,7 +13616,7 @@ restart: } out: - TRACE_EXIT_HRES((unsigned long)res); + TRACE_EXIT_HRES(res); return res; } @@ -13632,7 +13632,7 @@ struct scst_cmd *__scst_check_deferred_commands( res = __scst_check_deferred_commands_locked(order_data, return_first); spin_unlock_irq(&order_data->sn_lock); - TRACE_EXIT_HRES((unsigned long)res); + TRACE_EXIT_HRES(res); return res; } diff --git a/scst/src/scst_pres.c b/scst/src/scst_pres.c index e2f5dc5..cfff018 100644 --- a/scst/src/scst_pres.c +++ b/scst/src/scst_pres.c @@ -491,7 +491,7 @@ struct scst_dev_registrant *scst_pr_add_registrant( dev->virt_name, reg->tgt_dev); out: - TRACE_EXIT_HRES((unsigned long)reg); + TRACE_EXIT_HRES(reg); return reg; out_free: diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index fab93cb..d2c50ab 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -7158,7 +7158,7 @@ static struct scst_acg *__scst_find_acg(struct scst_tgt *tgt, if (acg == NULL) acg = tgt->default_acg; - TRACE_EXIT_HRES((unsigned long)acg); + TRACE_EXIT_HRES(acg); return acg; } diff --git a/usr/include/debug.h b/usr/include/debug.h index 9fbf928..384a52d 100644 --- a/usr/include/debug.h +++ b/usr/include/debug.h @@ -202,53 +202,52 @@ do { \ #define TRACE_ENTRY() \ do { \ if (trace_flag & TRACE_ENTRYEXIT) { \ - if (trace_flag & TRACE_PID) { \ + if (trace_flag & TRACE_PID) \ PRINT(LOG_DEBUG, "[%d]: ENTRY %s", \ - gettid(), __func__); \ - } else { \ + gettid(), __func__); \ + else \ PRINT(LOG_DEBUG, "ENTRY %s", \ - __func__); \ - } \ + __func__); \ } \ } while (0) #define TRACE_EXIT() \ do { \ if (trace_flag & TRACE_ENTRYEXIT) { \ - if (trace_flag & TRACE_PID) { \ + if (trace_flag & TRACE_PID) \ PRINT(LOG_DEBUG, "[%d]: EXIT %s", \ - gettid(), __func__); \ - } else { \ - PRINT(LOG_DEBUG, "EXIT %s", __func__); \ - } \ + gettid(), __func__); \ + else \ + PRINT(LOG_DEBUG, "EXIT %s", \ + __func__); \ } \ } while (0) #define TRACE_EXIT_RES(res) \ do { \ if (trace_flag & TRACE_ENTRYEXIT) { \ - if (trace_flag & TRACE_PID) { \ + long lres = res; \ + \ + if (trace_flag & TRACE_PID) \ PRINT(LOG_DEBUG, "[%d]: EXIT %s: %ld", \ - gettid(), __func__, \ - (long)(res)); \ - } else { \ + gettid(), __func__, lres); \ + else \ PRINT(LOG_DEBUG, "EXIT %s: %ld", \ - __func__, (long)(res)); \ - } \ + __func__, lres); \ } \ } while (0) #define TRACE_EXIT_HRES(res) \ do { \ if (trace_flag & TRACE_ENTRYEXIT) { \ - if (trace_flag & TRACE_PID) { \ + unsigned long lres = (unsigned long)(res); \ + \ + if (trace_flag & TRACE_PID) \ PRINT(LOG_DEBUG, "[%d]: EXIT %s: 0x%lx",\ - gettid(), __func__, \ - (long)(res)); \ - } else { \ + gettid(), __func__, lres); \ + else \ PRINT(LOG_DEBUG, "EXIT %s: %lx", \ - __func__, (long)(res)); \ - } \ + __func__, lres); \ } \ } while (0) diff --git a/usr/stpgd/stpgd_main.c b/usr/stpgd/stpgd_main.c index 04027f0..21fe033 100644 --- a/usr/stpgd/stpgd_main.c +++ b/usr/stpgd/stpgd_main.c @@ -277,11 +277,10 @@ static int stpg_event_loop(void) { int res = 0, status; int event_fd; - uint8_t event_user_buf[1024*1024]; + uint8_t event_user_buf[1024 * 1024]; pid_t c_pid = 0; struct pollfd pl; - struct scst_event_user *event_user = - (struct scst_event_user *)event_user_buf; + struct scst_event_user *event_user = (struct scst_event_user *)event_user_buf; struct scst_event e1; bool first_error = true; @@ -289,8 +288,8 @@ static int stpg_event_loop(void) if (event_fd < 0) { res = -errno; PRINT_ERROR("Unable to open SCST event device %s (%s)", - SCST_EVENT_DEV, strerror(-res)); - goto out; + SCST_EVENT_DEV, strerror(-res)); + return res; } close(stpg_init_report_pipe[0]); @@ -305,10 +304,12 @@ static int stpg_event_loop(void) pl.events = POLLIN; memset(&e1, 0, sizeof(e1)); + e1.event_code = SCST_EVENT_STPG_USER_INVOKE; strncpy(e1.issuer_name, SCST_EVENT_SCST_CORE_ISSUER, sizeof(e1.issuer_name)); e1.issuer_name[sizeof(e1.issuer_name)-1] = '\0'; + PRINT_INFO("Setting allowed event code %d, issuer_name %s", e1.event_code, e1.issuer_name); @@ -323,9 +324,11 @@ static int stpg_event_loop(void) e1.event_code = SCST_EVENT_TM_FN_RECEIVED; strncpy(e1.issuer_name, SCST_EVENT_SCST_CORE_ISSUER, sizeof(e1.issuer_name)); - e1.issuer_name[sizeof(e1.issuer_name)-1] = '\0'; + e1.issuer_name[sizeof(e1.issuer_name) - 1] = '\0'; + PRINT_INFO("Setting allowed event code %d, issuer_name %s", e1.event_code, e1.issuer_name); + res = ioctl(event_fd, SCST_EVENT_ALLOW_EVENT, &e1); if (res != 0) { res = -errno; @@ -337,24 +340,25 @@ static int stpg_event_loop(void) while (1) { memset(event_user_buf, 0, sizeof(event_user_buf)); event_user->max_event_size = sizeof(event_user_buf); + res = ioctl(event_fd, SCST_EVENT_GET_NEXT_EVENT, event_user); if (res != 0) { res = -errno; switch (-res) { case ESRCH: case EBUSY: - TRACE_MGMT_DBG("SCST_EVENT_GET_NEXT_EVENT " - "returned %d (%s)", res, strerror(res)); + TRACE_MGMT_DBG("SCST_EVENT_GET_NEXT_EVENT returned %d (%s)", + res, strerror(res)); /* fall through */ case EINTR: continue; case EAGAIN: - TRACE_DBG("SCST_EVENT_GET_NEXT_EVENT, " - "returned EAGAIN (%d)", -res); + TRACE_DBG("SCST_EVENT_GET_NEXT_EVENT, returned EAGAIN (%d)", + -res); continue; default: - PRINT_ERROR("SCST_EVENT_GET_NEXT_EVENT " - "failed: %d (%s)", res, strerror(-res)); + PRINT_ERROR("SCST_EVENT_GET_NEXT_EVENT failed: %d (%s)", + res, strerror(-res)); if (!first_error) goto out; first_error = false; @@ -365,40 +369,40 @@ again_poll: res = poll(&pl, 1, c_pid > 0 ? 1 : 0); if (res > 0) continue; - else if (res == 0) + if (res == 0) + goto again_poll; + + res = -errno; + switch (res) { + case ESRCH: + case EBUSY: + case EAGAIN: + TRACE_MGMT_DBG("poll() returned %d (%s)", + res, strerror(-res)); + /* fall through */ + case EINTR: + goto again_poll; + default: + PRINT_ERROR("poll() failed: %d (%s)", + res, strerror(-res)); goto again_poll; - else { - res = -errno; - switch (res) { - case ESRCH: - case EBUSY: - case EAGAIN: - TRACE_MGMT_DBG("poll() returned %d " - "(%s)", res, strerror(-res)); - case EINTR: - goto again_poll; - default: - PRINT_ERROR("poll() failed: %d (%s)", - res, strerror(-res)); - goto again_poll; - } } } first_error = true; #ifdef DEBUG PRINT_INFO("event_code %d, issuer_name %s", - event_user->out_event.event_code, - event_user->out_event.issuer_name); + event_user->out_event.event_code, + event_user->out_event.issuer_name); #endif if (event_user->out_event.payload_len != 0) TRACE_BUFFER("payload", event_user->out_event.payload, - event_user->out_event.payload_len); + event_user->out_event.payload_len); if (event_user->out_event.event_code == SCST_EVENT_STPG_USER_INVOKE) { c_pid = fork(); - if (c_pid == -1) + if (c_pid == -1) { PRINT_ERROR("Failed to fork: %d", c_pid); - else if (c_pid == 0) { + } else if (c_pid == 0) { struct scst_event_notify_done d; signal(SIGCHLD, SIG_DFL); @@ -411,19 +415,21 @@ again_poll: res = ioctl(event_fd, SCST_EVENT_NOTIFY_DONE, &d); if (res != 0) { res = -errno; - PRINT_ERROR("SCST_EVENT_NOTIFY_DONE " - "failed: %s (res %d)", - strerror(-res), res); - } else + PRINT_ERROR("SCST_EVENT_NOTIFY_DONE failed: %s (res %d)", + strerror(-res), res); + } else { PRINT_INFO("STPG event completed with status %d", status); + } exit(res); } - } else if (event_user->out_event.event_code == SCST_EVENT_TM_FN_RECEIVED) + } else if (event_user->out_event.event_code == SCST_EVENT_TM_FN_RECEIVED) { stpg_handle_tm_received(event_user); - else + } else { PRINT_ERROR("Unknown event %d received", event_user->out_event.event_code); + } } out: + close(event_fd); return res; } |
From: Gleb C. <lna...@ya...> - 2025-02-03 08:16:54
|
Commit: 146d79e GitHub URL: https://github.com/SCST-project/scst/commit/146d79ec88da1a7d01725d3f8805000fb8751520 Author: Brian M Date: 2025-02-03T11:16:24+03:00 Log Message: ----------- iscsi-scst: Add SHA256 and SHA3-256 support to CHAP Use the kernel userspace AL_ALG API to access additional hash functions "sha256" and "sha3-256". If configured for CHAP, on iSCSI login the client will present an ordered list of desired algorithms. During this negotiation, if the client requests SHA256 or SHA3-256 we verify that the kernel supports the algorithm before agreeing to use it. Modified Paths: -------------- iscsi-scst/usr/Makefile | 2 +- iscsi-scst/usr/af_alg.c | 84 +++++++++++++ iscsi-scst/usr/af_alg.h | 30 +++++ iscsi-scst/usr/chap.c | 92 +++++++++++++++ 4 files changed, 207 insertions(+), 1 deletion(-) =================================================================== diff --git a/iscsi-scst/usr/Makefile b/iscsi-scst/usr/Makefile index e50aad6..a7084dd 100644 --- a/iscsi-scst/usr/Makefile +++ b/iscsi-scst/usr/Makefile @@ -23,7 +23,7 @@ cc-option = $(shell if $(CC) $(1) -Werror -S -o /dev/null -xc /dev/null \ SRCS_D = iscsid.c iscsi_scstd.c conn.c session.c target.c message.c ctldev.c \ log.c chap.c event.c param.c config.c isns.c md5.c sha1.c \ - misc.c + misc.c af_alg.c OBJS_D = $(SRCS_D:.c=.o) SRCS_ADM = iscsi_adm.c param.c diff --git a/iscsi-scst/usr/af_alg.c b/iscsi-scst/usr/af_alg.c new file mode 100644 index 0000000..eeb44fb --- /dev/null +++ b/iscsi-scst/usr/af_alg.c @@ -0,0 +1,84 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * af_alg - wrapper functions to call AF_ALG hash algorithms. + * + * Copyright (C) 2025 Brian Meagher <bri...@ix...> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, version 2 + * of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include "af_alg.h" + +#include <sys/socket.h> +#include <linux/if_alg.h> +#include <string.h> +#include <sys/param.h> +#include <stdbool.h> + +int af_alg_init(const char *algorithm) +{ + int sockfd, datafd, algo_len; + struct sockaddr_alg sa = { + .salg_family = AF_ALG, + .salg_type = "hash", + }; + + algo_len = strlen(algorithm); + if (algo_len >= sizeof(sa.salg_name)) + return -1; + + sockfd = socket(AF_ALG, SOCK_SEQPACKET, 0); + if (sockfd == -1) + return -1; + + /* +1 for null-terminator */ + memcpy(sa.salg_name, algorithm, algo_len + 1); + + if (bind(sockfd, (struct sockaddr *)&sa, sizeof(sa)) == -1) { + close(sockfd); + return -1; + } + + datafd = accept(sockfd, NULL, 0); + if (datafd < 0) { + close(sockfd); + return -1; + } + close(sockfd); + return datafd; +} + +void af_alg_update(int datafd, const void *data_in, size_t len) +{ + send(datafd, data_in, len, MSG_MORE); +} + +ssize_t af_alg_final(int datafd, void *out, size_t len) +{ + char buffer[1024]; + ssize_t bytes; + + send(datafd, NULL, 0, 0); + + bytes = recv(datafd, buffer, sizeof(buffer), 0); + memcpy(out, buffer, MIN(len, bytes)); + return bytes; +} + +bool af_alg_supported(char *alg) +{ + int sock = af_alg_init(alg); + + if (sock < 0) + return false; + close(sock); + return true; +} diff --git a/iscsi-scst/usr/af_alg.h b/iscsi-scst/usr/af_alg.h new file mode 100644 index 0000000..7be0e73 --- /dev/null +++ b/iscsi-scst/usr/af_alg.h @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (C) 2025 Brian Meagher <bri...@ix...> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, version 2 + * of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef SCST_AF_ALG_H +#define SCST_AF_ALG_H + +#include <unistd.h> +#include <stdbool.h> + +#define SCST_AF_ALG_SHA256_NAME "sha256" +#define SCST_AF_ALG_SHA3_256_NAME "sha3-256" + +int af_alg_init(const char *algorithm); +void af_alg_update(int datafd, const void *data_in, size_t len); +ssize_t af_alg_final(int datafd, void *out, size_t len); +bool af_alg_supported(char *alg); + +#endif diff --git a/iscsi-scst/usr/chap.c b/iscsi-scst/usr/chap.c index 2e61318..3d4aec7 100644 --- a/iscsi-scst/usr/chap.c +++ b/iscsi-scst/usr/chap.c @@ -31,6 +31,8 @@ #include <unistd.h> #include "sha1.h" #include "md5.h" +#include "af_alg.h" +#include <sys/param.h> #include "iscsid.h" @@ -39,9 +41,13 @@ #define CHAP_DIGEST_ALG_MD5 5 #define CHAP_DIGEST_ALG_SHA1 6 +#define CHAP_DIGEST_ALG_SHA256 7 +#define CHAP_DIGEST_ALG_SHA3_256 8 #define CHAP_MD5_DIGEST_LEN 16 #define CHAP_SHA1_DIGEST_LEN 20 +#define CHAP_SHA256_DIGEST_LEN 32 +#define CHAP_SHA3_256_DIGEST_LEN 32 #define CHAP_INITIATOR_ERROR -1 #define CHAP_AUTH_ERROR -2 @@ -338,6 +344,49 @@ static inline void chap_calc_digest_sha1(char chap_id, const char *secret, int s sha1_final(&ctx, digest); } +static inline void +chap_calc_digest_af_alg(char *alg, char chap_id, + const char *secret, int secret_len, + const u8 *challenge, int challenge_len, + u8 *digest, int digest_len) +{ + int datafd = af_alg_init(alg); + char buffer[1024]; + int bytes; + + if (datafd < 0) { + log_error("CHAP unable to use %s algorithm", alg); + return; + } + + af_alg_update(datafd, &chap_id, 1); + af_alg_update(datafd, secret, secret_len); + af_alg_update(datafd, challenge, challenge_len); + bytes = af_alg_final(datafd, buffer, sizeof(buffer)); + close(datafd); + memcpy(digest, buffer, MIN(bytes, digest_len)); +} + +static inline void +chap_calc_digest_sha256(char chap_id, const char *secret, int secret_len, + const u8 *challenge, int challenge_len, u8 *digest) +{ + chap_calc_digest_af_alg(SCST_AF_ALG_SHA256_NAME, + chap_id, secret, secret_len, + challenge, challenge_len, + digest, CHAP_SHA256_DIGEST_LEN); +} + +static inline void +chap_calc_digest_sha3_256(char chap_id, const char *secret, int secret_len, + const u8 *challenge, int challenge_len, u8 *digest) +{ + chap_calc_digest_af_alg(SCST_AF_ALG_SHA3_256_NAME, + chap_id, secret, secret_len, + challenge, challenge_len, + digest, CHAP_SHA3_256_DIGEST_LEN); +} + /* * To generate challenge for CHAP, use stronger random number generator as * opposed to simple rand(). @@ -374,7 +423,16 @@ static int chap_initiator_auth_create_challenge(struct connection *conn) conn->auth.chap.digest_alg = CHAP_DIGEST_ALG_SHA1; conn->auth_state = CHAP_AUTH_STATE_CHALLENGE; break; + } else if (!strcmp(p, "7") && af_alg_supported(SCST_AF_ALG_SHA256_NAME)) { + conn->auth.chap.digest_alg = CHAP_DIGEST_ALG_SHA256; + conn->auth_state = CHAP_AUTH_STATE_CHALLENGE; + break; + } else if (!strcmp(p, "8") && af_alg_supported(SCST_AF_ALG_SHA3_256_NAME)) { + conn->auth.chap.digest_alg = CHAP_DIGEST_ALG_SHA3_256; + conn->auth_state = CHAP_AUTH_STATE_CHALLENGE; + break; } + } if (!p) return CHAP_INITIATOR_ERROR; @@ -458,6 +516,12 @@ static int chap_initiator_auth_check_response(struct connection *conn) case CHAP_DIGEST_ALG_SHA1: digest_len = CHAP_SHA1_DIGEST_LEN; break; + case CHAP_DIGEST_ALG_SHA256: + digest_len = CHAP_SHA256_DIGEST_LEN; + break; + case CHAP_DIGEST_ALG_SHA3_256: + digest_len = CHAP_SHA3_256_DIGEST_LEN; + break; default: retval = CHAP_TARGET_ERROR; goto out; @@ -490,6 +554,18 @@ static int chap_initiator_auth_check_response(struct connection *conn) conn->auth.chap.challenge_size, our_digest); break; + case CHAP_DIGEST_ALG_SHA256: + chap_calc_digest_sha256(conn->auth.chap.id, pass, strlen(pass), + conn->auth.chap.challenge, + conn->auth.chap.challenge_size, + our_digest); + break; + case CHAP_DIGEST_ALG_SHA3_256: + chap_calc_digest_sha3_256(conn->auth.chap.id, pass, strlen(pass), + conn->auth.chap.challenge, + conn->auth.chap.challenge_size, + our_digest); + break; default: retval = CHAP_TARGET_ERROR; goto out; @@ -571,6 +647,12 @@ static int chap_target_auth_create_response(struct connection *conn) case CHAP_DIGEST_ALG_SHA1: digest_len = CHAP_SHA1_DIGEST_LEN; break; + case CHAP_DIGEST_ALG_SHA256: + digest_len = CHAP_SHA256_DIGEST_LEN; + break; + case CHAP_DIGEST_ALG_SHA3_256: + digest_len = CHAP_SHA3_256_DIGEST_LEN; + break; default: retval = CHAP_TARGET_ERROR; goto out; @@ -619,6 +701,16 @@ static int chap_target_auth_create_response(struct connection *conn) chap_calc_digest_sha1(chap_id, ISCSI_USER_PASS(user), strlen(ISCSI_USER_PASS(user)), challenge, challenge_len, digest); break; + case CHAP_DIGEST_ALG_SHA256: + chap_calc_digest_sha256(chap_id, ISCSI_USER_PASS(user), + strlen(ISCSI_USER_PASS(user)), + challenge, challenge_len, digest); + break; + case CHAP_DIGEST_ALG_SHA3_256: + chap_calc_digest_sha3_256(chap_id, ISCSI_USER_PASS(user), + strlen(ISCSI_USER_PASS(user)), + challenge, challenge_len, digest); + break; default: retval = CHAP_TARGET_ERROR; goto out; |
From: Gleb C. <lna...@ya...> - 2025-01-29 10:03:13
|
Commit: 6c5e8ad GitHub URL: https://github.com/SCST-project/scst/commit/6c5e8ad16ab8e2bfa5689a9691fc3fb30ee551ea Author: Brian M Date: 2025-01-29T13:00:08+03:00 Log Message: ----------- iscsi-scst: Add transport name to sys entry for connection This will make it possible to distinguish iSCSI-TCP connections from iSER connections. Modified Paths: -------------- iscsi-scst/kernel/conn.c | 26 +++++++++++++++ 1 file changed, 26 insertions(+) =================================================================== diff --git a/iscsi-scst/kernel/conn.c b/iscsi-scst/kernel/conn.c index 60398da..212e973 100644 --- a/iscsi-scst/kernel/conn.c +++ b/iscsi-scst/kernel/conn.c @@ -166,6 +166,25 @@ static ssize_t iscsi_conn_target_ip_show(struct kobject *kobj, struct kobj_attri static struct kobj_attribute iscsi_conn_target_ip_attr = __ATTR(target_ip, 0444, iscsi_conn_target_ip_show, NULL); +static ssize_t iscsi_conn_transport_show(struct kobject *kobj, struct kobj_attribute *attr, + char *buf) +{ + int pos; + struct iscsi_conn *conn; + + TRACE_ENTRY(); + + conn = container_of(kobj, struct iscsi_conn, conn_kobj); + + pos = snprintf(buf, SCST_SYSFS_BLOCK_SIZE, "%s\n", conn->transport->name); + + TRACE_EXIT_RES(pos); + return pos; +} + +static struct kobj_attribute iscsi_conn_transport_attr = + __ATTR(transport, 0444, iscsi_conn_transport_show, NULL); + static ssize_t iscsi_conn_cid_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { int pos; @@ -287,6 +306,13 @@ restart: goto out_err; } + res = sysfs_create_file(&conn->conn_kobj, &iscsi_conn_transport_attr.attr); + if (res != 0) { + PRINT_ERROR("Unable create sysfs attribute %s for conn %s", + iscsi_conn_transport_attr.attr.name, addr); + goto out_err; + } + out: TRACE_EXIT_RES(res); return res; |
From: Gleb C. <lna...@ya...> - 2025-01-20 16:01:06
|
Commit: 3e3c2e6 GitHub URL: https://github.com/SCST-project/scst/commit/3e3c2e6930f9db93fa148d2b3b7131d2dfd89572 Author: Gleb Chesnokov Date: 2025-01-20T18:54:10+03:00 Log Message: ----------- nightly build: Update kernel versions Another kernel versions update Modified Paths: -------------- .github/workflows/checkpatch_pull.yml | 1 - .github/workflows/checkpatch_push.yml | 1 - .github/workflows/mail_notification.yml | 1 - .github/workflows/run_regression_tests.yaml | 17 +++++++-------- nightly/conf/nightly.conf | 15 +++++++------ 5 files changed, 16 insertions(+), 19 deletions(-) =================================================================== diff --git a/.github/workflows/checkpatch_pull.yml b/.github/workflows/checkpatch_pull.yml index 647f75e..992238e 100644 --- a/.github/workflows/checkpatch_pull.yml +++ b/.github/workflows/checkpatch_pull.yml @@ -3,7 +3,6 @@ name: Checkpatch upon pull request on: pull_request: branches: - - 3.9.x - master jobs: diff --git a/.github/workflows/checkpatch_push.yml b/.github/workflows/checkpatch_push.yml index 464e804..a1ea507 100644 --- a/.github/workflows/checkpatch_push.yml +++ b/.github/workflows/checkpatch_push.yml @@ -3,7 +3,6 @@ name: Checkpatch upon push on: push: branches: - - 3.9.x - master jobs: diff --git a/.github/workflows/mail_notification.yml b/.github/workflows/mail_notification.yml index e796e2f..06b5fd0 100644 --- a/.github/workflows/mail_notification.yml +++ b/.github/workflows/mail_notification.yml @@ -4,7 +4,6 @@ name: Mailing list on: push: branches: - - 3.9.x - master jobs: diff --git a/.github/workflows/run_regression_tests.yaml b/.github/workflows/run_regression_tests.yaml index 6794cd5..e9767cb 100644 --- a/.github/workflows/run_regression_tests.yaml +++ b/.github/workflows/run_regression_tests.yaml @@ -3,11 +3,9 @@ name: Run regression tests on: push: branches: - - 3.9.x - master pull_request: branches: - - 3.9.x - master jobs: @@ -18,23 +16,24 @@ jobs: fail-fast: false matrix: version: [ - '6.12.7', + '6.13', + '6.12.10', '6.11.11', '6.10.14', '6.9.12', '6.8.12', '6.7.12', - '6.6.68', - '6.1.122', - '5.15.175', - '5.10.232', - '5.4.288', + '6.6.72', + '6.1.126', + '5.15.176', + '5.10.233', + '5.4.289', '4.19.325', '4.14.336', '4.9.337', '3.18.140', '3.10.108', - '5.14.0-503.16.1.el9_5^AlmaLinux^9.5', + '5.14.0-503.21.1.el9_5^AlmaLinux^9.5', '5.14.0-427.42.1.el9_4^AlmaLinux^9.4', '5.14.0-362.24.2.el9_3^AlmaLinux^9.3', '5.14.0-284.30.1.el9_2^AlmaLinux^9.2', diff --git a/nightly/conf/nightly.conf b/nightly/conf/nightly.conf index acceb08..a0cf754 100644 --- a/nightly/conf/nightly.conf +++ b/nightly/conf/nightly.conf @@ -3,35 +3,36 @@ ABT_DETAILS="x86_64" ABT_JOBS=5 ABT_KERNELS=" \ -6.12.7 \ +6.13 \ +6.12.10-nc \ 6.11.11-nc \ 6.10.14-nc \ 6.9.12-nc \ 6.8.12-nc \ 6.7.12-nc \ -6.6.68-nc \ +6.6.72-nc \ 6.5.13-nc \ 6.4.16-nc \ 6.3.13-nc \ 6.2.16-nc \ -6.1.122-nc \ +6.1.126-nc \ 6.0.19-nc \ 5.19.17-nc \ 5.18.19-nc \ 5.17.15-nc \ 5.16.20-nc \ -5.15.175-nc \ +5.15.176-nc \ 5.14.21-nc \ 5.13.19-nc \ 5.12.19-nc \ 5.11.22-nc \ -5.10.232-nc \ +5.10.233-nc \ 5.9.16-nc \ 5.8.18-nc \ 5.7.19-nc \ 5.6.19-nc \ 5.5.19-nc \ -5.4.288-nc \ +5.4.289-nc \ 5.3.18-nc \ 5.2.21-nc \ 5.1.21-nc \ @@ -67,7 +68,7 @@ ABT_KERNELS=" \ 3.12.74-nc \ 3.11.10-nc \ 3.10.108-nc \ -5.14.0-503.16.1.el9_5^AlmaLinux^9.5-nc \ +5.14.0-503.21.1.el9_5^AlmaLinux^9.5-nc \ 5.14.0-427.42.1.el9_4^AlmaLinux^9.4-nc \ 5.14.0-362.24.2.el9_3^AlmaLinux^9.3-nc \ 5.14.0-284.30.1.el9_2^AlmaLinux^9.2-nc \ |
From: Gleb C. <lna...@ya...> - 2025-01-20 15:57:10
|
Commit: 34d3a43 GitHub URL: https://github.com/SCST-project/scst/commit/34d3a43f2df8c4efd7027a89c9f375f086280102 Author: Gleb Chesnokov Date: 2025-01-20T18:55:51+03:00 Log Message: ----------- qla2x00t, qla2x00t-32gbit: Fix the RHEL 9.5 build Fixes: https://github.com/SCST-project/scst/issues/272 Modified Paths: -------------- qla2x00t-32gbit/qla_os.c | 12 +++++++++--- qla2x00t/qla_os.c | 8 ++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) =================================================================== diff --git a/qla2x00t-32gbit/qla_os.c b/qla2x00t-32gbit/qla_os.c index 0487449..f6d8a51 100644 --- a/qla2x00t-32gbit/qla_os.c +++ b/qla2x00t-32gbit/qla_os.c @@ -3020,7 +3020,9 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) ql2xallocfwdump = 0; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 5)) /* This may fail but that's ok */ pci_enable_pcie_error_reporting(pdev); #endif @@ -4047,7 +4049,9 @@ qla2x00_remove_one(struct pci_dev *pdev) pci_release_selected_regions(ha->pdev, ha->bars); kfree(ha); -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 5)) pci_disable_pcie_error_reporting(pdev); #endif @@ -6948,7 +6952,9 @@ qla2x00_disable_board_on_pci_error(struct work_struct *work) qla2x00_unmap_iobases(ha); pci_release_selected_regions(ha->pdev, ha->bars); -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 5)) pci_disable_pcie_error_reporting(pdev); #endif pci_disable_device(pdev); diff --git a/qla2x00t/qla_os.c b/qla2x00t/qla_os.c index f9c3ea8..c9cc17a 100644 --- a/qla2x00t/qla_os.c +++ b/qla2x00t/qla_os.c @@ -2367,7 +2367,9 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) goto probe_out; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 5)) /* This may fail but that's ok */ pci_enable_pcie_error_reporting(pdev); #endif @@ -3022,7 +3024,9 @@ qla2x00_remove_one(struct pci_dev *pdev) kfree(ha); ha = NULL; -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 5)) pci_disable_pcie_error_reporting(pdev); #endif pci_disable_device(pdev); |
From: Gleb C. <lna...@ya...> - 2025-01-20 15:57:01
|
Commit: f52ae11 GitHub URL: https://github.com/SCST-project/scst/commit/f52ae117b893523f1a72a95101366cc407065ca7 Author: Gleb Chesnokov Date: 2025-01-20T18:54:10+03:00 Log Message: ----------- scst: Port to Linux kernel v6.13 Support for the following changes in the Linux kernel v6.13: - cdd30ebb1b9f ("module: Convert symbol namespace to string literal") Fixes: https://github.com/SCST-project/scst/issues/273 Modified Paths: -------------- fcst/ft_scst.c | 2 +- iscsi-scst/kernel/conn.c | 3 +++ iscsi-scst/kernel/event.c | 3 +++ iscsi-scst/kernel/iscsi.c | 5 ++++- iscsi-scst/kernel/iscsit_transport.c | 5 +++-- iscsi-scst/kernel/isert-scst/isert.c | 2 +- iscsi-scst/kernel/nthread.c | 3 +++ iscsi-scst/kernel/target.c | 3 +++ qla2x00t-32gbit/Kbuild | 5 ++--- qla2x00t-32gbit/qla2x00-target/qla_tgt.c | 3 +++ qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.c | 5 ++--- qla2x00t-32gbit/qla_target.c | 3 +++ qla2x00t/Kbuild | 4 ++-- qla2x00t/qla2x00-target/qla2x00t.c | 4 ++-- qla2x00t/qla_init.c | 3 +++ qla2x00t/qla_iocb.c | 4 ++++ qla2x00t/qla_mbx.c | 3 ++- qla2x00t/qla_mid.c | 3 +++ qla2x00t/qla_os.c | 3 +++ scst/include/backport.h | 16 ++++++++++++++- scst/src/Kbuild | 10 ++++----- scst/src/dev_handlers/scst_cdrom.c | 2 +- scst/src/dev_handlers/scst_changer.c | 2 +- scst/src/dev_handlers/scst_disk.c | 2 +- scst/src/dev_handlers/scst_modisk.c | 2 +- scst/src/dev_handlers/scst_processor.c | 2 +- scst/src/dev_handlers/scst_raid.c | 2 +- scst/src/dev_handlers/scst_tape.c | 2 +- scst/src/dev_handlers/scst_user.c | 2 +- scst/src/dev_handlers/scst_vdisk.c | 2 +- scst/src/scst_copy_mgr.c | 2 ++ scst/src/scst_debug.c | 3 +++ scst/src/scst_event.c | 3 +++ scst/src/scst_lib.c | 3 +++ scst/src/scst_main.c | 3 +++ scst/src/scst_mem.c | 4 +++- scst/src/scst_pres.c | 3 +++ scst/src/scst_sysfs.c | 3 +++ scst/src/scst_targ.c | 3 +++ scst/src/scst_tg.c | 3 +++ scst_local/scst_local.c | 2 +- srpt/src/ib_srpt.c | 2 +- 42 files changed, 109 insertions(+), 35 deletions(-) =================================================================== diff --git a/fcst/ft_scst.c b/fcst/ft_scst.c index ff2fa39..447884a 100644 --- a/fcst/ft_scst.c +++ b/fcst/ft_scst.c @@ -85,7 +85,7 @@ static void __exit ft_module_exit(void) MODULE_AUTHOR("Joe Eykholt <jey...@ci...>"); MODULE_DESCRIPTION("SCST FCoE target driver v" FT_VERSION); MODULE_LICENSE("GPL v2"); -MODULE_IMPORT_NS(SCST); +MODULE_IMPORT_NS(SCST_NAMESPACE); module_init(ft_module_init); module_exit(ft_module_exit); diff --git a/iscsi-scst/kernel/conn.c b/iscsi-scst/kernel/conn.c index 57ac05c..60398da 100644 --- a/iscsi-scst/kernel/conn.c +++ b/iscsi-scst/kernel/conn.c @@ -26,6 +26,9 @@ #include "iscsi.h" #include "digest.h" +#undef DEFAULT_SYMBOL_NAMESPACE +#define DEFAULT_SYMBOL_NAMESPACE SCST_NAMESPACE + #if defined(CONFIG_LOCKDEP) && !defined(CONFIG_SCST_PROC) static struct lock_class_key scst_conn_key; static struct lockdep_map scst_conn_dep_map = diff --git a/iscsi-scst/kernel/event.c b/iscsi-scst/kernel/event.c index 235acb3..58e0581 100644 --- a/iscsi-scst/kernel/event.c +++ b/iscsi-scst/kernel/event.c @@ -25,6 +25,9 @@ #include "iscsi_trace_flag.h" #include "iscsi.h" +#undef DEFAULT_SYMBOL_NAMESPACE +#define DEFAULT_SYMBOL_NAMESPACE SCST_NAMESPACE + struct net *iscsi_net_ns; EXPORT_SYMBOL(iscsi_net_ns); diff --git a/iscsi-scst/kernel/iscsi.c b/iscsi-scst/kernel/iscsi.c index e858747..7242da2 100644 --- a/iscsi-scst/kernel/iscsi.c +++ b/iscsi-scst/kernel/iscsi.c @@ -31,6 +31,9 @@ #include "iscsi.h" #include "digest.h" +#undef DEFAULT_SYMBOL_NAMESPACE +#define DEFAULT_SYMBOL_NAMESPACE SCST_NAMESPACE + #define ISCSI_INIT_WRITE_WAKE 0x1 static int ctr_major; @@ -4296,5 +4299,5 @@ module_exit(iscsi_exit); MODULE_VERSION(ISCSI_VERSION_STRING); MODULE_LICENSE("GPL"); -MODULE_IMPORT_NS(SCST); +MODULE_IMPORT_NS(SCST_NAMESPACE); MODULE_DESCRIPTION("SCST iSCSI Target"); diff --git a/iscsi-scst/kernel/iscsit_transport.c b/iscsi-scst/kernel/iscsit_transport.c index 40fd287..3f4a51b 100644 --- a/iscsi-scst/kernel/iscsit_transport.c +++ b/iscsi-scst/kernel/iscsit_transport.c @@ -1,4 +1,3 @@ - #include <linux/spinlock.h> #include "iscsi_trace_flag.h" #ifdef INSIDE_KERNEL_TREE @@ -8,6 +7,9 @@ #endif #include "iscsi.h" +#undef DEFAULT_SYMBOL_NAMESPACE +#define DEFAULT_SYMBOL_NAMESPACE SCST_NAMESPACE + static LIST_HEAD(transport_list); static DEFINE_MUTEX(transport_mutex); @@ -66,4 +68,3 @@ void iscsit_unreg_transport(struct iscsit_transport *t) PRINT_INFO("Unregistered iSCSI transport: %s", t->name); } EXPORT_SYMBOL(iscsit_unreg_transport); - diff --git a/iscsi-scst/kernel/isert-scst/isert.c b/iscsi-scst/kernel/isert-scst/isert.c index 7979f1e..19b870b 100644 --- a/iscsi-scst/kernel/isert-scst/isert.c +++ b/iscsi-scst/kernel/isert-scst/isert.c @@ -498,7 +498,7 @@ out: MODULE_AUTHOR("Yan Burman"); MODULE_LICENSE("Dual BSD/GPL"); -MODULE_IMPORT_NS(SCST); +MODULE_IMPORT_NS(SCST_NAMESPACE); #define DRV_VERSION "3.10.0-pre" "#" __stringify(OFED_FLAVOR) #define DRV_RELDATE "28 December 2024" MODULE_DESCRIPTION("iSER target transport driver v" DRV_VERSION " (" DRV_RELDATE ")"); diff --git a/iscsi-scst/kernel/nthread.c b/iscsi-scst/kernel/nthread.c index 6212444..e4e7419 100644 --- a/iscsi-scst/kernel/nthread.c +++ b/iscsi-scst/kernel/nthread.c @@ -29,6 +29,9 @@ #include "iscsi.h" #include "digest.h" +#undef DEFAULT_SYMBOL_NAMESPACE +#define DEFAULT_SYMBOL_NAMESPACE SCST_NAMESPACE + /* Read data states */ enum rx_state { RX_INIT_BHS, /* Must be zero for better "switch" optimization. */ diff --git a/iscsi-scst/kernel/target.c b/iscsi-scst/kernel/target.c index bb9ec0b..50f1f2e 100644 --- a/iscsi-scst/kernel/target.c +++ b/iscsi-scst/kernel/target.c @@ -21,6 +21,9 @@ #include "iscsi.h" #include "digest.h" +#undef DEFAULT_SYMBOL_NAMESPACE +#define DEFAULT_SYMBOL_NAMESPACE SCST_NAMESPACE + #define MAX_NR_TARGETS (1UL << 30) DEFINE_MUTEX(target_mgmt_mutex); diff --git a/qla2x00t-32gbit/Kbuild b/qla2x00t-32gbit/Kbuild index 053a4d9..a975475 100644 --- a/qla2x00t-32gbit/Kbuild +++ b/qla2x00t-32gbit/Kbuild @@ -1,8 +1,7 @@ -ccflags-y += -I$(src)/../scst/include -I$(src)/include \ - -DDEFAULT_SYMBOL_NAMESPACE=QLA32GB +ccflags-y := -I$(src)/../scst/include -I$(src)/include ifneq ($(CONFIG_SCSI_QLA2XXX_TARGET),) -ccflags-y += -DCONFIG_SCSI_QLA2XXX_TARGET=$(CONFIG_SCSI_QLA2XXX_TARGET) +ccflags-y += -DCONFIG_SCSI_QLA2XXX_TARGET=$(CONFIG_SCSI_QLA2XXX_TARGET) endif obj-m := qla2xxx_scst.o diff --git a/qla2x00t-32gbit/qla2x00-target/qla_tgt.c b/qla2x00t-32gbit/qla2x00-target/qla_tgt.c index b1bd5d8..4ccafcc 100644 --- a/qla2x00t-32gbit/qla2x00-target/qla_tgt.c +++ b/qla2x00t-32gbit/qla2x00-target/qla_tgt.c @@ -44,6 +44,9 @@ #include "qla_def.h" #include "scst_qla2xxx.h" +#undef DEFAULT_SYMBOL_NAMESPACE +#define DEFAULT_SYMBOL_NAMESPACE SCST_QLA32_NAMESPACE + size_t qlt_add_vtarget(u64 port_name, u64 node_name, u64 parent_host) { struct fc_vport *vport; diff --git a/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.c b/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.c index b7ccd97..6f9075a 100644 --- a/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.c +++ b/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.c @@ -2199,9 +2199,8 @@ module_exit(sqa_exit); late_initcall(sqa_init); #endif - MODULE_DESCRIPTION("SCST Cavium adapter target interface driver."); MODULE_LICENSE("GPL"); -MODULE_IMPORT_NS(SCST); -MODULE_IMPORT_NS(QLA32GB); +MODULE_IMPORT_NS(SCST_NAMESPACE); +MODULE_IMPORT_NS(SCST_QLA32_NAMESPACE); MODULE_VERSION(SQA_VERSION); diff --git a/qla2x00t-32gbit/qla_target.c b/qla2x00t-32gbit/qla_target.c index 8964148..0b938a8 100644 --- a/qla2x00t-32gbit/qla_target.c +++ b/qla2x00t-32gbit/qla_target.c @@ -30,6 +30,9 @@ #include "qla_def.h" #include "qla_target.h" +#undef DEFAULT_SYMBOL_NAMESPACE +#define DEFAULT_SYMBOL_NAMESPACE SCST_QLA32_NAMESPACE + /* * See also commit fb3269baf4ec ("qla2xxx: Add selective command queuing") * # v4.5. diff --git a/qla2x00t/Kbuild b/qla2x00t/Kbuild index 7b182d9..f0eab43 100644 --- a/qla2x00t/Kbuild +++ b/qla2x00t/Kbuild @@ -1,7 +1,7 @@ -ccflags-y += -I$(src)/../scst/include -DDEFAULT_SYMBOL_NAMESPACE=QLA16GB +ccflags-y := -I$(src)/../scst/include ifneq ($(CONFIG_SCSI_QLA2XXX_TARGET),) -ccflags-y += -DCONFIG_SCSI_QLA2XXX_TARGET=$(CONFIG_SCSI_QLA2XXX_TARGET) +ccflags-y += -DCONFIG_SCSI_QLA2XXX_TARGET=$(CONFIG_SCSI_QLA2XXX_TARGET) endif obj-m := qla2xxx_scst.o diff --git a/qla2x00t/qla2x00-target/qla2x00t.c b/qla2x00t/qla2x00-target/qla2x00t.c index 93d4987..e6357b8 100644 --- a/qla2x00t/qla2x00-target/qla2x00t.c +++ b/qla2x00t/qla2x00-target/qla2x00t.c @@ -7092,6 +7092,6 @@ module_exit(q2t_exit); MODULE_AUTHOR("Vladislav Bolkhovitin and others"); MODULE_DESCRIPTION("Target mode addon for qla2[2,3,4,5+]xx"); MODULE_LICENSE("GPL"); -MODULE_IMPORT_NS(SCST); -MODULE_IMPORT_NS(QLA16GB); +MODULE_IMPORT_NS(SCST_NAMESPACE); +MODULE_IMPORT_NS(SCST_QLA16_NAMESPACE); MODULE_VERSION(Q2T_VERSION_STRING); diff --git a/qla2x00t/qla_init.c b/qla2x00t/qla_init.c index bf91a31..d4fbecc 100644 --- a/qla2x00t/qla_init.c +++ b/qla2x00t/qla_init.c @@ -22,6 +22,9 @@ #include "qla2x_tgt.h" #endif +#undef DEFAULT_SYMBOL_NAMESPACE +#define DEFAULT_SYMBOL_NAMESPACE SCST_QLA16_NAMESPACE + /* * QLogic ISP2x00 Hardware Support Function Prototypes. */ diff --git a/qla2x00t/qla_iocb.c b/qla2x00t/qla_iocb.c index 7584de9..2d9c2dd 100644 --- a/qla2x00t/qla_iocb.c +++ b/qla2x00t/qla_iocb.c @@ -12,6 +12,10 @@ #include <scsi/scsi_tcq.h> #include "qla2x_tgt.h" + +#undef DEFAULT_SYMBOL_NAMESPACE +#define DEFAULT_SYMBOL_NAMESPACE SCST_QLA16_NAMESPACE + static void qla25xx_set_que(srb_t *, struct rsp_que **); /* diff --git a/qla2x00t/qla_mbx.c b/qla2x00t/qla_mbx.c index 86133c9..b8cd8cf 100644 --- a/qla2x00t/qla_mbx.c +++ b/qla2x00t/qla_mbx.c @@ -11,6 +11,8 @@ #include <linux/delay.h> #include <linux/vmalloc.h> +#undef DEFAULT_SYMBOL_NAMESPACE +#define DEFAULT_SYMBOL_NAMESPACE SCST_QLA16_NAMESPACE /* * qla2x00_mailbox_command @@ -5021,4 +5023,3 @@ qla2x00_port_logout(scsi_qla_host_t *vha, struct fc_port *fcport) return rval; } - diff --git a/qla2x00t/qla_mid.c b/qla2x00t/qla_mid.c index b591d7e..24e3d3f 100644 --- a/qla2x00t/qla_mid.c +++ b/qla2x00t/qla_mid.c @@ -19,6 +19,9 @@ #include "qla2x_tgt.h" #endif +#undef DEFAULT_SYMBOL_NAMESPACE +#define DEFAULT_SYMBOL_NAMESPACE SCST_QLA16_NAMESPACE + void qla2x00_vp_stop_timer(scsi_qla_host_t *vha) { diff --git a/qla2x00t/qla_os.c b/qla2x00t/qla_os.c index c9cc17a..9bc1de5 100644 --- a/qla2x00t/qla_os.c +++ b/qla2x00t/qla_os.c @@ -18,6 +18,9 @@ #include <scsi/scsi_transport.h> #include <scsi/scsi_transport_fc.h> +#undef DEFAULT_SYMBOL_NAMESPACE +#define DEFAULT_SYMBOL_NAMESPACE SCST_QLA16_NAMESPACE + /* * Driver version */ diff --git a/scst/include/backport.h b/scst/include/backport.h index 803fcf6..79c6870 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -1003,7 +1003,21 @@ register_shrinker_backport(struct shrinker *shrinker, const char *fmt, ...) #endif /* <linux/module.h> */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) + +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 13, 0) +#define SCST_NAMESPACE SCST +#define SCST_QLA16_NAMESPACE QLA16GB +#define SCST_QLA32_NAMESPACE QLA32GB +#else +#define SCST_NAMESPACE "SCST" +#define SCST_QLA16_NAMESPACE "QLA16GB" +#define SCST_QLA32_NAMESPACE "QLA32GB" +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0) +#undef MODULE_IMPORT_NS +#define MODULE_IMPORT_NS(ns) MODULE_INFO(import_ns, __stringify(ns)) +#elif LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) #define MODULE_IMPORT_NS(ns) #endif diff --git a/scst/src/Kbuild b/scst/src/Kbuild index 6133bfe..425e128 100644 --- a/scst/src/Kbuild +++ b/scst/src/Kbuild @@ -1,9 +1,7 @@ -# See also Documentation/core-api/symbol-namespaces.rst for more information -# about DEFAULT_SYMBOL_NAMESPACE. -ccflags-y += -I$(src)/../include \ - -DDEFAULT_SYMBOL_NAMESPACE=SCST \ - $(shell [ -n "${CONFIG_SCST_NO_DLM}" ] && echo -DCONFIG_SCST_NO_DLM) \ - $(shell [ -n "${REVISION}" ] && echo -DSCST_REVISION=${REVISION}) +ccflags-y := -I$(src)/../include + +ccflags-y += $(shell [ -n "${CONFIG_SCST_NO_DLM}" ] && echo -DCONFIG_SCST_NO_DLM) \ + $(shell [ -n "${REVISION}" ] && echo -DSCST_REVISION=${REVISION}) #ccflags-y += -DCONFIG_SCST_STRICT_SERIALIZING #ccflags-y += -DCONFIG_SCST_USE_EXPECTED_VALUES diff --git a/scst/src/dev_handlers/scst_cdrom.c b/scst/src/dev_handlers/scst_cdrom.c index 03ea18f..f2e86b2 100644 --- a/scst/src/dev_handlers/scst_cdrom.c +++ b/scst/src/dev_handlers/scst_cdrom.c @@ -232,4 +232,4 @@ MODULE_LICENSE("GPL"); MODULE_AUTHOR("Vladislav Bolkhovitin & Leonid Stoljar"); MODULE_DESCRIPTION("SCSI CDROM (type 5) dev handler for SCST"); MODULE_VERSION(SCST_VERSION_STRING); -MODULE_IMPORT_NS(SCST); +MODULE_IMPORT_NS(SCST_NAMESPACE); diff --git a/scst/src/dev_handlers/scst_changer.c b/scst/src/dev_handlers/scst_changer.c index 0d6e927..c7e8225 100644 --- a/scst/src/dev_handlers/scst_changer.c +++ b/scst/src/dev_handlers/scst_changer.c @@ -184,4 +184,4 @@ MODULE_AUTHOR("Vladislav Bolkhovitin & Leonid Stoljar"); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SCSI medium changer (type 8) dev handler for SCST"); MODULE_VERSION(SCST_VERSION_STRING); -MODULE_IMPORT_NS(SCST); +MODULE_IMPORT_NS(SCST_NAMESPACE); diff --git a/scst/src/dev_handlers/scst_disk.c b/scst/src/dev_handlers/scst_disk.c index 52720f2..c9d5cda 100644 --- a/scst/src/dev_handlers/scst_disk.c +++ b/scst/src/dev_handlers/scst_disk.c @@ -750,4 +750,4 @@ MODULE_AUTHOR("Vladislav Bolkhovitin & Leonid Stoljar"); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SCSI disk (type 0) dev handler for SCST"); MODULE_VERSION(SCST_VERSION_STRING); -MODULE_IMPORT_NS(SCST); +MODULE_IMPORT_NS(SCST_NAMESPACE); diff --git a/scst/src/dev_handlers/scst_modisk.c b/scst/src/dev_handlers/scst_modisk.c index 4c51966..8841d4e 100644 --- a/scst/src/dev_handlers/scst_modisk.c +++ b/scst/src/dev_handlers/scst_modisk.c @@ -317,4 +317,4 @@ MODULE_AUTHOR("Vladislav Bolkhovitin & Leonid Stoljar"); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SCSI MO disk (type 7) dev handler for SCST"); MODULE_VERSION(SCST_VERSION_STRING); -MODULE_IMPORT_NS(SCST); +MODULE_IMPORT_NS(SCST_NAMESPACE); diff --git a/scst/src/dev_handlers/scst_processor.c b/scst/src/dev_handlers/scst_processor.c index e29d2cb..68d92cb 100644 --- a/scst/src/dev_handlers/scst_processor.c +++ b/scst/src/dev_handlers/scst_processor.c @@ -184,4 +184,4 @@ MODULE_AUTHOR("Vladislav Bolkhovitin & Leonid Stoljar"); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SCSI medium processor (type 3) dev handler for SCST"); MODULE_VERSION(SCST_VERSION_STRING); -MODULE_IMPORT_NS(SCST); +MODULE_IMPORT_NS(SCST_NAMESPACE); diff --git a/scst/src/dev_handlers/scst_raid.c b/scst/src/dev_handlers/scst_raid.c index 1d9738d..c1462e3 100644 --- a/scst/src/dev_handlers/scst_raid.c +++ b/scst/src/dev_handlers/scst_raid.c @@ -184,4 +184,4 @@ MODULE_AUTHOR("Vladislav Bolkhovitin & Leonid Stoljar"); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SCSI raid(controller) (type 0xC) dev handler for SCST"); MODULE_VERSION(SCST_VERSION_STRING); -MODULE_IMPORT_NS(SCST); +MODULE_IMPORT_NS(SCST_NAMESPACE); diff --git a/scst/src/dev_handlers/scst_tape.c b/scst/src/dev_handlers/scst_tape.c index 250e502..24be235 100644 --- a/scst/src/dev_handlers/scst_tape.c +++ b/scst/src/dev_handlers/scst_tape.c @@ -338,4 +338,4 @@ MODULE_AUTHOR("Vladislav Bolkhovitin & Leonid Stoljar"); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SCSI tape (type 1) dev handler for SCST"); MODULE_VERSION(SCST_VERSION_STRING); -MODULE_IMPORT_NS(SCST); +MODULE_IMPORT_NS(SCST_NAMESPACE); diff --git a/scst/src/dev_handlers/scst_user.c b/scst/src/dev_handlers/scst_user.c index bf0bfd4..b0fbb8a 100644 --- a/scst/src/dev_handlers/scst_user.c +++ b/scst/src/dev_handlers/scst_user.c @@ -4133,4 +4133,4 @@ MODULE_AUTHOR("Vladislav Bolkhovitin"); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("User space device handler for SCST"); MODULE_VERSION(SCST_VERSION_STRING); -MODULE_IMPORT_NS(SCST); +MODULE_IMPORT_NS(SCST_NAMESPACE); diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 730f8e3..0ba5ea1 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -9971,4 +9971,4 @@ MODULE_AUTHOR("Vladislav Bolkhovitin & Leonid Stoljar"); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SCSI disk (type 0) and CDROM (type 5) dev handler for SCST using files on file systems or block devices"); MODULE_VERSION(SCST_VERSION_STRING); -MODULE_IMPORT_NS(SCST); +MODULE_IMPORT_NS(SCST_NAMESPACE); diff --git a/scst/src/scst_copy_mgr.c b/scst/src/scst_copy_mgr.c index c6539b4..daca34f 100644 --- a/scst/src/scst_copy_mgr.c +++ b/scst/src/scst_copy_mgr.c @@ -18,6 +18,8 @@ #include "scst_priv.h" #include "scst_pres.h" +#undef DEFAULT_SYMBOL_NAMESPACE +#define DEFAULT_SYMBOL_NAMESPACE SCST_NAMESPACE #define SCST_CM_NAME "copy_manager" #define SCST_CM_TGT_NAME (SCST_CM_NAME "_tgt") diff --git a/scst/src/scst_debug.c b/scst/src/scst_debug.c index a76a1bb..5e67618 100644 --- a/scst/src/scst_debug.c +++ b/scst/src/scst_debug.c @@ -32,6 +32,9 @@ #include "scst_debug.h" #endif +#undef DEFAULT_SYMBOL_NAMESPACE +#define DEFAULT_SYMBOL_NAMESPACE SCST_NAMESPACE + #if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING) #define TRACE_BUF_SIZE 512 diff --git a/scst/src/scst_event.c b/scst/src/scst_event.c index 71647bd..ba759c2 100644 --- a/scst/src/scst_event.c +++ b/scst/src/scst_event.c @@ -29,6 +29,9 @@ #include "scst_priv.h" +#undef DEFAULT_SYMBOL_NAMESPACE +#define DEFAULT_SYMBOL_NAMESPACE SCST_NAMESPACE + static struct workqueue_struct *scst_event_wq; static struct class *scst_event_sysfs_class; diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 50d60e3..835c573 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -56,6 +56,9 @@ #include "scst_mem.h" #include "scst_pres.h" +#undef DEFAULT_SYMBOL_NAMESPACE +#define DEFAULT_SYMBOL_NAMESPACE SCST_NAMESPACE + /* 8 byte ASCII Vendor */ #define SCST_NOLUN_VENDOR "SCST " diff --git a/scst/src/scst_main.c b/scst/src/scst_main.c index 3dd3396..3ebf2d6 100644 --- a/scst/src/scst_main.c +++ b/scst/src/scst_main.c @@ -40,6 +40,9 @@ #include "scst_mem.h" #include "scst_pres.h" +#undef DEFAULT_SYMBOL_NAMESPACE +#define DEFAULT_SYMBOL_NAMESPACE SCST_NAMESPACE + #if defined(CONFIG_HIGHMEM4G) || defined(CONFIG_HIGHMEM64G) #warning HIGHMEM kernel configurations are fully supported, but not \ recommended for performance reasons. Consider changing VMSPLIT \ diff --git a/scst/src/scst_mem.c b/scst/src/scst_mem.c index 9814fa7..821d6b3 100644 --- a/scst/src/scst_mem.c +++ b/scst/src/scst_mem.c @@ -34,6 +34,9 @@ #include "scst_priv.h" #include "scst_mem.h" +#undef DEFAULT_SYMBOL_NAMESPACE +#define DEFAULT_SYMBOL_NAMESPACE SCST_NAMESPACE + #define SGV_DEFAULT_PURGE_INTERVAL (60 * HZ) #define SGV_MIN_SHRINK_INTERVAL (1 * HZ) @@ -2165,4 +2168,3 @@ void scst_del_put_sgv_kobj(void) kobject_put(scst_sgv_kobj); scst_sgv_kobj = NULL; } - diff --git a/scst/src/scst_pres.c b/scst/src/scst_pres.c index aaf1092..e2f5dc5 100644 --- a/scst/src/scst_pres.c +++ b/scst/src/scst_pres.c @@ -59,6 +59,9 @@ #include <linux/stdarg.h> #endif +#undef DEFAULT_SYMBOL_NAMESPACE +#define DEFAULT_SYMBOL_NAMESPACE SCST_NAMESPACE + #define SCST_PR_ROOT_ENTRY "pr" #define SCST_PR_FILE_SIGN 0xBBEEEEAAEEBBDD77LLU #define SCST_PR_FILE_VERSION 1LLU diff --git a/scst/src/scst_sysfs.c b/scst/src/scst_sysfs.c index f21362d..a336558 100644 --- a/scst/src/scst_sysfs.c +++ b/scst/src/scst_sysfs.c @@ -34,6 +34,9 @@ #include "scst_pres.h" #include "scst_mem.h" +#undef DEFAULT_SYMBOL_NAMESPACE +#define DEFAULT_SYMBOL_NAMESPACE SCST_NAMESPACE + #ifdef CONFIG_LOCKDEP static struct lock_class_key scst_tgtt_key; static struct lockdep_map scst_tgtt_dep_map = diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index fa4afb2..fab93cb 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -43,6 +43,9 @@ #include "scst_priv.h" #include "scst_pres.h" +#undef DEFAULT_SYMBOL_NAMESPACE +#define DEFAULT_SYMBOL_NAMESPACE SCST_NAMESPACE + static void scst_cmd_set_sn(struct scst_cmd *cmd); static int __scst_init_cmd(struct scst_cmd *cmd); static struct scst_cmd *__scst_find_cmd_by_tag(struct scst_session *sess, diff --git a/scst/src/scst_tg.c b/scst/src/scst_tg.c index de5590a..348aefe 100644 --- a/scst/src/scst_tg.c +++ b/scst/src/scst_tg.c @@ -28,6 +28,9 @@ #include "scst_priv.h" #include "scst_pres.h" +#undef DEFAULT_SYMBOL_NAMESPACE +#define DEFAULT_SYMBOL_NAMESPACE SCST_NAMESPACE + struct alua_state_and_name { enum scst_tg_state s; char *n; diff --git a/scst_local/scst_local.c b/scst_local/scst_local.c index 963bcce..e0c6f28 100644 --- a/scst_local/scst_local.c +++ b/scst_local/scst_local.c @@ -149,7 +149,7 @@ MODULE_AUTHOR("Richard Sharpe, Vladislav Bolkhovitin + ideas from SCSI_DEBUG"); MODULE_DESCRIPTION("SCSI+SCST local adapter driver"); MODULE_LICENSE("GPL"); MODULE_VERSION(SCST_LOCAL_VERSION); -MODULE_IMPORT_NS(SCST); +MODULE_IMPORT_NS(SCST_NAMESPACE); static int scst_local_get_sas_transport_id(struct scst_local_sess *sess, uint8_t **transport_id, int *len) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 7d642ba..717279d 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -75,7 +75,7 @@ MODULE_AUTHOR("Vu Pham and Bart Van Assche"); MODULE_DESCRIPTION("SCSI RDMA Protocol target driver " "v" DRV_VERSION " (" DRV_RELDATE ")"); MODULE_LICENSE("Dual BSD/GPL"); -MODULE_IMPORT_NS(SCST); +MODULE_IMPORT_NS(SCST_NAMESPACE); /* * Global Variables |
From: Gleb C. <lna...@ya...> - 2025-01-20 15:54:42
|
Commit: 84179fa GitHub URL: https://github.com/SCST-project/scst/commit/84179fa1350c5240847c313fbbfd62ba9ebe790c Author: Gleb Chesnokov Date: 2025-01-20T18:54:10+03:00 Log Message: ----------- qla2x00t, qla2x00t-32gbit: Fix the RHEL 9.5 build Fixes: https://github.com/SCST-project/scst/issues/272 Modified Paths: -------------- qla2x00t-32gbit/qla_os.c | 12 +++++++++--- qla2x00t/qla_os.c | 8 ++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) =================================================================== diff --git a/qla2x00t-32gbit/qla_os.c b/qla2x00t-32gbit/qla_os.c index 0487449..f6d8a51 100644 --- a/qla2x00t-32gbit/qla_os.c +++ b/qla2x00t-32gbit/qla_os.c @@ -3020,7 +3020,9 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) ql2xallocfwdump = 0; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 5)) /* This may fail but that's ok */ pci_enable_pcie_error_reporting(pdev); #endif @@ -4047,7 +4049,9 @@ qla2x00_remove_one(struct pci_dev *pdev) pci_release_selected_regions(ha->pdev, ha->bars); kfree(ha); -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 5)) pci_disable_pcie_error_reporting(pdev); #endif @@ -6948,7 +6952,9 @@ qla2x00_disable_board_on_pci_error(struct work_struct *work) qla2x00_unmap_iobases(ha); pci_release_selected_regions(ha->pdev, ha->bars); -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 5)) pci_disable_pcie_error_reporting(pdev); #endif pci_disable_device(pdev); diff --git a/qla2x00t/qla_os.c b/qla2x00t/qla_os.c index f9c3ea8..c9cc17a 100644 --- a/qla2x00t/qla_os.c +++ b/qla2x00t/qla_os.c @@ -2367,7 +2367,9 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) goto probe_out; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 5)) /* This may fail but that's ok */ pci_enable_pcie_error_reporting(pdev); #endif @@ -3022,7 +3024,9 @@ qla2x00_remove_one(struct pci_dev *pdev) kfree(ha); ha = NULL; -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 5)) pci_disable_pcie_error_reporting(pdev); #endif pci_disable_device(pdev); |
From: Gleb C. <lna...@ya...> - 2024-12-28 14:18:11
|
Commit: ddd7f08 GitHub URL: https://github.com/SCST-project/scst/commit/ddd7f084c88edc9799621358c1e3e8326365d713 Author: Gleb Chesnokov Date: 2024-12-28T17:14:54+03:00 Log Message: ----------- .github/workflows: Update stable branch version Modified Paths: -------------- .github/workflows/checkpatch_pull.yml | 1 + .github/workflows/checkpatch_push.yml | 1 + .github/workflows/mail_notification.yml | 2 +- .github/workflows/run_regression_tests.yaml | 2 ++ 4 files changed, 5 insertions(+), 1 deletion(-) =================================================================== diff --git a/.github/workflows/checkpatch_pull.yml b/.github/workflows/checkpatch_pull.yml index 992238e..647f75e 100644 --- a/.github/workflows/checkpatch_pull.yml +++ b/.github/workflows/checkpatch_pull.yml @@ -3,6 +3,7 @@ name: Checkpatch upon pull request on: pull_request: branches: + - 3.9.x - master jobs: diff --git a/.github/workflows/checkpatch_push.yml b/.github/workflows/checkpatch_push.yml index a1ea507..464e804 100644 --- a/.github/workflows/checkpatch_push.yml +++ b/.github/workflows/checkpatch_push.yml @@ -3,6 +3,7 @@ name: Checkpatch upon push on: push: branches: + - 3.9.x - master jobs: diff --git a/.github/workflows/mail_notification.yml b/.github/workflows/mail_notification.yml index 415ac08..e796e2f 100644 --- a/.github/workflows/mail_notification.yml +++ b/.github/workflows/mail_notification.yml @@ -4,7 +4,7 @@ name: Mailing list on: push: branches: - - 3.8.x + - 3.9.x - master jobs: diff --git a/.github/workflows/run_regression_tests.yaml b/.github/workflows/run_regression_tests.yaml index b95d205..6794cd5 100644 --- a/.github/workflows/run_regression_tests.yaml +++ b/.github/workflows/run_regression_tests.yaml @@ -3,9 +3,11 @@ name: Run regression tests on: push: branches: + - 3.9.x - master pull_request: branches: + - 3.9.x - master jobs: |
From: Gleb C. <lna...@ya...> - 2024-12-28 14:15:17
|
Commit: 2bdc19a GitHub URL: https://github.com/SCST-project/scst/commit/2bdc19a61fc1fbf04a9f608030eca46da52f43ef Author: Gleb Chesnokov Date: 2024-12-28T17:14:54+03:00 Log Message: ----------- Bump the version number to 3.10.0-pre These changes have been generated by running the following command: $ scripts/update-version 3 10 0 -pre Modified Paths: -------------- doc/scst_user_spec.sgml | 2 +- fcst/fcst.h | 2 +- iscsi-scst/README | 2 +- iscsi-scst/include/iscsi_scst_ver.h | 2 +- iscsi-scst/kernel/isert-scst/isert.c | 2 +- qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.h | 4 ++-- qla2x00t/qla2x00-target/README | 2 +- qla2x00t/qla2x00-target/qla2x00t.h | 4 ++-- scst/README | 2 +- scst/include/scst_const.h | 4 ++-- scst/src/dev_handlers/scst_vdisk.c | 2 +- scst_local/scst_local.c | 2 +- scstadmin/scstadmin.sysfs/scstadmin | 2 +- srpt/src/ib_srpt.c | 2 +- usr/fileio/README | 2 +- usr/fileio/common.h | 2 +- usr/include/version.h | 2 +- 17 files changed, 20 insertions(+), 20 deletions(-) =================================================================== diff --git a/doc/scst_user_spec.sgml b/doc/scst_user_spec.sgml index b712468..987901c 100644 --- a/doc/scst_user_spec.sgml +++ b/doc/scst_user_spec.sgml @@ -10,7 +10,7 @@ SCST user space device handler interface description <name>Vladislav Bolkhovitin</name> </author> -<date>Version 3.9.0</date> +<date>Version 3.10.0-pre</date> <toc> diff --git a/fcst/fcst.h b/fcst/fcst.h index 3d6d351..35d0198 100644 --- a/fcst/fcst.h +++ b/fcst/fcst.h @@ -38,7 +38,7 @@ #define NEW_LIBFC_API #endif -#define FT_VERSION "3.9.0" +#define FT_VERSION "3.10.0-pre" #define FT_MODULE "fcst" #define FT_MAX_HW_PENDING_TIME 20 /* max I/O time in seconds */ diff --git a/iscsi-scst/README b/iscsi-scst/README index 6267dbd..d707ea6 100644 --- a/iscsi-scst/README +++ b/iscsi-scst/README @@ -1,7 +1,7 @@ iSCSI SCST target driver ======================== -Version 3.9.0, 28 December 2024 +Version 3.10.0-pre, 28 December 2024 ---------------------------- ISCSI-SCST is a deeply reworked fork of iSCSI Enterprise Target (IET) diff --git a/iscsi-scst/include/iscsi_scst_ver.h b/iscsi-scst/include/iscsi_scst_ver.h index 29a52da..d6f7d95 100644 --- a/iscsi-scst/include/iscsi_scst_ver.h +++ b/iscsi-scst/include/iscsi_scst_ver.h @@ -17,4 +17,4 @@ #define ISCSI_VERSION_STRING_SUFFIX -#define ISCSI_VERSION_STRING "3.9.0" ISCSI_VERSION_STRING_SUFFIX +#define ISCSI_VERSION_STRING "3.10.0-pre" ISCSI_VERSION_STRING_SUFFIX diff --git a/iscsi-scst/kernel/isert-scst/isert.c b/iscsi-scst/kernel/isert-scst/isert.c index 7209c6c..7979f1e 100644 --- a/iscsi-scst/kernel/isert-scst/isert.c +++ b/iscsi-scst/kernel/isert-scst/isert.c @@ -499,7 +499,7 @@ out: MODULE_AUTHOR("Yan Burman"); MODULE_LICENSE("Dual BSD/GPL"); MODULE_IMPORT_NS(SCST); -#define DRV_VERSION "3.9.0" "#" __stringify(OFED_FLAVOR) +#define DRV_VERSION "3.10.0-pre" "#" __stringify(OFED_FLAVOR) #define DRV_RELDATE "28 December 2024" MODULE_DESCRIPTION("iSER target transport driver v" DRV_VERSION " (" DRV_RELDATE ")"); module_init(isert_init_module); diff --git a/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.h b/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.h index dda295a..c8cddb3 100644 --- a/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.h +++ b/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.h @@ -19,8 +19,8 @@ /* Driver version number */ #define Q2T_VERSION(a, b, c, d) (((a) << 030) + ((b) << 020) + (c) << 010 + (d)) -#define Q2T_VERSION_CODE Q2T_VERSION(3, 9, 0, 0) -#define Q2T_VERSION_STRING "3.9.0" +#define Q2T_VERSION_CODE Q2T_VERSION(3, 10, 0, 0) +#define Q2T_VERSION_STRING "3.10.0-pre" #define SQA_DEFAULT_TAGS 2048 diff --git a/qla2x00t/qla2x00-target/README b/qla2x00t/qla2x00-target/README index 849ae42..69af425 100644 --- a/qla2x00t/qla2x00-target/README +++ b/qla2x00t/qla2x00-target/README @@ -1,7 +1,7 @@ Target driver for QLogic 2[2-6]xx/8[1-3]xx Fibre Channel cards ============================================================== -Version 3.9.0, 28 December 2024 +Version 3.10.0-pre, 28 December 2024 ---------------------------- This is target driver for QLogic 2[2-6]xx/8[1-3]xx Fibre Channel cards. diff --git a/qla2x00t/qla2x00-target/qla2x00t.h b/qla2x00t/qla2x00-target/qla2x00t.h index ecb67ec..a1b36a4 100644 --- a/qla2x00t/qla2x00-target/qla2x00t.h +++ b/qla2x00t/qla2x00-target/qla2x00t.h @@ -34,8 +34,8 @@ /* Version numbers, the same as for the kernel */ #define Q2T_VERSION(a, b, c, d) (((a) << 030) + ((b) << 020) + (c) << 010 + (d)) -#define Q2T_VERSION_CODE Q2T_VERSION(3, 9, 0, 0) -#define Q2T_VERSION_STRING "3.9.0" +#define Q2T_VERSION_CODE Q2T_VERSION(3, 10, 0, 0) +#define Q2T_VERSION_STRING "3.10.0-pre" #define Q2T_PROC_VERSION_NAME "version" #define Q2T_MAX_CDB_LEN 16 diff --git a/scst/README b/scst/README index 069ecd6..cb16e44 100644 --- a/scst/README +++ b/scst/README @@ -1,7 +1,7 @@ Generic SCSI target mid-level for Linux (SCST) ============================================== -Version 3.9.0, 28 December 2024 +Version 3.10.0-pre, 28 December 2024 ---------------------------- SCST is designed to provide unified, consistent interface between SCSI diff --git a/scst/include/scst_const.h b/scst/include/scst_const.h index fa0fa16..36147ea 100644 --- a/scst/include/scst_const.h +++ b/scst/include/scst_const.h @@ -47,10 +47,10 @@ * and FIO_REV in usr/fileio/common.h as well. */ #define SCST_VERSION(a, b, c, d) (((a) << 24) + ((b) << 16) + ((c) << 8) + d) -#define SCST_VERSION_CODE SCST_VERSION(3, 9, 0, 0) +#define SCST_VERSION_CODE SCST_VERSION(3, 10, 0, 0) #define SCST_VERSION_STRING_SUFFIX -#define SCST_VERSION_NAME "3.9.0" +#define SCST_VERSION_NAME "3.10.0-pre" #define SCST_VERSION_STRING SCST_VERSION_NAME SCST_VERSION_STRING_SUFFIX #ifdef SCST_REVISION diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 90c565e..730f8e3 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -74,7 +74,7 @@ #define SCST_FIO_VENDOR "SCST_FIO" #define SCST_BIO_VENDOR "SCST_BIO" /* 4 byte ASCII Product Revision Level - left aligned */ -#define SCST_FIO_REV "390 " +#define SCST_FIO_REV "3100" #define MAX_USN_LEN (20 + 1) /* For '\0' */ #define MAX_INQ_VEND_SPECIFIC_LEN (INQ_BUF_SZ - 96) diff --git a/scst_local/scst_local.c b/scst_local/scst_local.c index ae6ab0f..963bcce 100644 --- a/scst_local/scst_local.c +++ b/scst_local/scst_local.c @@ -71,7 +71,7 @@ README file for details. static unsigned long scst_local_trace_flag = SCST_LOCAL_DEFAULT_LOG_FLAGS; #endif -#define SCST_LOCAL_VERSION "3.9.0" +#define SCST_LOCAL_VERSION "3.10.0-pre" static const char *scst_local_version_date = "20110901"; /* Some statistics */ diff --git a/scstadmin/scstadmin.sysfs/scstadmin b/scstadmin/scstadmin.sysfs/scstadmin index 086ac23..d680791 100755 --- a/scstadmin/scstadmin.sysfs/scstadmin +++ b/scstadmin/scstadmin.sysfs/scstadmin @@ -3,7 +3,7 @@ use strict; use warnings; -my $Version = 'SCST Configurator v3.9.0'; +my $Version = 'SCST Configurator v3.10.0-pre'; # Configures SCST # diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 8751de3..7d642ba 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -59,7 +59,7 @@ /* Name of this kernel module. */ #define DRV_NAME "ib_srpt" -#define DRV_VERSION "3.9.0" "#" __stringify(OFED_FLAVOR) +#define DRV_VERSION "3.10.0-pre" "#" __stringify(OFED_FLAVOR) #define DRV_RELDATE "28 December 2024" #if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING) /* Flags to be used in SCST debug tracing statements. */ diff --git a/usr/fileio/README b/usr/fileio/README index 1a248ab..792700d 100644 --- a/usr/fileio/README +++ b/usr/fileio/README @@ -1,7 +1,7 @@ User space FILEIO handler ========================= -Version 3.9.0, 28 December 2024 +Version 3.10.0-pre, 28 December 2024 ---------------------------- User space program fileio_tgt uses interface of SCST's scst_user dev diff --git a/usr/fileio/common.h b/usr/fileio/common.h index 0be91f6..7827bc7 100644 --- a/usr/fileio/common.h +++ b/usr/fileio/common.h @@ -30,7 +30,7 @@ /* 8 byte ASCII Vendor */ #define VENDOR "SCST_USR" /* 4 byte ASCII Product Revision Level - left aligned */ -#define FIO_REV "390 " +#define FIO_REV "3100" #define MAX_USN_LEN (20+1) /* For '\0' */ diff --git a/usr/include/version.h b/usr/include/version.h index 5a05aff..f76bb22 100644 --- a/usr/include/version.h +++ b/usr/include/version.h @@ -19,6 +19,6 @@ #ifndef __VERSION_H #define __VERSION_H -#define VERSION_STR "3.9.0" +#define VERSION_STR "3.10.0-pre" #endif /* __VERSION_H */ |
From: Gleb C. <lna...@ya...> - 2024-12-28 13:59:44
|
Commit: ba7c9d7 GitHub URL: https://github.com/SCST-project/scst/commit/ba7c9d776c7a8b8e520914e52372ec96d52a8756 Author: Gleb Chesnokov Date: 2024-12-28T16:59:38+03:00 Log Message: ----------- .github/workflows: Update stable branch version Modified Paths: -------------- .github/workflows/checkpatch_pull.yml | 1 + .github/workflows/checkpatch_push.yml | 1 + .github/workflows/mail_notification.yml | 2 +- .github/workflows/run_regression_tests.yaml | 2 ++ 4 files changed, 5 insertions(+), 1 deletion(-) =================================================================== diff --git a/.github/workflows/checkpatch_pull.yml b/.github/workflows/checkpatch_pull.yml index 992238e..647f75e 100644 --- a/.github/workflows/checkpatch_pull.yml +++ b/.github/workflows/checkpatch_pull.yml @@ -3,6 +3,7 @@ name: Checkpatch upon pull request on: pull_request: branches: + - 3.9.x - master jobs: diff --git a/.github/workflows/checkpatch_push.yml b/.github/workflows/checkpatch_push.yml index a1ea507..464e804 100644 --- a/.github/workflows/checkpatch_push.yml +++ b/.github/workflows/checkpatch_push.yml @@ -3,6 +3,7 @@ name: Checkpatch upon push on: push: branches: + - 3.9.x - master jobs: diff --git a/.github/workflows/mail_notification.yml b/.github/workflows/mail_notification.yml index 415ac08..e796e2f 100644 --- a/.github/workflows/mail_notification.yml +++ b/.github/workflows/mail_notification.yml @@ -4,7 +4,7 @@ name: Mailing list on: push: branches: - - 3.8.x + - 3.9.x - master jobs: diff --git a/.github/workflows/run_regression_tests.yaml b/.github/workflows/run_regression_tests.yaml index b95d205..6794cd5 100644 --- a/.github/workflows/run_regression_tests.yaml +++ b/.github/workflows/run_regression_tests.yaml @@ -3,9 +3,11 @@ name: Run regression tests on: push: branches: + - 3.9.x - master pull_request: branches: + - 3.9.x - master jobs: |
From: Gleb C. <lna...@ya...> - 2024-12-28 13:57:12
|
Commit: 91811c0 GitHub URL: https://github.com/SCST-project/scst/commit/91811c0a1f7a41c3a76e8684a3aa24376bf847db Author: Gleb Chesnokov Date: 2024-12-28T16:56:33+03:00 Log Message: ----------- .github/workflows: Update stable branch version for the Mailing list action Modified Paths: -------------- .github/workflows/mail_notification.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) =================================================================== diff --git a/.github/workflows/mail_notification.yml b/.github/workflows/mail_notification.yml index 415ac08..e796e2f 100644 --- a/.github/workflows/mail_notification.yml +++ b/.github/workflows/mail_notification.yml @@ -4,7 +4,7 @@ name: Mailing list on: push: branches: - - 3.8.x + - 3.9.x - master jobs: |
From: Gleb C. <lna...@ya...> - 2024-12-28 13:47:42
|
Commit: ee5a0e2 GitHub URL: https://github.com/SCST-project/scst/commit/ee5a0e2293910121d1dd222d2e295cd8409074b7 Author: Gleb Chesnokov Date: 2024-12-28T16:44:09+03:00 Log Message: ----------- www: Update the version number from 3.8 to 3.9 Modified Paths: -------------- www/downloads.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) =================================================================== diff --git a/www/downloads.html b/www/downloads.html index 311a36b..106bc3d 100644 --- a/www/downloads.html +++ b/www/downloads.html @@ -35,9 +35,9 @@ <div id="main"> <h1>SCST Downloads</h1> - <p>The latest stable version of SCST is 3.8. + <p>The latest stable version of SCST is 3.9. Updates for that version are available on - the 3.8.x branch in the Git repository.</p> + the 3.9.x branch in the Git repository.</p> <p>Debian packages can be built by running "make dpkg". RPMs can be built by running @@ -48,7 +48,7 @@ <p>There is also a well done user space port, which you can find <a href="https://github.com/DavidButterfield/SCST-Usermode-Adaptation">here</a>.</p> <p>The latest development version of SCST is - 3.9. That version including target drivers and + 3.10. That version including target drivers and user space utilities can be downloaded directly from the SCST Git repository.</p> <p>You can access it using either |
From: Gleb C. <lna...@ya...> - 2024-12-28 13:47:02
|
Commit: a68cb8e GitHub URL: https://github.com/SCST-project/scst/commit/a68cb8e94d3fe5fad491a756a6cde8d5a5603840 Author: Gleb Chesnokov Date: 2024-12-28T16:44:09+03:00 Log Message: ----------- Bump the version number to 3.9.0 These changes have been generated by running the following command: $ scripts/update-version 3 9 0 Modified Paths: -------------- doc/scst_user_spec.sgml | 2 +- fcst/fcst.h | 2 +- iscsi-scst/README | 2 +- iscsi-scst/include/iscsi_scst_ver.h | 2 +- iscsi-scst/kernel/isert-scst/isert.c | 4 ++-- qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.h | 2 +- qla2x00t/qla2x00-target/README | 2 +- qla2x00t/qla2x00-target/qla2x00t.h | 2 +- scst/README | 2 +- scst/include/scst_const.h | 2 +- scst_local/scst_local.c | 2 +- scstadmin/scstadmin.sysfs/scstadmin | 2 +- srpt/src/ib_srpt.c | 4 ++-- usr/fileio/README | 2 +- usr/include/version.h | 2 +- 15 files changed, 17 insertions(+), 17 deletions(-) =================================================================== diff --git a/doc/scst_user_spec.sgml b/doc/scst_user_spec.sgml index e4c9ea8..b712468 100644 --- a/doc/scst_user_spec.sgml +++ b/doc/scst_user_spec.sgml @@ -10,7 +10,7 @@ SCST user space device handler interface description <name>Vladislav Bolkhovitin</name> </author> -<date>Version 3.9.0-pre</date> +<date>Version 3.9.0</date> <toc> diff --git a/fcst/fcst.h b/fcst/fcst.h index 4335958..3d6d351 100644 --- a/fcst/fcst.h +++ b/fcst/fcst.h @@ -38,7 +38,7 @@ #define NEW_LIBFC_API #endif -#define FT_VERSION "3.9.0-pre" +#define FT_VERSION "3.9.0" #define FT_MODULE "fcst" #define FT_MAX_HW_PENDING_TIME 20 /* max I/O time in seconds */ diff --git a/iscsi-scst/README b/iscsi-scst/README index 91ad191..6267dbd 100644 --- a/iscsi-scst/README +++ b/iscsi-scst/README @@ -1,7 +1,7 @@ iSCSI SCST target driver ======================== -Version 3.9.0-pre, 15 January 2024 +Version 3.9.0, 28 December 2024 ---------------------------- ISCSI-SCST is a deeply reworked fork of iSCSI Enterprise Target (IET) diff --git a/iscsi-scst/include/iscsi_scst_ver.h b/iscsi-scst/include/iscsi_scst_ver.h index 9d0d419..29a52da 100644 --- a/iscsi-scst/include/iscsi_scst_ver.h +++ b/iscsi-scst/include/iscsi_scst_ver.h @@ -17,4 +17,4 @@ #define ISCSI_VERSION_STRING_SUFFIX -#define ISCSI_VERSION_STRING "3.9.0-pre" ISCSI_VERSION_STRING_SUFFIX +#define ISCSI_VERSION_STRING "3.9.0" ISCSI_VERSION_STRING_SUFFIX diff --git a/iscsi-scst/kernel/isert-scst/isert.c b/iscsi-scst/kernel/isert-scst/isert.c index 8c26862..7209c6c 100644 --- a/iscsi-scst/kernel/isert-scst/isert.c +++ b/iscsi-scst/kernel/isert-scst/isert.c @@ -499,8 +499,8 @@ out: MODULE_AUTHOR("Yan Burman"); MODULE_LICENSE("Dual BSD/GPL"); MODULE_IMPORT_NS(SCST); -#define DRV_VERSION "3.9.0-pre" "#" __stringify(OFED_FLAVOR) -#define DRV_RELDATE "15 January 2024" +#define DRV_VERSION "3.9.0" "#" __stringify(OFED_FLAVOR) +#define DRV_RELDATE "28 December 2024" MODULE_DESCRIPTION("iSER target transport driver v" DRV_VERSION " (" DRV_RELDATE ")"); module_init(isert_init_module); module_exit(isert_cleanup_module); diff --git a/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.h b/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.h index 1722e60..dda295a 100644 --- a/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.h +++ b/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.h @@ -20,7 +20,7 @@ /* Driver version number */ #define Q2T_VERSION(a, b, c, d) (((a) << 030) + ((b) << 020) + (c) << 010 + (d)) #define Q2T_VERSION_CODE Q2T_VERSION(3, 9, 0, 0) -#define Q2T_VERSION_STRING "3.9.0-pre" +#define Q2T_VERSION_STRING "3.9.0" #define SQA_DEFAULT_TAGS 2048 diff --git a/qla2x00t/qla2x00-target/README b/qla2x00t/qla2x00-target/README index 399d194..849ae42 100644 --- a/qla2x00t/qla2x00-target/README +++ b/qla2x00t/qla2x00-target/README @@ -1,7 +1,7 @@ Target driver for QLogic 2[2-6]xx/8[1-3]xx Fibre Channel cards ============================================================== -Version 3.9.0-pre, 15 January 2024 +Version 3.9.0, 28 December 2024 ---------------------------- This is target driver for QLogic 2[2-6]xx/8[1-3]xx Fibre Channel cards. diff --git a/qla2x00t/qla2x00-target/qla2x00t.h b/qla2x00t/qla2x00-target/qla2x00t.h index 4cf4fce..ecb67ec 100644 --- a/qla2x00t/qla2x00-target/qla2x00t.h +++ b/qla2x00t/qla2x00-target/qla2x00t.h @@ -35,7 +35,7 @@ /* Version numbers, the same as for the kernel */ #define Q2T_VERSION(a, b, c, d) (((a) << 030) + ((b) << 020) + (c) << 010 + (d)) #define Q2T_VERSION_CODE Q2T_VERSION(3, 9, 0, 0) -#define Q2T_VERSION_STRING "3.9.0-pre" +#define Q2T_VERSION_STRING "3.9.0" #define Q2T_PROC_VERSION_NAME "version" #define Q2T_MAX_CDB_LEN 16 diff --git a/scst/README b/scst/README index d5c215e..069ecd6 100644 --- a/scst/README +++ b/scst/README @@ -1,7 +1,7 @@ Generic SCSI target mid-level for Linux (SCST) ============================================== -Version 3.9.0-pre, 15 January 2024 +Version 3.9.0, 28 December 2024 ---------------------------- SCST is designed to provide unified, consistent interface between SCSI diff --git a/scst/include/scst_const.h b/scst/include/scst_const.h index 1b5d723..fa0fa16 100644 --- a/scst/include/scst_const.h +++ b/scst/include/scst_const.h @@ -50,7 +50,7 @@ #define SCST_VERSION_CODE SCST_VERSION(3, 9, 0, 0) #define SCST_VERSION_STRING_SUFFIX -#define SCST_VERSION_NAME "3.9.0-pre" +#define SCST_VERSION_NAME "3.9.0" #define SCST_VERSION_STRING SCST_VERSION_NAME SCST_VERSION_STRING_SUFFIX #ifdef SCST_REVISION diff --git a/scst_local/scst_local.c b/scst_local/scst_local.c index 1ffe452..ae6ab0f 100644 --- a/scst_local/scst_local.c +++ b/scst_local/scst_local.c @@ -71,7 +71,7 @@ README file for details. static unsigned long scst_local_trace_flag = SCST_LOCAL_DEFAULT_LOG_FLAGS; #endif -#define SCST_LOCAL_VERSION "3.9.0-pre" +#define SCST_LOCAL_VERSION "3.9.0" static const char *scst_local_version_date = "20110901"; /* Some statistics */ diff --git a/scstadmin/scstadmin.sysfs/scstadmin b/scstadmin/scstadmin.sysfs/scstadmin index cdb54ca..086ac23 100755 --- a/scstadmin/scstadmin.sysfs/scstadmin +++ b/scstadmin/scstadmin.sysfs/scstadmin @@ -3,7 +3,7 @@ use strict; use warnings; -my $Version = 'SCST Configurator v3.9.0-pre'; +my $Version = 'SCST Configurator v3.9.0'; # Configures SCST # diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index fa7dd53..8751de3 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -59,8 +59,8 @@ /* Name of this kernel module. */ #define DRV_NAME "ib_srpt" -#define DRV_VERSION "3.9.0-pre" "#" __stringify(OFED_FLAVOR) -#define DRV_RELDATE "15 January 2024" +#define DRV_VERSION "3.9.0" "#" __stringify(OFED_FLAVOR) +#define DRV_RELDATE "28 December 2024" #if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING) /* Flags to be used in SCST debug tracing statements. */ #define DEFAULT_SRPT_TRACE_FLAGS (TRACE_OUT_OF_MEM | TRACE_MINOR \ diff --git a/usr/fileio/README b/usr/fileio/README index 84ff622..1a248ab 100644 --- a/usr/fileio/README +++ b/usr/fileio/README @@ -1,7 +1,7 @@ User space FILEIO handler ========================= -Version 3.9.0-pre, 15 January 2024 +Version 3.9.0, 28 December 2024 ---------------------------- User space program fileio_tgt uses interface of SCST's scst_user dev diff --git a/usr/include/version.h b/usr/include/version.h index 55a4594..5a05aff 100644 --- a/usr/include/version.h +++ b/usr/include/version.h @@ -19,6 +19,6 @@ #ifndef __VERSION_H #define __VERSION_H -#define VERSION_STR "3.9.0-pre" +#define VERSION_STR "3.9.0" #endif /* __VERSION_H */ |
From: Gleb C. <lna...@ya...> - 2024-12-28 13:44:38
|
Commit: 6325ba8 GitHub URL: https://github.com/SCST-project/scst/commit/6325ba84ae33355bce61bab4c226084c4d574c1a Author: Gleb Chesnokov Date: 2024-12-28T16:44:09+03:00 Log Message: ----------- scst/ChangeLog: Summarize the changes for the upcoming 3.9 release Modified Paths: -------------- scst/ChangeLog | 22 ++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) =================================================================== diff --git a/scst/ChangeLog b/scst/ChangeLog index c9bc8b7..37a6b8b 100644 --- a/scst/ChangeLog +++ b/scst/ChangeLog @@ -1,3 +1,24 @@ +Summary of changes between versions 3.8 and 3.9 +----------------------------------------------- +- scst_vdisk: Added active attributes support to vdisk_fileio. +- iscsi-scst: Added a new link_local parameter to control whether link local + addresses are included in the IPv6 SendTargets response, preserving existing + behavior by including them. +- iscsi-scst: Added an internal_portal parameter to allow specified portals to + bypass CHAP controls for both discovery and target login, preserving the + existing behavior if unset. +- Fixed VPD inquiry handling for invalid LUNs. If the requested data cannot be + returned, the device now correctly terminates with CHECK CONDITION as per SPC-6. +- Eliminated per-device synchronize_rcu() calls in scst_sess_free_tgt_devs(), + significantly cutting cleanup time for large numbers of target devices. +- qla2x00t-32gbit driver: Updated from Linux kernel version v6.7 to v6.12. + +The kernel versions supported by this release are: +* Kernel.org kernel versions v3.10..v6.12. +* Debian / Ubuntu kernels based on upstream kernel versions v3.10..v6.12. +* RHEL / CentOS / AlmaLinux 7.x, 8.0..8.9 and 9.0..9.5 kernels. +* UEK version 4, 5, 6 and 7 kernels. + Summary of changes between versions 3.7 and 3.8 ----------------------------------------------- - Fixed depmod warnings during the installation process. @@ -671,4 +692,3 @@ Summary of changes between versions 0.9.0a and 0.9.1 - Race with the commands serialization on one drive fixed - Cleanup - |
From: Gleb C. <lna...@ya...> - 2024-12-28 13:36:45
|
Commit: f86d0ca GitHub URL: https://github.com/SCST-project/scst/commit/f86d0cafc05e281be274c6fb65362833b61e6a11 Author: Gleb Chesnokov Date: 2024-12-28T16:31:52+03:00 Log Message: ----------- qla2x00t-32gbit: Update version to 10.02.09.400-k Signed-off-by: Nilesh Javali <nj...@ma...> Link: https://lore.kernel.org/r/202...@ma... Reviewed-by: Himanshu Madhani <him...@or...> Signed-off-by: Martin K. Petersen <mar...@or...> [ commit 35002a8ec557 upstream ] Modified Paths: -------------- qla2x00t-32gbit/qla_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) =================================================================== diff --git a/qla2x00t-32gbit/qla_version.h b/qla2x00t-32gbit/qla_version.h index cf0f9d9..a491d6e 100644 --- a/qla2x00t-32gbit/qla_version.h +++ b/qla2x00t-32gbit/qla_version.h @@ -6,9 +6,9 @@ /* * Driver version */ -#define QLA2XXX_VERSION "10.02.09.300-k" +#define QLA2XXX_VERSION "10.02.09.400-k" #define QLA_DRIVER_MAJOR_VER 10 #define QLA_DRIVER_MINOR_VER 2 #define QLA_DRIVER_PATCH_VER 9 -#define QLA_DRIVER_BETA_VER 300 +#define QLA_DRIVER_BETA_VER 400 |