Commit Graph

6286 Commits

Author SHA1 Message Date
Bart Van Assche
4e9fabd55e Merge branch 'svn-trunk' 2018-11-04 12:23:36 -08:00
Bart Van Assche
ad5bfbe4e2 scst: Annotate scst_cmd user space copying correctly
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7790 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-04 20:21:42 +00:00
Bart Van Assche
fc51f85f02 Merge branch 'svn-trunk' 2018-11-04 12:09:44 -08:00
Bart Van Assche
04ad78071b scripts/update-version: Also update usr/include/version.h
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7788 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-04 20:08:59 +00:00
Bart Van Assche
3ab93596f3 Merge branch 'svn-trunk' 2018-11-04 09:52:22 -08:00
Bart Van Assche
13ca37d6a9 scst: Use 'make modules_install' instead of 'install' for installing kernel modules
This patch ensures that the proper SELinux label is applied to all SCST
kernel modules. This was reported by Rob Turk.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7779 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-04 17:52:01 +00:00
Bart Van Assche
30df4da507 Merge branch 'svn-trunk' 2018-11-03 17:09:37 -07:00
Bart Van Assche
a009f41028 scstadmin.spec: Add /usr/bin/killall to the requirements list
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7603 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-03 23:52:32 +00:00
Bart Van Assche
7e5a0ba300 scst.spec: Avoid that rpm complains about expanding a variable in a comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7602 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-03 23:50:54 +00:00
Bart Van Assche
7286b7722e Merge branch 'svn-trunk' 2018-11-03 10:13:35 -07:00
Bart Van Assche
4ceb343966 scst, scst_user: Add support for usercopy hardening
Avoid that with CONFIG_HARDENED_USERCOPY enabled warnings appear about
kernel memory exposure attempts when using scst_user.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7601 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-03 17:06:01 +00:00
Bart Van Assche
133b012f82 scst: Introduce a backport of kmem_cache_create_usercopy()
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7600 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-03 17:03:41 +00:00
Bart Van Assche
ca180efeec cst_vdisk: Avoid that vdisk_usn_vpd() can trigger a buffer overflow
Additionally, this patch avoids that the following compiler warning
is reported on Fedora 29:

In function 'strncpy',
    inlined from 'vdisk_usn_vpd.isra.24' at /home/bart/software/scst.git/scst/src/dev_handlers/scst_vdisk.c:3866:3:
./include/linux/string.h:246:9: warning: '__builtin_strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
  return __builtin_strncpy(p, q, size);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/bart/software/scst.git/scst/src/dev_handlers/scst_vdisk.c: In function 'vdisk_usn_vpd.isra.24':
./include/linux/string.h:267:10: note: length computed here
   return __builtin_strlen(p);
          ^~~~~~~~~~~~~~~~~~~


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7599 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-03 17:02:38 +00:00
Bart Van Assche
3f79d678dd Merge branch 'svn-trunk' 2018-11-02 18:18:21 -07:00
Bart Van Assche
63ed4b4f9a ib_srpt: Fix build against MLNX_OFED-4.5
This patch fixes the following error during srpt compilation:
  CC [M]  /.autodirect/mtrswgwork/sergeygo/scst-trunk/srpt/src/ib_srpt.o
In file included from /usr/src/ofa_kernel/default/include/rdma/ib_verbs.h:76:0,
                 from /usr/src/ofa_kernel/default/include/rdma/ib_cache.h:38,
                 from /.autodirect/mtrswgwork/sergeygo/scst-trunk/srpt/src/ib_srpt.c:61:
/usr/src/ofa_kernel/default/include/uapi/rdma/rdma_user_ioctl.h:45:10: fatal error: rdma/rdma_user_ioctl_cmds.h: No such file or directory
 #include <rdma/rdma_user_ioctl_cmds.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The same problem has already been fixed for iscsi in [r7215] "iscsi-scst/Makefile: Add include/uapi directory to the include path".

From: Sergey Gorenko <sergeygo@mellanox.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7597 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-01 05:28:18 +00:00
Bart Van Assche
0fe44091c8 Merge branch 'svn-trunk' 2018-10-31 07:28:08 -07:00
Bart Van Assche
69fde133e9 Revert r7524
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7525 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-31 14:25:52 +00:00
Bart Van Assche
91b99af914 scst, srpt, iscsi-scst, qla2x00t, fcst: Bump version number to 3.4.0
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7524 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-31 14:24:20 +00:00
Bart Van Assche
90e883d76b scripts/update-version: Left-align the *_REV revision numbers in scst_vdisk.c
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7523 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-31 14:23:26 +00:00
Bart Van Assche
2b53696357 Merge branch 'svn-trunk' 2018-10-14 15:05:56 -07:00
Bart Van Assche
78a0407d0e scst, iscsi-scst: Simplify the code that uses kstrto*l()
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7522 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 22:05:33 +00:00
Bart Van Assche
0f0ab73758 ibmvstgt: Port to Linux kernel v4.18
Untested.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7521 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 22:04:12 +00:00
Bart Van Assche
c55eaa7d5e iscsi-scstd: Change the gcc-specific __FUNCTION__ into __func__
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7520 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 22:02:24 +00:00
Bart Van Assche
969a36a235 scripts/checkpatch: Suppress more warning categories
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7519 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 22:00:46 +00:00
Bart Van Assche
93d7c0da08 Expand Kconfig help texts
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7518 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 21:59:08 +00:00
Bart Van Assche
c59b0a2303 iscsi-scst: Insert spaces after comma's where required according to the coding style
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7517 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 21:58:38 +00:00
Bart Van Assche
73dca5af22 Remove trailing whitespace from documentation files
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7516 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 21:57:13 +00:00
Bart Van Assche
8631584f47 scst_local: Fix a build regression for older kernels in the scsi-mq support code
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7515 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 21:53:22 +00:00
Bart Van Assche
755b050ee0 Merge branch 'svn-trunk' 2018-10-13 21:14:42 -07:00
Bart Van Assche
d84fc0783d vdisk_fileio: Add support for asynchronous I/O processing
Using asynchronous has the advantage that SCSI commands can be processed
concurrently even if only one SCST command thread has been configured.
Asynchronous direct I/O has the additional advantage that the page cache
is bypassed and hence that the command processing overhead is reduced.

Asynchronous I/O is not used when DIF is enabled because it is
nontrivial to ensure that a DIF read received after a DIF write
returns the data that has just been written.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7514 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 04:10:59 +00:00
Bart Van Assche
50e31529c4 scst_vdisk: Introduce a union in struct vdisk_cmd_params
This patch does not change any functionality but makes a later patch
easier to read.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7513 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 04:07:53 +00:00
Bart Van Assche
19c9aec2f7 vdisk_fileio: Remove the page cache based zero-copy implementation
A new zero-copy implementation will be added in a later patch.
This patch reverts most of r4213.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7512 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 04:07:04 +00:00
Bart Van Assche
9e740aa986 scst_vdisk: Fix spelling in a source code comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7511 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 04:06:21 +00:00
Bart Van Assche
79aa0e4b31 scst/README_in-tree: Remove this file
Instead of keeping scst/README and scst/README_in-tree in sync, remove
the latter. This file can always be restored if necessary.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7510 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 04:04:52 +00:00
Bart Van Assche
ec73c01358 scst_local: Use all CPUs for command processing
This patch modifies scst_local such that on kernel version 3.19 and
later multiple hardware queues are used (scsi-mq). Note: in order
to benefit from concurrent processing, the number of SCST command
threads must be set to a value above one.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7509 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 04:03:57 +00:00
Bart Van Assche
2f1cc8382f scst_local: Rename SCpnt into scmd
This patch does not change any functionality but brings the scst_local
source code more in line with recent upstream SCSI LLDs.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7508 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 04:02:58 +00:00
Bart Van Assche
11a975ffad scst: Add -Wno-sign-compare for clang
This patch avoids that clang complains about mixed sign comparisons.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7507 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 04:01:50 +00:00
Bart Van Assche
8bec8ffea3 scripts/checkpatch: Add a script that analyzes all SCST files with checkpatch
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7506 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 03:58:46 +00:00
Bart Van Assche
e2a17c6a24 Change 'long long int' int 'long long'
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7505 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 03:57:53 +00:00
Bart Van Assche
4cd532a987 Multiple files: Remove trailing whitespace
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7504 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 03:55:02 +00:00
Bart Van Assche
24d05c4198 Merge branch 'svn-trunk' 2018-10-13 08:03:45 -07:00
Bart Van Assche
5cec097939 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7503 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-13 14:41:59 +00:00
Bart Van Assche
536a60cbbc Merge branch 'svn-trunk' 2018-10-07 19:44:46 -07:00
Bart Van Assche
1017c302f2 scst: Revert r7501 because it didn't have the intended effect
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7502 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-08 02:42:21 +00:00
Bart Van Assche
3d1b6c7ef8 scst: Do not complain about mixed signedness comparisons
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7501 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-08 01:41:26 +00:00
Bart Van Assche
e24d6f633b Merge branch 'svn-trunk' 2018-10-07 18:41:24 -07:00
Bart Van Assche
10333e8496 scst/include/backport.h: Avoid mixed-signedness comparisons
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7500 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-08 01:37:48 +00:00
Bart Van Assche
29e2efd291 Merge branch 'svn-trunk' 2018-10-07 09:32:18 -07:00
Bart Van Assche
3e5796d178 scst: Reformat scst_*_nolockdep() macro definitions
Avoid that the definitions of these macros exceed 80 columns.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7499 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-07 16:21:29 +00:00
Bart Van Assche
fa3a6738ec scst: Remove trailing whitespace from documentation and Makefile
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7498 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-07 16:13:55 +00:00