Bart Van Assche
eb2b6f6ccf
qla2xxx: Simplify the kernel v4.11 port
...
This patch does not change any functionality.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7438 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-23 04:25:48 +00:00
Bart Van Assche
cf4c873849
qla2x00t: Introduce set_bsg_result()
...
This patch does not change any functionality.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7437 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-23 04:25:20 +00:00
Bart Van Assche
b6949a24b1
qla2xxx: Fix two potential buffer overflows
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7436 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-23 04:24:16 +00:00
Bart Van Assche
4c01448dfa
iscsi-scst: Simplify iscsi_get_initiator_port_transport_id()
...
From the snprintf() man page:
If n is zero, nothing shall be written and s may be a null pointer.
This patch does not change any functionality.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7435 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-23 04:23:26 +00:00
Bart Van Assche
cf843cecf3
scst, ib_srpt, ibmvstgt: Swap Module.symvers detection logic
...
Ensure that Module.symvers is used when building against an incompletely
built kernel tree.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7434 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-23 04:22:52 +00:00
Bart Van Assche
d0f4afe2ec
scst/include/backport.h: Avoid that the timer_setup() backport triggers a warning
...
Avoid that gcc 8 reports the following warning for the timer_setup() backport:
warning: cast between incompatible function types from 'void (*)(struct timer_list *)' to 'void (*)(long unsigned int)' [-Wcast-function-type]
(_timer)->function = (void (*)(unsigned long))(_fn); \
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7433 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-23 04:21:32 +00:00
Bart Van Assche
3ec56f3bde
scst/include/backport.h: Sort #include directives alphabetically
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7432 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-23 04:20:56 +00:00
Bart Van Assche
687c55143d
scst: Fix kmem_cache_create_usercopy() backport
...
slab_flags_t is not available in the kernel versions
kmem_cache_create_usercopy() has been backported to, hence use
unsigned long instead.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7431 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-21 16:46:16 +00:00
Bart Van Assche
687d0a734c
isert-scst: Rework r7429
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7430 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-21 16:43:33 +00:00
Bart Van Assche
27354d06e9
isert-scst: Allow copying between userspace and isert_cmnd data structures
...
This patch avoids that the kernel reports the following:
kernel: usercopy: Kernel memory exposure attempt detected from SLUB object 'isert_cmnd' (offset 208, size 48)!
Reported-by: Carsten Aulbert <carsten.aulbert@aei.mpg.de >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7429 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-21 05:06:35 +00:00
Bart Van Assche
b746591148
scst/src/scst_mem: Enable userspace copying for sgv-*-*K
...
This patch avoids that using the iSER target driver with usercopy harderning
enabled triggers the following:
usercopy: Kernel memory exposure attempt
detected from SLUB object 'sgv-clust-64K' (offset 200, size 48)!
kernel BUG at /build/linux-Sci2oS/linux-4.16.16/mm/usercopy.c:100!
invalid opcode: 0000 [#1 ] SMP PTI
CPU: 10 PID: 6283 Comm: iscsi-scstd Tainted:
P O 4.16.0-0.bpo.2-amd64 #1 Debian 4.16.16-2~bpo9+1
Hardware name: Supermicro Super
Server/X10SRH-CF, BIOS 2.0b 04/14/2017
RIP: 0010:usercopy_abort+0x69/0x80
Call Trace:
__check_heap_object+0xee/0x120
__check_object_size+0xb8/0x1a0
isert_read+0x82/0x300 [isert_scst]
vfs_read+0x91/0x130
SyS_read+0x52/0xc0
do_syscall_64+0x6c/0x130
entry_SYSCALL_64_after_hwframe+0x3d/0xa2
Reported-by: Carsten Aulbert <carsten.aulbert@aei.mpg.de >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7428 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-19 18:04:08 +00:00
Bart Van Assche
cfe8f3cfc1
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@7427 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-19 18:00:42 +00:00
Bart Van Assche
3682fd10a2
scst_lib: Allow copying between userspace and scst_cmd data structures
...
This patch avoids that the following call trace is reported when using the
iSER target driver with CONFIG_HARDENED_USERCOPY=y in the kernel config:
usercopy: Kernel memory exposure attempt detected from SLUB object 'scst_cmd' (offset 200, size 48)!
------------[ cut here ]------------
kernel BUG at /build/linux-Sci2oS/linux-4.16.16/mm/usercopy.c:100!
invalid opcode: 0000 [#1 ] SMP PTI
CPU: 10 PID: 6684 Comm: iscsi-scstd Tainted: P O 4.16.0-0.bpo.2-amd64 #1 Debian 4.16.16-2~bpo9+1
Hardware name: Supermicro Super Server/X10SRH-CF, BIOS 2.0b 04/14/2017
RIP: 0010:usercopy_abort+0x69/0x80
Call Trace:
__check_heap_object+0xee/0x120
__check_object_size+0xb8/0x1a0
isert_read+0x82/0x2f0 [isert_scst]
vfs_read+0x91/0x130
SyS_read+0x52/0xc0
? SyS_fcntl+0x78/0xa0
do_syscall_64+0x6c/0x130
entry_SYSCALL_64_after_hwframe+0x3d/0xa2
Reported-by: Carsten Aulbert <carsten.aulbert@aei.mpg.de >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7426 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-18 21:19:54 +00:00
Bart Van Assche
51ec31562d
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7425 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-14 14:44:54 +00:00
Bart Van Assche
93d779dab6
scripts/specialize-patch: Add support for HAVE_DEV_ATTR_MAX_SEND_SGE and HAVE_RDMA_QUERY_GID
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7424 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-14 14:43:58 +00:00
Bart Van Assche
b5de8333c4
scst_vdisk: Avoid that gcc 7 and older warn about pragma GCC diagnostic ignored "-Wstringop-truncation"
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7423 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-14 14:43:20 +00:00
Bart Van Assche
70b263cf0b
scst/include/scst.h: Revert an accidental check-in
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7422 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-14 02:17:57 +00:00
Bart Van Assche
f7fe8e220b
scst_local: Rework the port to kernel v4.17
...
Rework the port to kernel v4.17 such that building scst_local against the
latest MOFED version succeeds.
Reported-by: Sergey Gorenko <sergeygo@mellanox.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7421 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-14 00:44:33 +00:00
Bart Van Assche
a4b443cc78
ib_srpt: Add a configure test for dev_attr.max_send_sge
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7420 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-14 00:42:07 +00:00
Bart Van Assche
caf0571c3f
ib_srpt: Fix conftest/rdma_query_gid/rdma_query_gid.c, part 2
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7419 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-13 15:45:31 +00:00
Bart Van Assche
26af40aa38
ib_srpt: Fix conftest/rdma_query_gid/rdma_query_gid.c
...
Note: the rdma_query_gid() function will probably go upstream in kernel v4.18.
Signed-off-by: Sergey Gorenko <sergeygo@mellanox.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7418 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-13 14:08:04 +00:00
Bart Van Assche
9d49877bcb
scst_targ: Port to Linux kernel v4.18
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7417 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-11 16:50:41 +00:00
Bart Van Assche
bd6f57f67f
Update Subversion ignore lists
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7416 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-11 16:48:22 +00:00
Bart Van Assche
e698bf8f28
srpt/conftest/rdma_query_gid: Add
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7415 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-11 16:47:10 +00:00
Bart Van Assche
2398d2e236
scst_vdisk: Port to Linux kernel v4.18
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7414 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-11 16:45:22 +00:00
Bart Van Assche
5e4d37994f
ib_srpt: Fix a compiler warning
...
This patch fixes a compiler warning introduced by r7410.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7413 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-11 15:50:54 +00:00
Bart Van Assche
86208ac77d
ib_srpt: Improve source code documentation
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7412 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-11 15:45:39 +00:00
Bart Van Assche
a10ed48b10
ib_srpt: Split a long source code line
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7411 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-11 15:41:45 +00:00
Bart Van Assche
ff6864620b
ib_srpt: Fix ch->max_sge calculation
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7410 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-10 04:14:38 +00:00
Bart Van Assche
b2416e0f49
scst_local: Port to kernel v4.17
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7409 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-10 04:13:57 +00:00
Bart Van Assche
6d345cde85
scst_vdisk: Suppress a gcc 8 warning about an intentional string truncation
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7408 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-10 04:13:21 +00:00
Bart Van Assche
f1acec0e57
ib_srpt/Makefile: Fix OFED/MOFED detection on RHEL 7.4
...
Because of a not fully root-caused reason (make bug?) the output of the
shell commands used to determine the (M)OFED RPM name was written to
stderr instead of stdout. Work around this bug by splitting the shell
commands used to determine the (M)OFED RPM names.
Reported-by: Sergey Gorenko <sergeygo@mellanox.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7407 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-10 04:12:34 +00:00
Bart Van Assche
841cc5812a
nightly build, scripts/kernel-functions: Backport v4.16 gcc-8 fixes to kernel v4.15
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7406 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-10 04:10:09 +00:00
Bart Van Assche
337e23f3f3
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7405 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-10 04:09:39 +00:00
Bart Van Assche
1e1eeccc6b
scst_lib: Document scst_scsi_execute() arguments
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7404 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-10 04:09:05 +00:00
Bart Van Assche
e1b418938e
usr/stpgd: Fix make install failure for relative DESTDIR
...
When DESTDIR is a relative path, make install fails to install
`scst_on_stpg` for not having created `$(DESTDIR)$(PREFIX)/bin/scst`.
When DESTDIR is an absolute path, make install doesn't fail to install
`scst_on_stpg` because usr/fileio has already created the directory.
usr/stpgd should explicitly create `$(DESTDIR)$(PREFIX)/bin/scst`
so that it can handle a relative DESTDIR, plus be independent of
usr/fileio installation.
--
# cd usr
# make install DESTDIR=./aaa
cd fileio && make install
make[1]: Entering directory '/tmp/scst/usr/fileio'
install -d ./aaa/usr/local/bin/scst
install -m 755 fileio_tgt ./aaa/usr/local/bin/scst
make[1]: Leaving directory '/tmp/scst/usr/fileio'
cd stpgd && make install
make[1]: Entering directory '/tmp/scst/usr/stpgd'
install -d ./aaa/usr/local/sbin
install -m 700 stpgd ./aaa/usr/local/sbin
install -m 700 scst_on_stpg ./aaa/usr/local/bin/scst/scst_on_stpg
install: cannot create regular file './aaa/usr/local/bin/scst/scst_on_stpg': No such file or directory
Makefile:60: recipe for target 'install' failed
make[1]: *** [install] Error 1
make[1]: Leaving directory '/tmp/scst/usr/stpgd'
Makefile:32: recipe for target 'install' failed
make: *** [install] Error 2
Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@osnexus.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7403 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-06-04 16:23:45 +00:00
Vladislav Bolkhovitin
8b2fc0949b
Web updates
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7402 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-05-08 02:59:24 +00:00
Bart Van Assche
91f9113cd9
Makefile: Add a missing -q option to a grep command
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7401 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-05-05 08:42:44 +00:00
Bart Van Assche
753b670a39
scst: Unbreak the build on Debian systems
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7400 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-05-05 08:41:51 +00:00
Bart Van Assche
b973e9fafe
scst: Port to RHEL 7.5
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7399 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-05-03 13:26:40 +00:00
Bart Van Assche
4bbb8704b1
rpm, dpkg: Make sure that all necessary directories are created after installation
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7398 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-04-23 17:35:44 +00:00
Vladislav Bolkhovitin
aad75ec75f
Web updates
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7397 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-04-12 04:09:29 +00:00
Vladislav Bolkhovitin
f549829482
Copyrights updated
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7396 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-04-12 03:49:10 +00:00
Vladislav Bolkhovitin
0db74a2dde
Web updates
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7395 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-04-11 06:36:43 +00:00
Vladislav Bolkhovitin
c4125d9b26
Web updates
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7394 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-04-03 01:48:14 +00:00
Vladislav Bolkhovitin
145fcda5c0
README update to reflect recent QLogic git release
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7393 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-03-31 05:32:24 +00:00
Vladislav Bolkhovitin
d67c8d644c
QLogic web updates
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7392 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-03-31 05:30:57 +00:00
Vladislav Bolkhovitin
dae3ec0e83
Updates to support new QLogic git driver
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7391 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-03-31 03:49:15 +00:00
Bart Van Assche
be7e2097c9
scst_vdisk: Fix spelling in an error message
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7390 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-03-21 16:58:36 +00:00
Bart Van Assche
1bcb712213
scst.spec: Fix depmod path
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7389 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-03-08 06:01:49 +00:00