Bart Van Assche
ee94569268
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7469 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-09 14:05:04 +00:00
Vladislav Bolkhovitin
74b2ae36e2
qla2x00t: fix possible crash with DLM PR sync enabled
...
Reported-By: Aaron Knister <aaron.s.knister@nasa.gov >
Analyzed-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7468 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-08 22:25:43 +00:00
Bart Van Assche
546c6c6ebe
qla2x00t: Various coding style fixes
...
This patch does not change any functionality.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7467 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-08 04:14:54 +00:00
Bart Van Assche
f1463d0606
scst: Leave a blank line after declarations
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7466 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-08 04:13:42 +00:00
Vladislav Bolkhovitin
166dac3bb9
Web updates
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7465 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-04 00:45:33 +00:00
Vladislav Bolkhovitin
16b4f4aba5
scst: cleanup follow up for r7449
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7464 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-03 04:23:36 +00:00
Bart Van Assche
acc205d174
qla2x00t: Use %zd instead of %Zd
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7463 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-03 03:38:23 +00:00
Bart Van Assche
1a4f34578d
qla2x00t: Improve conformance with the coding standard further
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7462 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-03 03:37:32 +00:00
Bart Van Assche
8c2a32f3af
qla2x00t: Insert a space where the coding standard requires one
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7461 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-03 03:30:20 +00:00
Bart Van Assche
10961c3dfd
qla2x00t: Insert a space where the coding standard requires one
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7460 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-03 03:25:06 +00:00
Bart Van Assche
1ac05eb695
qla2x00t: Remove spaces where these are not allowed by the coding standard
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7459 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-03 03:19:17 +00:00
Bart Van Assche
d07888d5f9
qla2x00t: Change return (x) into return x
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7458 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-03 03:09:58 +00:00
Bart Van Assche
1b18174c12
qla2x00t: Fix if/else coding style
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7457 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-03 03:01:04 +00:00
Bart Van Assche
30cf7b4bda
qla2x00t: Fix more checkpatch complaints about whitespace
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7456 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-02 04:47:08 +00:00
Bart Van Assche
1c4649556d
qla2x00t: Do not initialise globals/statics to 0. Detected by checkpatch.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7455 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-02 04:44:00 +00:00
Bart Van Assche
30c84b1282
qla2x00t: Do not initialise globals/statics to 0. Detected by checkpatch.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7454 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-02 04:42:42 +00:00
Bart Van Assche
5f478050ae
qla2x00t: Fix checkpatch complaints about using spaces for indentation
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7453 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-02 04:41:04 +00:00
Bart Van Assche
a6d7968bd9
qla2x00t: Avoid that checkpatch complains that (foo*) should be (foo *)
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7452 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-02 04:27:58 +00:00
Bart Van Assche
8c3a885e4d
qla2x00t: Fix spelling errors
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7451 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-02 04:19:35 +00:00
Bart Van Assche
458cf2ee00
scst/include/scst.h: Port to Linux kernel v4.18
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7450 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-02 03:58:47 +00:00
Bart Van Assche
6dc06a3cde
scst, isert-scst: Revert the temporary kernel v4.16 workarounds
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7449 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-01 04:44:20 +00:00
Bart Van Assche
2c4d50d067
scst/kernel/in-tree/Makefile.dev_handlers: Make sure that the CONFIG_SCST_* symbols are honored
...
This patch is based on a patch from Pascal de Bruijn.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7448 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-01 04:29:10 +00:00
Bart Van Assche
8f8f055dfa
scst dev_handlers Makefile: Simplify this Makefile
...
None of the CONFIG_SCST_* symbols are defined in the regular SCST build.
Hence remove the rules that depend on these symbols.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7447 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-01 04:27:57 +00:00
Vladislav Bolkhovitin
4483ecf49a
vdisk: Fix compilation for older compilers
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7446 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-01 02:36:52 +00:00
Bart Van Assche
e8c99bf813
scst: Simplify blk_make_request() and blk_map_kern_sg()
...
For kernel versions >= 4.11.0, pass REQ_OP_SCSI_* as second argument
to blk_get_request() instead of READ or WRITE and setting REQ_OP_SCSI_*
later. For kernels < 4.11.0, instead of calling blk_rq_set_block_pc()
directly, call it indirectly through scsi_req_init().
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7445 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-29 04:43:50 +00:00
Bart Van Assche
b1b5e8e497
isert-scst: Avoid that building against MOFED fails with "Unknown symbol backport_dependency_symbol"
...
Reported-by: Carsten Aulbert <carsten.aulbert@aei.mpg.de >
Signed-off-by: Sergey Gorenko <sergeygo@mellanox.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7444 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-24 03:17:05 +00:00
Bart Van Assche
d67f20abfb
scst/include/backport.h: Unbreak the build for kernel version 2.6.30 and older
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7443 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-24 02:38:35 +00:00
Bart Van Assche
6864e0b759
scripts/run-regression-tests: Include the qla2xxx driver
...
Make sure that not only the qla2x00tgt but also the qla2xxx_scst driver
gets built when scripts/run-regression-tests is run.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7442 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-23 04:32:28 +00:00
Bart Van Assche
30d36bbfe6
scripts/generate-kernel-patch: Make the patch format more standard
...
Make sure that both paths in the diff header have the same number of
components. This patch does not change the result of applying a patch
generated by this script.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7441 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-23 04:31:00 +00:00
Bart Van Assche
953b86a9a2
scripts/specialize-patch: Add a comment
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7440 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-23 04:29:55 +00:00
Bart Van Assche
1c1693d06b
qla2x00t: Port to Linux kernel v4.17
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7439 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-23 04:29:35 +00:00
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