1021 Commits
Author SHA1 Message Date
Gleb Chesnokov 055865e734 docs: Remove obsolete Subversion references
The tracked SVN tag ledger and checkout instructions predate the move to
Git and no longer describe a supported workflow.

Remove the obsolete material, point Debian metadata at GitHub and keep
the retired Gentoo guide generic about its old source location.
2026-08-21 19:58:59 +03:00
Gleb Chesnokov f30bf2b208 Makefiles: Propagate recursive command failures
Return the failing submake status from the top-level and Debian build
loops instead of turning an early failure into success. Collect and
check the statuses of the parallel iSCSI and SRP cleanup jobs as well.
2026-08-21 19:58:59 +03:00
Gleb Chesnokov 1faec3809a docs: Remove obsolete pre-3.10 kernel guidance
Drop Linux 2.6 build examples, an obsolete SRP initiator warning and
iSCSI daemon advice for a poll() bug fixed before the supported kernel
range.
2026-08-21 19:58:59 +03:00
Gleb Chesnokov 7a92e60868 scst: Remove pre-3.10 compatibility code
Move the minimum kernel check into the shared backport header so all
kernel components reject Linux versions older than 3.10 and RHEL 6.

Simplify now-unreachable compatibility conditions and remove the unused
QLogic patch for Linux 2.6.26 and 2.6.27.
2026-08-21 19:58:59 +03:00
Gleb Chesnokov 3a6fb66c83 scst: Remove residual procfs code
Procfs support was removed in 2019, but dead configuration guards,
patch specialization logic and unused declarations remained. Remove these
remnants and simplify paths that can no longer receive procfs-only objects.
2026-08-21 19:58:59 +03:00
Gleb Chesnokov 9bdffe6fe6 iscsi-scst: Retire obsolete integration advice
The iSER and distribution guides prescribe OFED 1.5 installation,
deleting packaged RDMA modules, patching kernel builds and applying
host-wide tuning. The Gentoo procedure targets SVN, while the bundled
OCF agents are neither built nor exercised by repository CI.

Commit 025574018e ("isert: Support building against MOFED without
patching the kernel build system") established the supported
header-selection model. Current Makefile conftests and isert-scst
sources define the remaining compatibility and transport limits.

Replace fixed OFED and tuning recipes with those sources and matching
vendor guidance. Reduce the Gentoo and resource-agent documents to
historical integration notes, and spell out their module, sysfs,
daemon, session and storage side effects before any reuse.
2026-08-21 10:05:36 +03:00
Gleb Chesnokov 9a45498bc7 iscsi-scst: Document current administration interfaces
The iSCSI READMEs, HOWTO and man pages combine current code with procfs,
old daemon configuration and fixed runtime output. The result documents
invalid paths, the wrong object creation order and unsafe live commands.

Commit 08e532715d ("Remove procfs support") removed the main obsolete
interface. Commit 70eb596f60 ("Rework iSCSI aborts to make them more
correct and remove recent workarounds (one more post-IET cleanup)")
added the SCST abort callback requested by an old ToDo entry.

Use iscsi_scst.h, kernel/config.c and usr/config.c for the kernel and
daemon contract. Correct sysfs ownership, authentication limits, setup
ordering, logging and dynamic output, and remove the completed task.

Keep iscsi-scstd.conf and iscsi-scst-adm documented because current code
still consumes them, but direct new setups to scst.conf. Replace the
removed service command and warn before exposing storage, credentials,
portals or sessions.
2026-08-21 10:05:36 +03:00
Gleb Chesnokov afa52076f3 docs: Update kernel issue reporting guidance
All four AskingQuestions copies direct users to the removed top-level
Linux REPORTING-BUGS file. They also present reports built around Linux
2.6, procfs and obsolete module names without an age marker.

Point each copy at
Documentation/admin-guide/reporting-issues.rst, the current kernel
reporting guide. Keep the old reports as examples of useful diagnostic
detail, but label them historical so their commands are not reused as
SCST setup instructions.
2026-08-21 10:05:36 +03:00
Gleb Chesnokov 38823eb5e2 docs: Add repository guidance for agents
SCST spans a kernel core, transport drivers, user-space programs and
configuration tools. Each area has different ABI, build, validation and
safety constraints, but the repository has no persistent guidance for
automated contributors.

Add a root AGENTS.md with cross-component contracts and nested files for
components with independent boundaries. Record authoritative sources,
generated files, compatibility policy and destructive workflows so
changes start from the correct context and avoid live storage state.
2026-08-21 10:05:36 +03:00
Gleb Chesnokov 9003543f45 scst: Port to Linux kernel v7.0
Support for the following changes in the Linux kernel v7.0:

  - e3b2cf6e5dba ("kernfs: pass struct ns_common instead of
    const void * for namespace tags")
2026-04-12 15:38:24 +03:00
Gleb Chesnokov 8a3b257c33 scst: Replace kmalloc with kmalloc_obj for non-scalar types
This is the result of running the Linux kernel Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci against the SCST tree.

This patch doesn't change any functionality.
2026-04-12 15:38:24 +03:00
Brian MandGleb Chesnokov 0731c421fd iscsi-scstd: Return SVC_UNAVAILABLE while logins are suspended
SIGUSR1/SIGUSR2 set/clear logins_suspended. While set, any login
attempt is rejected with a retriable Target Error instead of the
permanent Initiator Error (TGT_NOT_FOUND) that causes initiators
to give up.
2026-03-31 11:11:10 +03:00
Brian MandGleb Chesnokov 7a4ab042e6 iscsi-scst: Fix performance regression
A recent change in iscsi_threads_pool_get changed 2 from being the
minimum count to the maximum.  Rectify.
2026-03-04 11:41:03 +03:00
Lev VainblatandGleb Chesnokov 6c6e7251b2 iscsi-scst: Fix wrong variable in chap_calc_digest_af_alg memcpy
Use 'bytes' (the return value from af_alg_final) instead of 'res'
(which is 0 after the last successful af_alg_update call) when
copying the digest.

This bug caused the memcpy to copy 0 bytes, resulting in an
uninitialized digest buffer. It also triggered a GCC
-Werror=stringop-overflow warning because 'res' could theoretically
be negative, leading to a huge unsigned size.
2026-01-23 12:43:06 +03:00
Gleb Chesnokov b2a1f6e66a Bump the version number to 3.11.0-pre
These changes have been generated by running the following command:

$ scripts/update-version 3 11 0 -pre
2025-12-29 13:06:44 +03:00
Gleb Chesnokov d4cb03e2b8 Bump the version number to 3.10.0
These changes have been generated by running the following command:

$ scripts/update-version 3 10 0
2025-12-29 12:40:21 +03:00
Gleb Chesnokov b5777ff929 scst: annotate workqueues for WQ_PERCPU / WQ_UNBOUND
Upstream workqueue changes introduce a new WQ_PERCPU flag and plan to
switch alloc_workqueue()'s default from per-CPU to unbound

To kepp SCST behaviour unchanged across kernels, this patch makes all
alloc_workqueue() users explicit about whether they want per-CPU or
unbound queues.
2025-12-10 21:42:47 +03:00
Gleb Chesnokov 3928d6d74f iscsi-scst: Drop redundant 'extern' from function prototypes
This patch does not change any functionality.
2025-10-21 12:18:36 +03:00
Gleb Chesnokov 2c69fe018c scst: Use block layer helpers to calculate num of queues
The calculation of the upper limit for queues does not depend solely on
the number of online CPUs; for example, the isolcpus kernel
command-line option must also be considered.

To account for this, the block layer provides a helper function to
retrieve the maximum number of queues. Use it to set an appropriate
upper queue number limit.
2025-10-01 22:11:28 +03:00
Tony BattersbyandGleb Chesnokov 63f2375fe4 kbuild: Remove stack protector flags
-fstack-protector-strong is controlled by the in-tree
CONFIG_STACKPROTECTOR_STRONG config option.  If the flag is set without
the config option, scst fails to build:
ERROR: modpost: "__stack_chk_fail" [scst/src/scst.ko] undefined!

-fstack-clash-protection is disabled in the kernel's Makefile due to an
incompatibility with randomize_kstack_offset.

Fixes: 86d3d4bb1d ("kbuild: Enable additional compiler warnings")
Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
2025-09-08 16:40:12 +03:00
Gleb Chesnokov 1ba89c391e iscsi-scst: Accept CRC32 or LIBCRC32C for crc32c() across kernels
Kernel v6.15+ removed LIBCRC32C and switched in-tree users to CRC32.
Keep older kernels working by accepting either CRC32 or LIBCRC32C in
Kconfig and preprocessor guards, so crc32c() usage compiles and links
on both old and new kernels.
2025-08-18 13:23:30 +03:00
Gleb Chesnokov f85736549a iscsi-scst: Remove access to page->index
There is no need to print out page->index as part of the debug message.
2025-08-05 16:37:31 +03:00
Christoph BöhmwalderandGleb Chesnokov 3aad61d2fd iscsi-scst: use /run instead of /var/run
When attempting to manage iscsi-scstd using a systemd service file,
systemd warns:

PIDFile= references a path below legacy directory /var/run/, [...]

Change the pidfile path to be under /run instead.

/run has been in use as a replacement for /var/run for many years now
(the original Debian proposal is from 2011). Most distributions symlink
/var/run to /run, which means that this change should not have any
adverse side effects for the vast majority of users.
2025-06-26 15:11:58 +03:00
Gleb Chesnokov 977904d33a scst: Use separate sysfs_emit_at() for emitting SCST_SYSFS_KEY_MARK
Replace combined sysfs_emit() calls with separate sysfs_emit() and
sysfs_emit_at() invocations when emitting SCST_SYSFS_KEY_MARK in sysfs
attribute show handlers.

This improves code clarity and consistency, explicitly handling the
conditional addition of SCST_SYSFS_KEY_MARK.

This patch does not change any functionality.
2025-05-19 20:46:54 +03:00
Gleb Chesnokov 0e8fdad5e4 scst: Use sysfs_emit/sysfs_emit_at instead of scnprintf()
Replace scnprintf() with sysfs_emit() and sysfs_emit_at() in sysfs show handlers.

These helper functions are specifically designed for sysfs output, providing safer
handling of buffer lengths and consistency across kernel sysfs interfaces.

This patch does not change any functionality.
2025-05-19 20:46:54 +03:00
Gleb Chesnokov 989802f48d scst: Replace snprintf() with scnprintf()
Replace snprintf() with scnprintf() in two places:

- code paths that build up a buffer incrementally
- sysfs attribute “show” handlers

scnprintf() guarantees its return value is the number of bytes actually
written (never exceeding the buffer), preventing potential overruns.

This patch does not change any functionality.
2025-05-19 20:46:54 +03:00
Gleb Chesnokov 9cbca53830 scst: Replace sprintf() with scnprintf() in sysfs callbacks
Replace all uses of sprintf() with scnprintf() in sysfs attribute
callbacks to eliminate the risk of buffer overflows.

This patch does not change any functionality.
2025-05-16 16:37:43 +03:00
Gleb Chesnokov d21b6f1457 scst: Port to Linux kernel v6.15
Support for the following changes in the Linux kernel v6.15:

- 8fa7292fee5c ("treewide: Switch/rename to timer_delete[_sync]()")
2025-05-14 18:36:46 +03:00
Gleb Chesnokov c934aee1a8 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.
2025-04-18 18:54:20 +03:00
Gleb Chesnokov f32f464190 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.
2025-04-18 18:54:20 +03:00
Gleb Chesnokov 86d3d4bb1d kbuild: Enable additional compiler warnings
Add additional compiler flags to improve code compliance.
2025-03-25 18:57:32 +03:00
Gleb Chesnokov a2c1c2d8b2 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")
2025-03-25 16:53:57 +03:00
Gleb Chesnokov 191a74d127 scst: Fix recently introduced Coverity warnings
Add error handling for recently introduced SHA256 and SHA3-256 APIs.
2025-03-25 16:09:35 +03:00
Brian MandGleb Chesnokov 146d79ec88 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.
2025-02-03 11:16:24 +03:00
Brian MandGleb Chesnokov 6c5e8ad16a iscsi-scst: Add transport name to sys entry for connection
This will make it possible to distinguish iSCSI-TCP connections
from iSER connections.
2025-01-29 13:00:08 +03:00
Gleb Chesnokov f52ae117b8 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
2025-01-20 18:54:10 +03:00
Gleb Chesnokov 2bdc19a61f 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
2024-12-28 17:14:54 +03:00
Gleb Chesnokov a68cb8e94d Bump the version number to 3.9.0
These changes have been generated by running the following command:

$ scripts/update-version 3 9 0
2024-12-28 16:44:09 +03:00
Gleb Chesnokov 60dc638b1b iscsi-scst: Fix multiple checkpatch warnings
This patch does not change any functionality.
2024-11-16 14:33:58 +03:00
Gleb Chesnokov 3a54209167 iscsi-scst: Fix multiple checkpatch warnings
This patch does not change any functionality.
2024-11-16 14:33:58 +03:00
Gleb Chesnokov ae5ea42594 iscsi-scst: Fix multiple checkpatch warnings
This patch does not change any functionality.
2024-11-16 14:33:58 +03:00
Gleb Chesnokov 8aa93714e6 iscsi-scst: Fix multiple checkpatch warnings
This patch does not change any functionality.
2024-11-16 14:33:58 +03:00
Gleb Chesnokov 1414c9dda3 iscsi-scst: Fix multiple checkpatch warnings
This patch does not change any functionality.
2024-11-16 14:33:58 +03:00
Gleb Chesnokov ec80741a24 iscsi-scst: Fix multiple checkpatch warnings
This patch does not change any functionality.
2024-11-16 14:33:58 +03:00
Gleb Chesnokov 61f365f96e scst: Expand all create*_workqueue() invocations
The workqueue maintainer wants to remove the create*_workqueue() macros
because these macros always set the WQ_MEM_RECLAIM flag and because these
only support literal workqueue names. Hence this patch that replaces the
create*_workqueue() invocations with the definition of this macro. The
WQ_MEM_RECLAIM flag has been retained because I think that flag is necessary
for workqueues created by storage drivers.
2024-11-07 14:02:05 +03:00
Gleb Chesnokov 256d695afa scst: Port to Linux kernel v6.12
Support for the following changes in the Linux kernel v6.12:

- 5f60d5f6bbc1 ("move asm/unaligned.h to linux/unaligned.h")
- cb787f4ac0c2 ("[tree-wide] finally take no_llseek out")
2024-11-07 13:21:25 +03:00
Brian MandGleb Chesnokov aa086c9fb3 iscsi-scst: Add internal_portal parameter
Add an internal_portal parameter to allow specified portals to
bypass CHAP controls for both discovery and target login.  If not
populated, then the current behavior will be preserved.
2024-08-19 17:13:00 +03:00
Brian MeagherandGleb Chesnokov 6a21f456f7 iscsi-scst: Add mechanism to restore target parameter to default
Writing the string :default: to the /sys entry will restore local_def
2024-04-26 09:38:36 +03:00
Brian MeagherandGleb Chesnokov 659c7a7875 iscsi-scst: Add link_local parameter
Add a link_local parameter to control whether an IPv6 SendTargets
response includes link local addresses.  The default is to preserve
the existing behavior and include them.
2024-04-22 10:21:15 +03:00
Gleb Chesnokov 188256792c Bump the version number to 3.9.0-pre
These changes have been generated by running the following command:

$ scripts/update-version 3 9 0 -pre
2024-01-15 15:33:45 +03:00