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.
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.
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.
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.
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")
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.
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.
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.
This patch fixes the following Coverity complaint:
CID 271601 (#1 of 1): Uninitialized scalar variable (UNINIT)
uninit_use_in_call: Using uninitialized value req.
Field req.cid is uninitialized when calling iscsid_request.
There is a regular need in the kernel to provide a way to declare
having a dynamically sized set of trailing elements in a structure.
Kernel code should always use “flexible array members”[1] for these
cases. The older style of one-element or zero-length arrays should
no longer be used[2].
This code was transformed with the help of Coccinelle:
($ spatch --jobs $(getconf _NPROCESSORS_ONLN) --sp-file script.cocci --include-headers --dir . > output.patch)
@@
identifier S, member, array;
type T1, T2;
@@
struct S {
...
T1 member;
T2 array[
- 0
];
};
[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://www.kernel.org/doc/html/v5.16/process/deprecated.html#zero-length-and-one-element-arrays
Link: https://github.com/KSPP/linux/issues/78
Add the opportunity to globally specify multiple addresses, which
iSCSI/iSER portal will listen on.
There is a way to specify the addresses for a target, on which
portals it will be available, using the allowed_portal parameter.
There is also a way to set this globally via the iscsi-scstd
--address parameter. The problem is that the last option allows
you to specify only one local address. So extend this functionality
to specify more then one address.
Also increase the maximum number of listening addresses to 32.
Signed-off-by: Aleksandr Dyadyushkin <alextalker@ya.ru>
Move the $(SCST_INC_DIR) definitions from the out-of-tree sections into
the in-kernel sections. Since SCST is now distributed as a single tar
archive, only support in-tree builds with $(SCST_INC_DIR) and $(SCST_DIR).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8079 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Since all RHEL/CentOS 5 users have upgraded to a newer version, procfs
support is no longer necessary. Hence remove procfs support. This patch
has been generated as follows:
git grep -lw CONFIG_SCST_PROC iscsi-scst qla2x00t scst scst_local srpt |\
while read f; do
echo ${f}
unifdef -U CONFIG_SCST_PROC ${f} >${f}.out
mv ${f}.out ${f}
done
followed by two small manual edits in scst/include/scst.h and also in
qla2x00t/qla2x00-target/qla2x00t.c.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7999 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Daemon now handles receipt of EOF (rc == 0) from nl_fd. Probably this never
happens in a real kernel build, but it does during shutdown in a usermode build
and it seems like it is "generically correct" in either case.
Signed-off-by: David Butterfield <dab21774@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7140 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Add "XXX" comments in a few places about potential problems seen in SCST code,
for future investigation and possible repair.
Signed-off-by: David Butterfield <dab21774@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7123 d57e44dd-8a1f-0410-8b47-8ef2f437770f
casting const to non-const
uninitialized structure members
non-static local function
missing enumerated switch-value cases
Signed-off-by: David Butterfield <dab21774@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7122 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This fixes four similar instances of a very misleading and confusing logging
statement, which would print a "Wrong value" that had already been corrected by
the check function.
Signed-off-by: David Butterfield <dab21774@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7112 d57e44dd-8a1f-0410-8b47-8ef2f437770f
to exist as valid addressable memory beyond the NULL byte.
Signed-off-by: David Butterfield <dab21774@gmail.com>
with small addition to force set last byte NULL
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7109 d57e44dd-8a1f-0410-8b47-8ef2f437770f
target_del() calls handle_iscsi_events() which may recursively call target_del().
The 1st target_del() may resume its execution after the target object was already freed.
Signed-off-by: Erez Zilber <erezzi.list@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6908 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Additionally, surround complex values with parentheses, declare static
char arrays const and change C++ comments into C comments.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6849 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Avoid that the compiler reports warnings about strict aliasing when
building iscsi-scst on RHEL 6. This patch does not change any
functionality.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6414 d57e44dd-8a1f-0410-8b47-8ef2f437770f