Commit Graph

8532 Commits

Author SHA1 Message Date
Bart Van Assche
6dd60c4bb1 www/Makefile: Add this file to the repository
Make it easy to check HTML-compliance of the SCST website.
2021-12-19 20:06:24 -08:00
Gilbert Standen
53d5d68f01 Update INSTALL.md 2021-12-19 20:04:34 -08:00
Bart Van Assche
39f5c343b8 scst/ChangeLog: Summarize the changes for the upcoming 3.6 release 2021-12-17 15:51:20 -08:00
Chesnokov Gleb
50d607a336 isert-scst: Enable copying to user space from isert_cmnd_cache
This patch fixes warning with call trace that occurs during
copy_to_user() from isert_read():

usercopy: Kernel memory exposure attempt detected from SLUB object 'sgv-clust-64K' (offset 200, size 48)!
------------[ cut here ]------------
kernel BUG at mm/usercopy.c:99!
...
RIP: 0010:usercopy_abort+0x7b/0x7d
Call Trace:
 __check_heap_object+0xdf/0x110
 __check_object_size.part.0+0x128/0x150
 __check_object_size+0x1c/0x20
 isert_read+0x10b/0x380 [isert_scst]
 ? security_file_permission+0x96/0x160
 vfs_read+0x9f/0x190
 ksys_read+0x67/0xe0
 __x64_sys_read+0x19/0x20
 do_syscall_64+0x61/0xb0
 ? __x64_sys_sendto+0x24/0x30
 ? do_syscall_64+0x6e/0xb0
 ? exit_to_user_mode_prepare+0x37/0xb0
 ? syscall_exit_to_user_mode+0x27/0x50
 ? do_syscall_64+0x6e/0xb0
 ? asm_exc_page_fault+0x8/0x30
 entry_SYSCALL_64_after_hwframe+0x44/0xae

Signed-off-by: Morozov Ilia <morozov.i@raidix.com>
2021-12-16 00:43:44 +03:00
Chesnokov Gleb
475970f66a Minor fixes for the previous commit 2021-12-16 00:43:44 +03:00
Chesnokov Gleb
1efde3fe98 Revert "scst: Enable copying to user space from an SGV cache"
This reverts commit 0c4f769c0e.
2021-12-16 00:43:44 +03:00
Chesnokov Gleb
37de84607c Fix sender name for github Mailing list action 2021-12-15 16:43:44 +03:00
Chesnokov Gleb
3f17045397 nightly build: Update kernel versions 2021-12-14 20:49:36 +03:00
Chesnokov Gleb
a08e8b8b35 vdisk_fileio, async mode: Support multi-page sgv's for kernels < v5.1 2021-12-08 21:44:58 +03:00
Chesnokov Gleb
414805bb4d vdisk_fileio, async_mode: Fix scheduling while atomic
This patch should fix the following bug:

BUG: scheduling while atomic: ...
...
Call Trace:
 <IRQ>
 dump_stack+0x6d/0x8b
 __schedule_bug.cold.94+0x4c/0x5a
 __schedule+0x51d/0x606
 schedule+0x33/0x9a
 __lock_sock+0x7d/0xbc
 ? finish_wait+0x80/0x78
 lock_sock_nested+0x64/0x66
 do_tcp_setsockopt.isra.47+0x7d/0xbc4
 ? scst_free_cmd+0x171/0x220 [scst]
 tcp_setsockopt+0x34/0x36
 sock_common_setsockopt+0x1a/0x1c
 cmnd_tx_start+0x94/0x210 [iscsi_scst]
 iscsi_send+0x2cd/0x800 [iscsi_scst]
 iscsi_tcp_send_locally+0xe9/0x1f0 [iscsi_scst]
 ? iscsi_tcp_send_data_rsp+0x5a/0x90 [iscsi_scst]
 iscsi_xmit_response+0xfe/0x230 [iscsi_scst]
 scst_process_active_cmd+0x742/0x1740 [scst]
 ? try_to_wake_up+0x1dd/0x5ac
 scst_process_redirect_cmd+0x128/0x300 [scst]
 ? insert_work+0xa8/0xc2
 scst_cmd_done_local+0x7f/0x100 [scst]
 ? rvmio_transfer_data+0xb0/0xb0 [scst_vdisk]
 fileio_async_complete+0x46/0x100 [scst_vdisk]
 iomap_dio_complete_work+0x29/0x2e
 iomap_dio_bio_end_io+0xed/0xff
 bio_endio+0xda/0x12e
 blk_update_request+0xea/0x3a1
 scsi_end_request+0x30/0x111
 scsi_io_completion+0x7c/0x4e1
 ? virtscsi_remove+0xc0/0xc0 [virtio_scsi]
 scsi_finish_command+0xe7/0x11a
 scsi_softirq_done+0x75/0xde
 blk_done_softirq+0xa5/0xcd
 __do_softirq+0xe1/0x2e7
 ? sched_clock+0x9/0xd
 irq_exit+0xf3/0xf8
 do_IRQ+0x59/0xe0
 common_interrupt+0xf/0x1d2
 </IRQ>
RIP: 0010:native_safe_halt+0x12/0x14
...
2021-12-08 21:44:58 +03:00
Chesnokov Gleb
33b872d055 vdisk_fileio, async mode: Switch from kvec to bvec
fileio_exec_async() for fileio devices with o_direct flag triggers
the following Linux direct_io datapath:
- fileio_exec_async()      -- ... --> iomap_dio_bio_actor()
- iomap_dio_bio_actor()    -- ... --> bio_iov_iter_get_pages()
- bio_iov_iter_get_pages() -- ... --> iov_iter_get_pages()
- iov_iter_get_pages() returns -EFAULT

iov_iter_get_pages() only handles iovec and bvec iterators.
Its kvec hanlding always return -EFAULT.

We cannot use iovec because calling iov_iter_init() from
the kernel context initializes iov_iter as ITER_KVEC.

Thus, use bvecs for fileio async direct IO.

Reported-by: Lu Chang
2021-12-08 21:44:58 +03:00
Chesnokov Gleb
9d7cf27c7c Makefile: Fix the scst-rpm build
Fixes: 1cfa1e7f87 ("Makefile: switch to qla-32gbit by default")
2021-12-07 00:18:44 +03:00
Chesnokov Gleb
43aa0de32a Add a github action to send mail to the SCST mailing list upon push 2021-12-03 15:33:05 +03:00
Bart Van Assche
32fd54f3ef fcst: Fix the Debian 10 build
The line in /lib/modules/4.19.0-18-amd64/build/Makefile on Debian 10 with
the path to the header files is as follows:

MAKEARGS := -C /usr/src/linux-headers-4.19.0-18-common O=/usr/src/linux-headers-4.19.0-18-amd64

while on Debian 11 the contenst of /lib/modules/5.10.0-8-amd64/build/Makefile
is as follows:

include /usr/src/linux-headers-5.10.0-8-common/Makefile

Add support for extracting the header file directory path from the Debian
10 Makefile.

Fixes: https://github.com/bvanassche/scst/issues/52
2021-12-02 20:31:44 -08:00
Bart Van Assche
bdb099dfce Merge branch 'svn-trunk' 2021-11-30 22:00:55 -08:00
Bart Van Assche
769cb7fb26 fcst: Fix the build for Debian systems
Fixes: https://github.com/bvanassche/scst/issues/52


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9610 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-12-01 06:00:49 +00:00
Bart Van Assche
a20b6e0fae nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9609 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-27 04:27:14 +00:00
Bart Van Assche
2715ea074a Merge branch 'svn-trunk' 2021-11-24 17:05:04 -08:00
Bart Van Assche
876aa192c8 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9608 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-25 01:04:58 +00:00
Bart Van Assche
9ed4967478 scripts/run-regression-tests: Exclude LIO from the build
Additionally, use make -j to speed up compilation.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9607 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-25 01:04:37 +00:00
Bart Van Assche
e49a874fab Merge branch 'svn-trunk' 2021-11-24 16:39:28 -08:00
Bart Van Assche
5e313fddf4 fcst: Rework the fc_fill_fc_hdr() compatibility check
Decide which SCSI header file to include based on a compile time check instead
of trying to derive that choice from the UEK kernel version.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9606 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-25 00:39:17 +00:00
Bart Van Assche
49870b2348 scst_lib: Remove dead code
Since block_shift is unsigned, it can never be negative. See also commit
1e95312e49 ("Reenable block_shift calculation for tapes").


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9605 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-25 00:37:08 +00:00
Bart Van Assche
69953b3398 Merge branch 'svn-trunk' 2021-11-23 20:45:27 -08:00
Bart Van Assche
20076add1b nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9604 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-24 04:45:22 +00:00
Bart Van Assche
999cbccf33 Merge branch 'svn-trunk' 2021-11-23 20:35:20 -08:00
Bart Van Assche
b5fb6add87 fcst: Port to the latest UEK 7 kernel
Apparently the UEK 8 FC patches have been ported to UEK 7. Make fcst build
against the latest UEK7 and UEK 8 kernels. This patch breaks compatibility
with older UEK 7 5.4.17 kernels.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9603 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-24 04:35:10 +00:00
Bart Van Assche
2a1859b107 scst: Minimize diffs with the Subversion trunk 2021-11-22 20:57:22 -08:00
Bart Van Assche
c0dfd7594b Merge branch 'svn-trunk' 2021-11-22 20:53:55 -08:00
Bart Van Assche
0d025a2e1e scripts: Add support for the UEK_RELEASE macro
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9602 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-23 04:53:45 +00:00
Bart Van Assche
d37a0f2254 Merge branch 'svn-trunk' 2021-11-22 20:28:49 -08:00
Bart Van Assche
3a39e5a124 fcst: Support both UEK 7 and UEK 8
r9586+r9587 added support for UEK 8 but broke support for UEK 7. Since as
far as I know no compile-time constants are available in UEK that allow to
tell the difference between the UEK 7 and UEK 8 5.4.17 kernels, extract the
UEK release number from the name of the directory with the kernel build
infrastructure.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9601 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-23 04:28:40 +00:00
Bart Van Assche
92239c13d9 Merge branch 'svn-trunk' 2021-11-21 19:50:49 -08:00
Bart Van Assche
6b8b4a8004 qla2x00t: Port to Linux kernel v5.16
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9600 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-22 03:49:47 +00:00
Bart Van Assche
af579d68c3 scst_local: Port to Linux kernel v5.16
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9599 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-22 03:48:38 +00:00
Bart Van Assche
0f9f9eeb3a scst: Port to Linux kernel v5.16
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9598 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-22 03:48:08 +00:00
Bart Van Assche
c8b3b06b2b scst: Backport the scsi_done() function
The scsi_done() function is new in kernel v5.16. Backport it to older
kernel versions.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9597 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-22 03:47:29 +00:00
Bart Van Assche
47ba05f2a7 scst_vdisk: Rework the most recent fix
Instead of making vdev_open_fd() check the dev_active flag, let the callers
of this function check that flag. This patch does not change the behavior of
the scst_vdisk driver.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9596 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-22 03:44:44 +00:00
Bart Van Assche
171b1d54e8 scst_vdisk: Restore support for adding a block device with non-existent filename
This patch is a fix for commit df4c250b8d ("scst_vdisk: Port to Linux
kernel v5.11").


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9595 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-22 03:43:47 +00:00
Bart Van Assche
965f51a1c9 Merge pull request #51 from eshishkov1/master
scst_vdisk: Restore support for adding a block device with non-existent filename

This patch is a fix for commit df4c250b8d ("scst_vdisk: Port to Linux
kernel v5.11").
2021-11-20 15:48:34 -08:00
e.shishkov
cd8b5a3c86 FIX: Cannot add inactive block-device with unexistent filename 2021-11-10 16:51:20 +03:00
Bart Van Assche
0b0fd470b8 Merge branch 'svn-trunk' 2021-11-03 17:43:01 -07:00
Bart Van Assche
09168f5186 scst_dlm: Warn if kernel_read() can't read from configfs files
See also upstream commit 7fe1e79b59ba ("configfs: implement the .read_iter
and .write_iter methods"; v5.14).



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9594 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-04 00:42:39 +00:00
Bart Van Assche
d327fe38e8 Merge branch 'svn-trunk' 2021-11-03 07:29:50 -07:00
Bart Van Assche
193e63d118 qla2x00t: Port to Linux kernel v5.15
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9593 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-03 14:29:35 +00:00
Bart Van Assche
8a2352239b scst_local: Port to Linux kernel v5.15
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9592 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-03 14:29:16 +00:00
Bart Van Assche
5b9aca3f03 scst: Port to Linux kernel v5.15
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9591 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-03 14:28:56 +00:00
Bart Van Assche
567a1d5a35 qla2x00t*: Fix a 'make' invocation
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9590 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-03 14:27:57 +00:00
Bart Van Assche
e289587783 Merge branch 'svn-trunk' 2021-10-31 18:34:51 -07:00
Bart Van Assche
0c4f769c0e scst: Enable copying to user space from an SGV cache
This patch should fix the following kernel warning:

usercopy: Kernel memory exposure attempt detected from SLUB object 'sgv-clust-64K' (offset 200, size 48)!
 ------------[ cut here ]------------
kernel BUG at mm/usercopy.c:99!
invalid opcode: 0000 [#1] SMP PTI
CPU: 0 PID: 2645 Comm: iscsi-scstd Tainted: P          IOE     5.13.0-20-generic #20-Ubuntu
Hardware name: Dell Inc. PowerEdge R740xd/07X9K0, BIOS 2.12.2 07/09/2021
RIP: 0010:usercopy_abort+0x7b/0x7d
Call Trace:
 __check_heap_object+0xdf/0x110
 __check_object_size.part.0+0x128/0x150
 __check_object_size+0x1c/0x20
 isert_read+0x10b/0x380 [isert_scst]
 vfs_read+0x9f/0x190
 ksys_read+0x67/0xe0
 __x64_sys_read+0x19/0x20
 do_syscall_64+0x61/0xb0
 entry_SYSCALL_64_after_hwframe+0x44/0xae



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9589 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-11-01 01:28:33 +00:00