Support for the following changes in the Linux kernel v7.0:
- e3b2cf6e5dba ("kernfs: pass struct ns_common instead of
const void * for namespace tags")
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.
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.
Fix indentation of config option's help text by adding leading spaces.
Generally help text is indented by couple of spaces more beyond the leading
tab <\t> character. It helps Kconfig parsers to read file without error.
-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>
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.
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.
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.
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.
strlcpy() reads the entire source buffer first. This read may exceed the
destination size limit. This is both inefficient and can lead to linear
read overflows if a source string is not NULL-terminated [1].
[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy
This patch fixes the installation process for Linux kernels where the
default value of INSTALL_MOD_DIR differs from `extra`.
For instance, it unbreaks `make rpm` against Fedora's kernels, where
INSTALL_MOD_DIR is set to `updates`.
Support for the ib_srpt_target_<n> target port names was removed in 2015.
Update the documentation that still uses this target port name format.
Remove all references to the obsolete ib_srpt kernel module parameters
use_port_guid_in_session_name and use_node_guid_in_target_name. Remove
the references from srpt/README to target port name formats that are no
longer supported.
Change '---help---' into 'help'. See also Linux kernel commit f70f74d15ca8
("kconfig: remove '---help---' support") # v5.9.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9216 d57e44dd-8a1f-0410-8b47-8ef2f437770f
The previous commit removed support for building with clang. Restore support
for building with clang without breaking cross-compilation support.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9209 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Use a workqueue for processing RDMA completions instead of creating one
kernel thread per RDMA channel. This change improves performance if the
number of RDMA channels is large by reducing the number of context
switches between kernel threads while processing RDMA completions. An
additional change is that srpt_set_ch_state() no longer wakes up the
RDMA completion context but that srpt_cm_rtu_recv() wakes up the RDMA
completion context instead.
See also https://github.com/bvanassche/scst/issues/33 .
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9178 d57e44dd-8a1f-0410-8b47-8ef2f437770f
- Return EOPNOTSUPP instead of ENOTSUPP to user space.
- Do not terminate macro definitions with a trailing semicolon.
- Do not initialize static variables to zero.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9176 d57e44dd-8a1f-0410-8b47-8ef2f437770f
The latter name reflects better the role of this variable. Remove the
CPPFLAGS assignment from srpt/src/Kbuild because it is not useful.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9082 d57e44dd-8a1f-0410-8b47-8ef2f437770f