2021-08-21 20:33:20 +08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-09-05 15:29:12 -07:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2013-09-05 15:29:12 -07:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-28 11:35:41 -07:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
|
|
|
|
|
2024-10-01 15:35:57 -04:00
|
|
|
|
2015-05-08 10:11:12 +02:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-06 14:36:13 +08:00
|
|
|
|
tcm_vhost: Multi-queue support
This adds virtio-scsi multi-queue support to tcm_vhost. In order to use
multi-queue, guest side multi-queue support is need. It can
be found here:
https://lkml.org/lkml/2012/12/18/166
Currently, only one thread is created by vhost core code for each
vhost_scsi instance. Even if there are multi-queues, all the handling of
guest kick (vhost_scsi_handle_kick) are processed in one thread. This is
not optimal. Luckily, most of the work is offloaded to the tcm_vhost
workqueue.
Some initial perf numbers:
1 queue, 4 targets, 1 lun per target
4K request size, 50% randread + 50% randwrite: 127K/127k IOPS
4 queues, 4 targets, 1 lun per target
4K request size, 50% randread + 50% randwrite: 181K/181k IOPS
Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2013-02-06 13:20:59 +08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2013-05-02 03:50:34 +03:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-08-08 13:29:55 -06:00
|
|
|
|
2024-12-03 13:15:15 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-02 03:50:34 +03:00
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-28 11:33:53 -07:00
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-05-17 00:29:49 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-02 03:50:34 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-05-02 03:50:34 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-22 18:34:43 -08:00
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
2024-12-03 13:15:14 -06:00
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:15 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-02 03:50:34 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:51 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-02 03:50:34 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-05-02 03:50:34 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-05-02 03:50:34 +03:00
|
|
|
|
|
|
|
|
|
2025-06-11 07:39:21 -07:00
|
|
|
|
2013-05-02 03:50:34 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-28 00:03:51 -07:00
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-05-02 03:50:34 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-02 03:50:34 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-05-02 03:50:34 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
|
|
|
|
|
2013-05-02 03:50:34 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-05-02 03:50:34 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2012-07-30 13:30:00 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-23 18:01:34 +02:00
|
|
|
|
2025-11-13 17:42:05 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-27 17:23:41 -07:00
|
|
|
|
|
|
|
|
|
2025-11-13 17:42:05 -05:00
|
|
|
|
|
|
|
|
|
tcm_vhost: Multi-queue support
This adds virtio-scsi multi-queue support to tcm_vhost. In order to use
multi-queue, guest side multi-queue support is need. It can
be found here:
https://lkml.org/lkml/2012/12/18/166
Currently, only one thread is created by vhost core code for each
vhost_scsi instance. Even if there are multi-queues, all the handling of
guest kick (vhost_scsi_handle_kick) are processed in one thread. This is
not optimal. Luckily, most of the work is offloaded to the tcm_vhost
workqueue.
Some initial perf numbers:
1 queue, 4 targets, 1 lun per target
4K request size, 50% randread + 50% randwrite: 127K/127k IOPS
4 queues, 4 targets, 1 lun per target
4K request size, 50% randread + 50% randwrite: 181K/181k IOPS
Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2013-02-06 13:20:59 +08:00
|
|
|
|
2022-07-07 22:05:25 -05:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
2013-02-05 12:31:57 +08:00
|
|
|
|
2022-07-07 22:05:25 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-27 11:16:48 +08:00
|
|
|
|
|
|
|
|
|
2023-06-26 18:22:59 -05:00
|
|
|
|
2013-04-28 15:38:52 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-27 11:16:49 +08:00
|
|
|
|
2013-04-28 15:38:52 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-27 11:16:49 +08:00
|
|
|
|
2020-11-09 23:33:20 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:08 -06:00
|
|
|
|
2023-06-26 18:22:59 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-27 11:16:48 +08:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2013-02-05 12:31:57 +08:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-02-05 12:31:57 +08:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2022-07-07 22:05:25 -05:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
|
|
|
|
|
2024-03-15 19:47:01 -05:00
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-20 09:50:59 -06:00
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:52 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-03-20 21:06:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-04-27 11:16:49 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-04-27 11:16:49 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-07 22:05:25 -05:00
|
|
|
|
2013-04-27 11:16:49 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-11 07:39:21 -07:00
|
|
|
|
2013-04-27 11:16:49 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-11 07:39:21 -07:00
|
|
|
|
2013-04-27 11:16:49 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-04-27 11:16:49 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-04-27 11:16:49 +08:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-04-27 11:16:49 +08:00
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-28 00:03:51 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:51 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-02-21 20:03:00 -08:00
|
|
|
|
2025-04-02 23:29:51 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:21 -06:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:20 -06:00
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:13 -06:00
|
|
|
|
2020-11-09 23:33:20 -06:00
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
|
|
|
|
|
2014-02-22 18:34:43 -08:00
|
|
|
|
2013-06-06 02:20:41 -07:00
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
2024-12-03 13:15:14 -06:00
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
2013-09-17 22:54:31 +03:00
|
|
|
|
2014-02-22 18:34:43 -08:00
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-22 18:34:43 -08:00
|
|
|
|
2013-06-06 02:20:41 -07:00
|
|
|
|
2024-12-03 13:15:15 -06:00
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:20 -06:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:52 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-03-20 21:06:19 -05:00
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-15 19:47:00 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:21 -06:00
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:21 -06:00
|
|
|
|
2024-03-15 19:47:01 -05:00
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-06-26 18:22:59 -05:00
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
2023-06-26 18:22:59 -05:00
|
|
|
|
2024-03-15 19:47:00 -05:00
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
2020-11-09 23:33:21 -06:00
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2020-11-09 23:33:21 -06:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2020-11-09 23:33:21 -06:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-20 09:50:59 -06:00
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2014-03-22 14:55:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
|
|
|
|
|
2013-05-06 16:38:27 +08:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
2013-04-27 11:16:48 +08:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-23 18:01:34 +02:00
|
|
|
|
|
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-06 02:20:41 -07:00
|
|
|
|
|
|
|
|
|
2015-04-27 13:52:36 +02:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2013-05-06 16:38:27 +08:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
2013-04-27 11:16:48 +08:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:53 -07:00
|
|
|
|
|
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-31 21:27:57 +02:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-05 15:20:27 +03:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
2025-04-02 23:29:53 -07:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-23 18:01:34 +02:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2025-04-02 23:29:53 -07:00
|
|
|
|
|
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
|
|
|
|
|
2024-03-15 19:46:59 -05:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
2013-04-27 11:16:48 +08:00
|
|
|
|
2017-05-12 09:42:56 +09:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-12 09:42:56 +09:00
|
|
|
|
2024-03-15 19:46:59 -05:00
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-15 19:46:59 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:14 -06:00
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-06-26 18:22:59 -05:00
|
|
|
|
|
|
|
|
|
2013-01-06 14:36:13 +08:00
|
|
|
|
2017-11-09 09:00:21 +09:00
|
|
|
|
2013-01-06 14:36:13 +08:00
|
|
|
|
|
|
|
|
|
2015-01-27 13:13:12 -08:00
|
|
|
|
2023-06-26 18:22:59 -05:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2023-06-26 18:22:59 -05:00
|
|
|
|
2025-04-02 23:29:46 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-11-09 09:00:21 +09:00
|
|
|
|
2013-05-06 16:38:29 +08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2013-05-06 16:38:29 +08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
2024-12-03 13:15:14 -06:00
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-27 13:13:12 -08:00
|
|
|
|
2024-12-03 13:15:15 -06:00
|
|
|
|
|
|
|
|
|
2015-01-27 13:13:12 -08:00
|
|
|
|
|
|
|
|
|
2023-06-26 18:22:59 -05:00
|
|
|
|
|
|
|
|
|
2013-05-06 16:38:29 +08:00
|
|
|
|
tcm_vhost: Multi-queue support
This adds virtio-scsi multi-queue support to tcm_vhost. In order to use
multi-queue, guest side multi-queue support is need. It can
be found here:
https://lkml.org/lkml/2012/12/18/166
Currently, only one thread is created by vhost core code for each
vhost_scsi instance. Even if there are multi-queues, all the handling of
guest kick (vhost_scsi_handle_kick) are processed in one thread. This is
not optimal. Luckily, most of the work is offloaded to the tcm_vhost
workqueue.
Some initial perf numbers:
1 queue, 4 targets, 1 lun per target
4K request size, 50% randread + 50% randwrite: 127K/127k IOPS
4 queues, 4 targets, 1 lun per target
4K request size, 50% randread + 50% randwrite: 181K/181k IOPS
Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2013-02-06 13:20:59 +08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:51 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:21 -06:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:46 -07:00
|
|
|
|
|
|
|
|
|
2023-06-26 18:22:59 -05:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2024-12-03 13:15:13 -06:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2020-11-09 23:33:20 -06:00
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
2025-04-02 23:29:51 -07:00
|
|
|
|
2020-11-09 23:33:20 -06:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2021-01-22 10:33:08 +08:00
|
|
|
|
2013-09-23 11:42:28 -07:00
|
|
|
|
2024-12-03 13:15:10 -06:00
|
|
|
|
2013-09-23 11:42:28 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:20 -06:00
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:51 -07:00
|
|
|
|
2017-05-20 13:48:44 +02:00
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:51 -07:00
|
|
|
|
2013-06-07 17:47:46 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2013-05-06 16:38:29 +08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-06 16:38:27 +08:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2017-09-24 22:07:59 -04:00
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
|
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2024-12-03 13:15:08 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-22 11:20:27 +08:00
|
|
|
|
2022-06-09 10:28:36 -04:00
|
|
|
|
2017-09-24 22:07:59 -04:00
|
|
|
|
2013-01-22 11:20:27 +08:00
|
|
|
|
2017-09-24 22:07:59 -04:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2017-09-24 22:07:59 -04:00
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
|
|
|
|
|
2017-09-24 22:07:59 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
2017-09-24 22:07:59 -04:00
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2013-05-06 16:38:27 +08:00
|
|
|
|
2015-01-28 00:15:00 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-01-28 00:15:00 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2023-03-29 08:52:15 -06:00
|
|
|
|
2015-01-28 00:15:00 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-22 18:34:08 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-01-28 00:15:00 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-01-28 00:15:00 -08:00
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
2024-12-03 13:15:13 -06:00
|
|
|
|
|
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
2024-12-03 13:15:11 -06:00
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
2024-12-03 13:15:13 -06:00
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2024-12-03 13:15:14 -06:00
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
2024-12-03 13:15:14 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:11 -06:00
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
2024-12-03 13:15:13 -06:00
|
|
|
|
2024-12-03 13:15:11 -06:00
|
|
|
|
|
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
2024-12-03 13:15:11 -06:00
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:14 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:11 -06:00
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-07-09 15:28:59 -05:00
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
2015-01-28 00:15:00 -08:00
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
2017-09-24 22:07:59 -04:00
|
|
|
|
2014-02-22 18:34:08 -08:00
|
|
|
|
2017-09-24 22:07:59 -04:00
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-07-09 15:28:58 -05:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-22 18:34:43 -08:00
|
|
|
|
2024-12-03 13:15:13 -06:00
|
|
|
|
2015-01-28 00:15:00 -08:00
|
|
|
|
2024-12-03 13:15:13 -06:00
|
|
|
|
2014-02-22 18:34:43 -08:00
|
|
|
|
2015-01-28 00:15:00 -08:00
|
|
|
|
2014-02-22 18:34:43 -08:00
|
|
|
|
2015-01-28 00:15:00 -08:00
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-22 18:34:43 -08:00
|
|
|
|
2015-01-28 00:15:00 -08:00
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
2014-02-22 18:34:43 -08:00
|
|
|
|
2023-07-09 15:28:59 -05:00
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
2023-07-09 15:28:59 -05:00
|
|
|
|
2014-02-22 18:34:43 -08:00
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
|
|
|
|
|
2014-02-22 18:34:43 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-28 00:15:00 -08:00
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2015-01-28 00:15:00 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-28 00:15:00 -08:00
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
2015-01-28 00:15:00 -08:00
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
2023-07-09 15:28:59 -05:00
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:13 -06:00
|
|
|
|
2015-01-28 00:15:00 -08:00
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
2015-01-28 00:15:00 -08:00
|
|
|
|
|
|
|
|
|
2014-02-22 18:34:43 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-21 10:42:08 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2013-05-06 16:38:29 +08:00
|
|
|
|
2014-02-22 18:22:31 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2014-02-22 18:22:31 -08:00
|
|
|
|
2013-05-06 16:38:29 +08:00
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
2014-02-22 18:22:31 -08:00
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
2014-02-22 18:22:31 -08:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-14 13:26:44 +02:00
|
|
|
|
2024-12-03 13:15:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
scsi: target: vhost-scsi: Convert to new submission API
target_submit_cmd_map_sgls() is being removed, so convert vhost-scsi to the
new submission API. This has it use target_init_cmd(),
target_submit_prep(), target_submit() because we need to have LIO core map
sgls which is now done in target_submit_prep(), and in the next patches we
will do the target_submit step from the LIO workqueue.
Note: vhost-scsi never calls target_stop_session() so
target_submit_cmd_map_sgls() never failed (in the new API target_init_cmd()
handles target_stop_session() being called when cmds are being
submitted). If it were to have used target_stop_session() and got an error,
we would have hit a refcount bug like xen and usb, because it does:
if (rc < 0) {
transport_send_check_condition_and_sense(se_cmd,
TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE, 0);
transport_generic_free_cmd(se_cmd, 0);
}
transport_send_check_condition_and_sense() calls queue_status which does
transport_generic_free_cmd(), and then we do an extra
transport_generic_free_cmd() call above which would have dropped the
refcount to -1 and the refcount code would spit out errors.
Link: https://lore.kernel.org/r/20210227170006.5077-12-michael.christie@oracle.com
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-02-27 10:59:52 -06:00
|
|
|
|
2024-12-03 13:15:13 -06:00
|
|
|
|
scsi: target: vhost-scsi: Convert to new submission API
target_submit_cmd_map_sgls() is being removed, so convert vhost-scsi to the
new submission API. This has it use target_init_cmd(),
target_submit_prep(), target_submit() because we need to have LIO core map
sgls which is now done in target_submit_prep(), and in the next patches we
will do the target_submit step from the LIO workqueue.
Note: vhost-scsi never calls target_stop_session() so
target_submit_cmd_map_sgls() never failed (in the new API target_init_cmd()
handles target_stop_session() being called when cmds are being
submitted). If it were to have used target_stop_session() and got an error,
we would have hit a refcount bug like xen and usb, because it does:
if (rc < 0) {
transport_send_check_condition_and_sense(se_cmd,
TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE, 0);
transport_generic_free_cmd(se_cmd, 0);
}
transport_send_check_condition_and_sense() calls queue_status which does
transport_generic_free_cmd(), and then we do an extra
transport_generic_free_cmd() call above which would have dropped the
refcount to -1 and the refcount code would spit out errors.
Link: https://lore.kernel.org/r/20210227170006.5077-12-michael.christie@oracle.com
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-02-27 10:59:52 -06:00
|
|
|
|
2021-02-27 10:59:56 -06:00
|
|
|
|
scsi: target: vhost-scsi: Convert to new submission API
target_submit_cmd_map_sgls() is being removed, so convert vhost-scsi to the
new submission API. This has it use target_init_cmd(),
target_submit_prep(), target_submit() because we need to have LIO core map
sgls which is now done in target_submit_prep(), and in the next patches we
will do the target_submit step from the LIO workqueue.
Note: vhost-scsi never calls target_stop_session() so
target_submit_cmd_map_sgls() never failed (in the new API target_init_cmd()
handles target_stop_session() being called when cmds are being
submitted). If it were to have used target_stop_session() and got an error,
we would have hit a refcount bug like xen and usb, because it does:
if (rc < 0) {
transport_send_check_condition_and_sense(se_cmd,
TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE, 0);
transport_generic_free_cmd(se_cmd, 0);
}
transport_send_check_condition_and_sense() calls queue_status which does
transport_generic_free_cmd(), and then we do an extra
transport_generic_free_cmd() call above which would have dropped the
refcount to -1 and the refcount code would spit out errors.
Link: https://lore.kernel.org/r/20210227170006.5077-12-michael.christie@oracle.com
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-02-27 10:59:52 -06:00
|
|
|
|
|
|
|
|
|
2023-09-27 21:09:05 -05:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:10 -06:00
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:48 -07:00
|
|
|
|
2024-12-03 13:15:10 -06:00
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:48 -07:00
|
|
|
|
2024-12-03 13:15:10 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:48 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:10 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-06 16:38:27 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:47 -07:00
|
|
|
|
2013-04-10 15:06:15 +08:00
|
|
|
|
2025-04-02 23:29:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-10 15:06:15 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-10 15:06:15 +08:00
|
|
|
|
2025-04-02 23:29:47 -07:00
|
|
|
|
2013-04-10 15:06:15 +08:00
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:50 -07:00
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:50 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:50 -07:00
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:49 -07:00
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-15 20:25:47 -04:00
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:49 -07:00
|
|
|
|
2018-12-13 09:10:14 +08:00
|
|
|
|
2018-09-17 17:09:49 -07:00
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:49 -07:00
|
|
|
|
vhost/scsi: null-ptr-dereference in vhost_scsi_get_req()
Since commit 3f8ca2e115e5 ("vhost/scsi: Extract common handling code
from control queue handler") a null pointer dereference bug can be
triggered when guest sends an SCSI AN request.
In vhost_scsi_ctl_handle_vq(), `vc.target` is assigned with
`&v_req.tmf.lun[1]` within a switch-case block and is then passed to
vhost_scsi_get_req() which extracts `vc->req` and `tpg`. However, for
a `VIRTIO_SCSI_T_AN_*` request, tpg is not required, so `vc.target` is
set to NULL in this branch. Later, in vhost_scsi_get_req(),
`vc->target` is dereferenced without being checked, leading to a null
pointer dereference bug. This bug can be triggered from guest.
When this bug occurs, the vhost_worker process is killed while holding
`vq->mutex` and the corresponding tpg will remain occupied
indefinitely.
Below is the KASAN report:
Oops: general protection fault, probably for non-canonical address
0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 PID: 840 Comm: poc Not tainted 6.10.0+ #1
Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS
1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:vhost_scsi_get_req+0x165/0x3a0
Code: 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 2b 02 00 00
48 b8 00 00 00 00 00 fc ff df 4d 8b 65 30 4c 89 e2 48 c1 ea 03 <0f> b6
04 02 4c 89 e2 83 e2 07 38 d0 7f 08 84 c0 0f 85 be 01 00 00
RSP: 0018:ffff888017affb50 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff88801b000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff888017affcb8
RBP: ffff888017affb80 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: ffff888017affc88 R14: ffff888017affd1c R15: ffff888017993000
FS: 000055556e076500(0000) GS:ffff88806b100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000200027c0 CR3: 0000000010ed0004 CR4: 0000000000370ef0
Call Trace:
<TASK>
? show_regs+0x86/0xa0
? die_addr+0x4b/0xd0
? exc_general_protection+0x163/0x260
? asm_exc_general_protection+0x27/0x30
? vhost_scsi_get_req+0x165/0x3a0
vhost_scsi_ctl_handle_vq+0x2a4/0xca0
? __pfx_vhost_scsi_ctl_handle_vq+0x10/0x10
? __switch_to+0x721/0xeb0
? __schedule+0xda5/0x5710
? __kasan_check_write+0x14/0x30
? _raw_spin_lock+0x82/0xf0
vhost_scsi_ctl_handle_kick+0x52/0x90
vhost_run_work_list+0x134/0x1b0
vhost_task_fn+0x121/0x350
...
</TASK>
---[ end trace 0000000000000000 ]---
Let's add a check in vhost_scsi_get_req.
Fixes: 3f8ca2e115e5 ("vhost/scsi: Extract common handling code from control queue handler")
Signed-off-by: Haoran Zhang <wh1sper@zju.edu.cn>
[whitespace fixes]
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Message-Id: <b26d7ddd-b098-4361-88f8-17ca7f90adf7@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2024-10-01 15:14:15 -05:00
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
vhost/scsi: null-ptr-dereference in vhost_scsi_get_req()
Since commit 3f8ca2e115e5 ("vhost/scsi: Extract common handling code
from control queue handler") a null pointer dereference bug can be
triggered when guest sends an SCSI AN request.
In vhost_scsi_ctl_handle_vq(), `vc.target` is assigned with
`&v_req.tmf.lun[1]` within a switch-case block and is then passed to
vhost_scsi_get_req() which extracts `vc->req` and `tpg`. However, for
a `VIRTIO_SCSI_T_AN_*` request, tpg is not required, so `vc.target` is
set to NULL in this branch. Later, in vhost_scsi_get_req(),
`vc->target` is dereferenced without being checked, leading to a null
pointer dereference bug. This bug can be triggered from guest.
When this bug occurs, the vhost_worker process is killed while holding
`vq->mutex` and the corresponding tpg will remain occupied
indefinitely.
Below is the KASAN report:
Oops: general protection fault, probably for non-canonical address
0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 PID: 840 Comm: poc Not tainted 6.10.0+ #1
Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS
1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:vhost_scsi_get_req+0x165/0x3a0
Code: 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 2b 02 00 00
48 b8 00 00 00 00 00 fc ff df 4d 8b 65 30 4c 89 e2 48 c1 ea 03 <0f> b6
04 02 4c 89 e2 83 e2 07 38 d0 7f 08 84 c0 0f 85 be 01 00 00
RSP: 0018:ffff888017affb50 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff88801b000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff888017affcb8
RBP: ffff888017affb80 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: ffff888017affc88 R14: ffff888017affd1c R15: ffff888017993000
FS: 000055556e076500(0000) GS:ffff88806b100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000200027c0 CR3: 0000000010ed0004 CR4: 0000000000370ef0
Call Trace:
<TASK>
? show_regs+0x86/0xa0
? die_addr+0x4b/0xd0
? exc_general_protection+0x163/0x260
? asm_exc_general_protection+0x27/0x30
? vhost_scsi_get_req+0x165/0x3a0
vhost_scsi_ctl_handle_vq+0x2a4/0xca0
? __pfx_vhost_scsi_ctl_handle_vq+0x10/0x10
? __switch_to+0x721/0xeb0
? __schedule+0xda5/0x5710
? __kasan_check_write+0x14/0x30
? _raw_spin_lock+0x82/0xf0
vhost_scsi_ctl_handle_kick+0x52/0x90
vhost_run_work_list+0x134/0x1b0
vhost_task_fn+0x121/0x350
...
</TASK>
---[ end trace 0000000000000000 ]---
Let's add a check in vhost_scsi_get_req.
Fixes: 3f8ca2e115e5 ("vhost/scsi: Extract common handling code from control queue handler")
Signed-off-by: Haoran Zhang <wh1sper@zju.edu.cn>
[whitespace fixes]
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Message-Id: <b26d7ddd-b098-4361-88f8-17ca7f90adf7@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2024-10-01 15:14:15 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-11 16:01:13 -05:00
|
|
|
|
vhost/scsi: null-ptr-dereference in vhost_scsi_get_req()
Since commit 3f8ca2e115e5 ("vhost/scsi: Extract common handling code
from control queue handler") a null pointer dereference bug can be
triggered when guest sends an SCSI AN request.
In vhost_scsi_ctl_handle_vq(), `vc.target` is assigned with
`&v_req.tmf.lun[1]` within a switch-case block and is then passed to
vhost_scsi_get_req() which extracts `vc->req` and `tpg`. However, for
a `VIRTIO_SCSI_T_AN_*` request, tpg is not required, so `vc.target` is
set to NULL in this branch. Later, in vhost_scsi_get_req(),
`vc->target` is dereferenced without being checked, leading to a null
pointer dereference bug. This bug can be triggered from guest.
When this bug occurs, the vhost_worker process is killed while holding
`vq->mutex` and the corresponding tpg will remain occupied
indefinitely.
Below is the KASAN report:
Oops: general protection fault, probably for non-canonical address
0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 PID: 840 Comm: poc Not tainted 6.10.0+ #1
Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS
1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:vhost_scsi_get_req+0x165/0x3a0
Code: 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 2b 02 00 00
48 b8 00 00 00 00 00 fc ff df 4d 8b 65 30 4c 89 e2 48 c1 ea 03 <0f> b6
04 02 4c 89 e2 83 e2 07 38 d0 7f 08 84 c0 0f 85 be 01 00 00
RSP: 0018:ffff888017affb50 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff88801b000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff888017affcb8
RBP: ffff888017affb80 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: ffff888017affc88 R14: ffff888017affd1c R15: ffff888017993000
FS: 000055556e076500(0000) GS:ffff88806b100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000200027c0 CR3: 0000000010ed0004 CR4: 0000000000370ef0
Call Trace:
<TASK>
? show_regs+0x86/0xa0
? die_addr+0x4b/0xd0
? exc_general_protection+0x163/0x260
? asm_exc_general_protection+0x27/0x30
? vhost_scsi_get_req+0x165/0x3a0
vhost_scsi_ctl_handle_vq+0x2a4/0xca0
? __pfx_vhost_scsi_ctl_handle_vq+0x10/0x10
? __switch_to+0x721/0xeb0
? __schedule+0xda5/0x5710
? __kasan_check_write+0x14/0x30
? _raw_spin_lock+0x82/0xf0
vhost_scsi_ctl_handle_kick+0x52/0x90
vhost_run_work_list+0x134/0x1b0
vhost_task_fn+0x121/0x350
...
</TASK>
---[ end trace 0000000000000000 ]---
Let's add a check in vhost_scsi_get_req.
Fixes: 3f8ca2e115e5 ("vhost/scsi: Extract common handling code from control queue handler")
Signed-off-by: Haoran Zhang <wh1sper@zju.edu.cn>
[whitespace fixes]
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Message-Id: <b26d7ddd-b098-4361-88f8-17ca7f90adf7@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2024-10-01 15:14:15 -05:00
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
|
|
|
|
|
vhost/scsi: null-ptr-dereference in vhost_scsi_get_req()
Since commit 3f8ca2e115e5 ("vhost/scsi: Extract common handling code
from control queue handler") a null pointer dereference bug can be
triggered when guest sends an SCSI AN request.
In vhost_scsi_ctl_handle_vq(), `vc.target` is assigned with
`&v_req.tmf.lun[1]` within a switch-case block and is then passed to
vhost_scsi_get_req() which extracts `vc->req` and `tpg`. However, for
a `VIRTIO_SCSI_T_AN_*` request, tpg is not required, so `vc.target` is
set to NULL in this branch. Later, in vhost_scsi_get_req(),
`vc->target` is dereferenced without being checked, leading to a null
pointer dereference bug. This bug can be triggered from guest.
When this bug occurs, the vhost_worker process is killed while holding
`vq->mutex` and the corresponding tpg will remain occupied
indefinitely.
Below is the KASAN report:
Oops: general protection fault, probably for non-canonical address
0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 PID: 840 Comm: poc Not tainted 6.10.0+ #1
Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS
1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:vhost_scsi_get_req+0x165/0x3a0
Code: 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 2b 02 00 00
48 b8 00 00 00 00 00 fc ff df 4d 8b 65 30 4c 89 e2 48 c1 ea 03 <0f> b6
04 02 4c 89 e2 83 e2 07 38 d0 7f 08 84 c0 0f 85 be 01 00 00
RSP: 0018:ffff888017affb50 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff88801b000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff888017affcb8
RBP: ffff888017affb80 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: ffff888017affc88 R14: ffff888017affd1c R15: ffff888017993000
FS: 000055556e076500(0000) GS:ffff88806b100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000200027c0 CR3: 0000000010ed0004 CR4: 0000000000370ef0
Call Trace:
<TASK>
? show_regs+0x86/0xa0
? die_addr+0x4b/0xd0
? exc_general_protection+0x163/0x260
? asm_exc_general_protection+0x27/0x30
? vhost_scsi_get_req+0x165/0x3a0
vhost_scsi_ctl_handle_vq+0x2a4/0xca0
? __pfx_vhost_scsi_ctl_handle_vq+0x10/0x10
? __switch_to+0x721/0xeb0
? __schedule+0xda5/0x5710
? __kasan_check_write+0x14/0x30
? _raw_spin_lock+0x82/0xf0
vhost_scsi_ctl_handle_kick+0x52/0x90
vhost_run_work_list+0x134/0x1b0
vhost_task_fn+0x121/0x350
...
</TASK>
---[ end trace 0000000000000000 ]---
Let's add a check in vhost_scsi_get_req.
Fixes: 3f8ca2e115e5 ("vhost/scsi: Extract common handling code from control queue handler")
Signed-off-by: Haoran Zhang <wh1sper@zju.edu.cn>
[whitespace fixes]
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Message-Id: <b26d7ddd-b098-4361-88f8-17ca7f90adf7@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2024-10-01 15:14:15 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:15 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-11 07:39:21 -07:00
|
|
|
|
2024-12-03 13:15:15 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2024-12-03 13:15:15 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:22 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:47 -07:00
|
|
|
|
2018-09-17 17:09:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:13 -06:00
|
|
|
|
2018-09-17 17:09:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:15 -06:00
|
|
|
|
2018-09-17 17:09:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:13 -06:00
|
|
|
|
2025-04-02 23:29:51 -07:00
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-31 21:27:57 +02:00
|
|
|
|
2018-09-17 17:09:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:51 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-05-17 00:29:52 -04:00
|
|
|
|
2025-04-02 23:29:51 -07:00
|
|
|
|
2018-09-17 17:09:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-15 20:25:47 -04:00
|
|
|
|
2018-09-17 17:09:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-28 14:18:33 +02:00
|
|
|
|
2018-09-17 17:09:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:22 -06:00
|
|
|
|
2018-09-17 17:09:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:22 -06:00
|
|
|
|
2018-09-17 17:09:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:49 -07:00
|
|
|
|
2024-12-03 13:15:10 -06:00
|
|
|
|
2025-06-11 07:39:21 -07:00
|
|
|
|
2018-09-17 17:09:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:15 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:49 -07:00
|
|
|
|
2025-04-02 23:29:51 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:49 -07:00
|
|
|
|
2024-12-03 13:15:13 -06:00
|
|
|
|
2018-09-17 17:09:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:11 -06:00
|
|
|
|
2018-09-17 17:09:49 -07:00
|
|
|
|
2020-11-09 23:33:21 -06:00
|
|
|
|
2018-09-17 17:09:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:13 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:10 -06:00
|
|
|
|
2018-09-17 17:09:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:51 -07:00
|
|
|
|
2025-04-02 23:29:47 -07:00
|
|
|
|
2025-04-02 23:29:51 -07:00
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:48 -07:00
|
|
|
|
2024-12-03 13:15:10 -06:00
|
|
|
|
2025-04-02 23:29:51 -07:00
|
|
|
|
|
|
|
|
|
2019-05-17 00:29:52 -04:00
|
|
|
|
2018-09-17 17:09:49 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:47 -07:00
|
|
|
|
|
|
|
|
|
2018-12-03 16:48:23 -08:00
|
|
|
|
2018-09-17 17:09:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
2018-12-03 16:48:23 -08:00
|
|
|
|
2022-09-15 20:25:47 -04:00
|
|
|
|
2018-12-03 16:48:23 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
2018-09-17 17:09:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-15 19:47:01 -05:00
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
2024-03-15 19:47:01 -05:00
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
2024-03-15 19:47:01 -05:00
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:46 -07:00
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:52 -07:00
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:46 -07:00
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-15 19:47:01 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-15 19:47:03 -05:00
|
|
|
|
|
|
|
|
|
2024-03-15 19:47:01 -05:00
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:52 -07:00
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2023-03-20 21:06:19 -05:00
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
|
|
|
|
|
2024-03-15 19:47:01 -05:00
|
|
|
|
2023-03-20 21:06:19 -05:00
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:52 -07:00
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2025-04-02 23:29:52 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:52 -07:00
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:47 -07:00
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:47 -07:00
|
|
|
|
|
|
|
|
|
2018-12-03 16:48:23 -08:00
|
|
|
|
2018-09-17 17:09:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-03 16:48:23 -08:00
|
|
|
|
2022-09-15 20:25:47 -04:00
|
|
|
|
2018-12-03 16:48:23 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
2018-09-17 17:09:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
2018-09-17 17:09:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
|
|
|
|
|
2019-05-17 00:29:52 -04:00
|
|
|
|
2025-04-02 23:29:52 -07:00
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-31 21:27:57 +02:00
|
|
|
|
2018-09-17 17:09:47 -07:00
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:47 -07:00
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:52 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-05-17 00:29:52 -04:00
|
|
|
|
2025-04-02 23:29:52 -07:00
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:47 -07:00
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:47 -07:00
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
2018-09-17 17:09:47 -07:00
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:47 -07:00
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-07-10 06:36:16 -04:00
|
|
|
|
2018-09-17 17:09:47 -07:00
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:47 -07:00
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:47 -07:00
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:47 -07:00
|
|
|
|
2020-11-09 23:33:23 -06:00
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:47 -07:00
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
2025-04-02 23:29:52 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
2025-04-02 23:29:52 -07:00
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:48 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:52 -07:00
|
|
|
|
2025-04-02 23:29:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:52 -07:00
|
|
|
|
|
|
|
|
|
2019-05-17 00:29:52 -04:00
|
|
|
|
2018-09-17 17:09:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2018-09-17 17:09:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-30 13:30:00 -07:00
|
|
|
|
2018-09-17 17:09:47 -07:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2013-05-06 16:38:27 +08:00
|
|
|
|
2023-06-26 18:23:00 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-05 10:37:33 +03:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-15 19:46:59 -05:00
|
|
|
|
|
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-31 21:27:57 +02:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-06-26 18:23:00 -05:00
|
|
|
|
|
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tcm_vhost: Multi-queue support
This adds virtio-scsi multi-queue support to tcm_vhost. In order to use
multi-queue, guest side multi-queue support is need. It can
be found here:
https://lkml.org/lkml/2012/12/18/166
Currently, only one thread is created by vhost core code for each
vhost_scsi instance. Even if there are multi-queues, all the handling of
guest kick (vhost_scsi_handle_kick) are processed in one thread. This is
not optimal. Luckily, most of the work is offloaded to the tcm_vhost
workqueue.
Some initial perf numbers:
1 queue, 4 targets, 1 lun per target
4K request size, 50% randread + 50% randwrite: 127K/127k IOPS
4 queues, 4 targets, 1 lun per target
4K request size, 50% randread + 50% randwrite: 181K/181k IOPS
Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2013-02-06 13:20:59 +08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2013-04-28 15:38:52 +03:00
|
|
|
|
2013-04-03 14:17:37 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-27 11:16:49 +08:00
|
|
|
|
2022-07-07 22:05:25 -05:00
|
|
|
|
2013-04-27 11:16:49 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-07 22:05:25 -05:00
|
|
|
|
|
|
|
|
|
2013-04-27 11:16:49 +08:00
|
|
|
|
|
|
|
|
|
2022-05-17 13:08:50 -05:00
|
|
|
|
2013-04-27 11:16:49 +08:00
|
|
|
|
|
|
|
|
|
2022-07-07 22:05:25 -05:00
|
|
|
|
|
|
|
|
|
2013-04-03 14:17:37 +08:00
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:51 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:20 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:20 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:08 -06:00
|
|
|
|
2025-04-02 23:29:51 -07:00
|
|
|
|
2020-11-09 23:33:20 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
2020-11-09 23:33:20 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-01-22 10:33:08 +08:00
|
|
|
|
2020-11-09 23:33:20 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2020-11-09 23:33:20 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-02-21 20:03:00 -08:00
|
|
|
|
2024-12-03 13:15:08 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:20 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
treewide: Replace kmalloc with kmalloc_obj for non-scalar types
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:
Single allocations: kmalloc(sizeof(TYPE), ...)
are replaced with: kmalloc_obj(TYPE, ...)
Array allocations: kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with: kmalloc_objs(TYPE, COUNT, ...)
Flex array allocations: kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with: kmalloc_flex(*PTR, FAM, COUNT, ...)
(where TYPE may also be *VAR)
The resulting allocations no longer return "void *", instead returning
"TYPE *".
Signed-off-by: Kees Cook <kees@kernel.org>
2026-02-20 23:49:23 -08:00
|
|
|
|
Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses
Conversion performed via this Coccinelle script:
// SPDX-License-Identifier: GPL-2.0-only
// Options: --include-headers-for-types --all-includes --include-headers --keep-comments
virtual patch
@gfp depends on patch && !(file in "tools") && !(file in "samples")@
identifier ALLOC = {kmalloc_obj,kmalloc_objs,kmalloc_flex,
kzalloc_obj,kzalloc_objs,kzalloc_flex,
kvmalloc_obj,kvmalloc_objs,kvmalloc_flex,
kvzalloc_obj,kvzalloc_objs,kvzalloc_flex};
@@
ALLOC(...
- , GFP_KERNEL
)
$ make coccicheck MODE=patch COCCI=gfp.cocci
Build and boot tested x86_64 with Fedora 42's GCC and Clang:
Linux version 6.19.0+ (user@host) (gcc (GCC) 15.2.1 20260123 (Red Hat 15.2.1-7), GNU ld version 2.44-12.fc42) #1 SMP PREEMPT_DYNAMIC 1970-01-01
Linux version 6.19.0+ (user@host) (clang version 20.1.8 (Fedora 20.1.8-4.fc42), LLD 20.1.8) #1 SMP PREEMPT_DYNAMIC 1970-01-01
Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-02-21 23:46:04 -08:00
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:20 -06:00
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
|
|
|
|
|
treewide: Replace kmalloc with kmalloc_obj for non-scalar types
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:
Single allocations: kmalloc(sizeof(TYPE), ...)
are replaced with: kmalloc_obj(TYPE, ...)
Array allocations: kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with: kmalloc_objs(TYPE, COUNT, ...)
Flex array allocations: kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with: kmalloc_flex(*PTR, FAM, COUNT, ...)
(where TYPE may also be *VAR)
The resulting allocations no longer return "void *", instead returning
"TYPE *".
Signed-off-by: Kees Cook <kees@kernel.org>
2026-02-20 23:49:23 -08:00
|
|
|
|
Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses
Conversion performed via this Coccinelle script:
// SPDX-License-Identifier: GPL-2.0-only
// Options: --include-headers-for-types --all-includes --include-headers --keep-comments
virtual patch
@gfp depends on patch && !(file in "tools") && !(file in "samples")@
identifier ALLOC = {kmalloc_obj,kmalloc_objs,kmalloc_flex,
kzalloc_obj,kzalloc_objs,kzalloc_flex,
kvmalloc_obj,kvmalloc_objs,kvmalloc_flex,
kvzalloc_obj,kvzalloc_objs,kvzalloc_flex};
@@
ALLOC(...
- , GFP_KERNEL
)
$ make coccicheck MODE=patch COCCI=gfp.cocci
Build and boot tested x86_64 with Fedora 42's GCC and Clang:
Linux version 6.19.0+ (user@host) (gcc (GCC) 15.2.1 20260123 (Red Hat 15.2.1-7), GNU ld version 2.44-12.fc42) #1 SMP PREEMPT_DYNAMIC 1970-01-01
Linux version 6.19.0+ (user@host) (clang version 20.1.8 (Fedora 20.1.8-4.fc42), LLD 20.1.8) #1 SMP PREEMPT_DYNAMIC 1970-01-01
Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-02-21 23:46:04 -08:00
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:09 -06:00
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:20 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-04-25 15:35:20 +08:00
|
|
|
|
|
|
|
|
|
2023-03-20 21:06:24 -05:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2013-05-06 16:38:27 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2014-10-08 06:19:20 +00:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-03 14:17:37 +08:00
|
|
|
|
|
|
|
|
|
2013-02-05 12:31:57 +08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2013-04-25 15:35:20 +08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-27 11:16:48 +08:00
|
|
|
|
2013-04-25 15:35:20 +08:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vhost-scsi: Fix handling of multiple calls to vhost_scsi_set_endpoint
If vhost_scsi_set_endpoint is called multiple times without a
vhost_scsi_clear_endpoint between them, we can hit multiple bugs
found by Haoran Zhang:
1. Use-after-free when no tpgs are found:
This fixes a use after free that occurs when vhost_scsi_set_endpoint is
called more than once and calls after the first call do not find any
tpgs to add to the vs_tpg. When vhost_scsi_set_endpoint first finds
tpgs to add to the vs_tpg array match=true, so we will do:
vhost_vq_set_backend(vq, vs_tpg);
...
kfree(vs->vs_tpg);
vs->vs_tpg = vs_tpg;
If vhost_scsi_set_endpoint is called again and no tpgs are found
match=false so we skip the vhost_vq_set_backend call leaving the
pointer to the vs_tpg we then free via:
kfree(vs->vs_tpg);
vs->vs_tpg = vs_tpg;
If a scsi request is then sent we do:
vhost_scsi_handle_vq -> vhost_scsi_get_req -> vhost_vq_get_backend
which sees the vs_tpg we just did a kfree on.
2. Tpg dir removal hang:
This patch fixes an issue where we cannot remove a LIO/target layer
tpg (and structs above it like the target) dir due to the refcount
dropping to -1.
The problem is that if vhost_scsi_set_endpoint detects a tpg is already
in the vs->vs_tpg array or if the tpg has been removed so
target_depend_item fails, the undepend goto handler will do
target_undepend_item on all tpgs in the vs_tpg array dropping their
refcount to 0. At this time vs_tpg contains both the tpgs we have added
in the current vhost_scsi_set_endpoint call as well as tpgs we added in
previous calls which are also in vs->vs_tpg.
Later, when vhost_scsi_clear_endpoint runs it will do
target_undepend_item on all the tpgs in the vs->vs_tpg which will drop
their refcount to -1. Userspace will then not be able to remove the tpg
and will hang when it tries to do rmdir on the tpg dir.
3. Tpg leak:
This fixes a bug where we can leak tpgs and cause them to be
un-removable because the target name is overwritten when
vhost_scsi_set_endpoint is called multiple times but with different
target names.
The bug occurs if a user has called VHOST_SCSI_SET_ENDPOINT and setup
a vhost-scsi device to target/tpg mapping, then calls
VHOST_SCSI_SET_ENDPOINT again with a new target name that has tpgs we
haven't seen before (target1 has tpg1 but target2 has tpg2). When this
happens we don't teardown the old target tpg mapping and just overwrite
the target name and the vs->vs_tpg array. Later when we do
vhost_scsi_clear_endpoint, we are passed in either target1 or target2's
name and we will only match that target's tpgs when we loop over the
vs->vs_tpg. We will then return from the function without doing
target_undepend_item on the tpgs.
Because of all these bugs, it looks like being able to call
vhost_scsi_set_endpoint multiple times was never supported. The major
user, QEMU, already has checks to prevent this use case. So to fix the
issues, this patch prevents vhost_scsi_set_endpoint from being called
if it's already successfully added tpgs. To add, remove or change the
tpg config or target name, you must do a vhost_scsi_clear_endpoint
first.
Fixes: 25b98b64e284 ("vhost scsi: alloc cmds per vq instead of session")
Fixes: 4f7f46d32c98 ("tcm_vhost: Use vq->private_data to indicate if the endpoint is setup")
Reported-by: Haoran Zhang <wh1sper@zju.edu.cn>
Closes: https://lore.kernel.org/virtualization/e418a5ee-45ca-4d18-9b5d-6f8b6b1add8e@oracle.com/T/#me6c0041ce376677419b9b2563494172a01487ecb
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20250129210922.121533-1-michael.christie@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Stefano Garzarella <sgarzare@redhat.com>
2025-01-29 15:09:22 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-03 14:17:37 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-25 15:35:20 +08:00
|
|
|
|
|
|
|
|
|
2013-04-03 14:17:37 +08:00
|
|
|
|
|
|
|
|
|
2023-03-20 21:06:24 -05:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-05-06 16:38:28 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2013-05-06 16:38:28 +08:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2013-05-06 16:38:28 +08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2013-02-05 12:31:57 +08:00
|
|
|
|
2014-10-08 06:19:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-03 08:50:52 +02:00
|
|
|
|
2014-10-08 06:19:20 +00:00
|
|
|
|
2018-12-13 09:10:14 +08:00
|
|
|
|
2014-10-08 06:19:20 +00:00
|
|
|
|
2023-03-20 21:06:24 -05:00
|
|
|
|
2020-11-09 23:33:20 -06:00
|
|
|
|
2014-10-08 06:19:20 +00:00
|
|
|
|
2013-05-06 16:38:28 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-05 12:31:57 +08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2013-05-06 16:38:28 +08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2023-03-20 21:06:24 -05:00
|
|
|
|
2013-02-05 12:31:57 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:20 -06:00
|
|
|
|
2022-07-07 22:05:25 -05:00
|
|
|
|
2020-11-09 23:33:20 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-04 16:43:30 +08:00
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:20 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-07 22:05:25 -05:00
|
|
|
|
2013-04-27 11:16:48 +08:00
|
|
|
|
2013-04-03 14:17:37 +08:00
|
|
|
|
2020-03-31 21:27:57 +02:00
|
|
|
|
2016-02-16 15:59:44 +01:00
|
|
|
|
2013-04-03 14:17:37 +08:00
|
|
|
|
|
|
|
|
|
2013-02-05 12:31:57 +08:00
|
|
|
|
|
|
|
|
|
vhost-scsi: Fix handling of multiple calls to vhost_scsi_set_endpoint
If vhost_scsi_set_endpoint is called multiple times without a
vhost_scsi_clear_endpoint between them, we can hit multiple bugs
found by Haoran Zhang:
1. Use-after-free when no tpgs are found:
This fixes a use after free that occurs when vhost_scsi_set_endpoint is
called more than once and calls after the first call do not find any
tpgs to add to the vs_tpg. When vhost_scsi_set_endpoint first finds
tpgs to add to the vs_tpg array match=true, so we will do:
vhost_vq_set_backend(vq, vs_tpg);
...
kfree(vs->vs_tpg);
vs->vs_tpg = vs_tpg;
If vhost_scsi_set_endpoint is called again and no tpgs are found
match=false so we skip the vhost_vq_set_backend call leaving the
pointer to the vs_tpg we then free via:
kfree(vs->vs_tpg);
vs->vs_tpg = vs_tpg;
If a scsi request is then sent we do:
vhost_scsi_handle_vq -> vhost_scsi_get_req -> vhost_vq_get_backend
which sees the vs_tpg we just did a kfree on.
2. Tpg dir removal hang:
This patch fixes an issue where we cannot remove a LIO/target layer
tpg (and structs above it like the target) dir due to the refcount
dropping to -1.
The problem is that if vhost_scsi_set_endpoint detects a tpg is already
in the vs->vs_tpg array or if the tpg has been removed so
target_depend_item fails, the undepend goto handler will do
target_undepend_item on all tpgs in the vs_tpg array dropping their
refcount to 0. At this time vs_tpg contains both the tpgs we have added
in the current vhost_scsi_set_endpoint call as well as tpgs we added in
previous calls which are also in vs->vs_tpg.
Later, when vhost_scsi_clear_endpoint runs it will do
target_undepend_item on all the tpgs in the vs->vs_tpg which will drop
their refcount to -1. Userspace will then not be able to remove the tpg
and will hang when it tries to do rmdir on the tpg dir.
3. Tpg leak:
This fixes a bug where we can leak tpgs and cause them to be
un-removable because the target name is overwritten when
vhost_scsi_set_endpoint is called multiple times but with different
target names.
The bug occurs if a user has called VHOST_SCSI_SET_ENDPOINT and setup
a vhost-scsi device to target/tpg mapping, then calls
VHOST_SCSI_SET_ENDPOINT again with a new target name that has tpgs we
haven't seen before (target1 has tpg1 but target2 has tpg2). When this
happens we don't teardown the old target tpg mapping and just overwrite
the target name and the vs->vs_tpg array. Later when we do
vhost_scsi_clear_endpoint, we are passed in either target1 or target2's
name and we will only match that target's tpgs when we loop over the
vs->vs_tpg. We will then return from the function without doing
target_undepend_item on the tpgs.
Because of all these bugs, it looks like being able to call
vhost_scsi_set_endpoint multiple times was never supported. The major
user, QEMU, already has checks to prevent this use case. So to fix the
issues, this patch prevents vhost_scsi_set_endpoint from being called
if it's already successfully added tpgs. To add, remove or change the
tpg config or target name, you must do a vhost_scsi_clear_endpoint
first.
Fixes: 25b98b64e284 ("vhost scsi: alloc cmds per vq instead of session")
Fixes: 4f7f46d32c98 ("tcm_vhost: Use vq->private_data to indicate if the endpoint is setup")
Reported-by: Haoran Zhang <wh1sper@zju.edu.cn>
Closes: https://lore.kernel.org/virtualization/e418a5ee-45ca-4d18-9b5d-6f8b6b1add8e@oracle.com/T/#me6c0041ce376677419b9b2563494172a01487ecb
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20250129210922.121533-1-michael.christie@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Stefano Garzarella <sgarzare@redhat.com>
2025-01-29 15:09:22 -06:00
|
|
|
|
|
|
|
|
|
2013-02-05 12:31:57 +08:00
|
|
|
|
|
|
|
|
|
2013-04-03 14:17:37 +08:00
|
|
|
|
vhost-scsi: Fix handling of multiple calls to vhost_scsi_set_endpoint
If vhost_scsi_set_endpoint is called multiple times without a
vhost_scsi_clear_endpoint between them, we can hit multiple bugs
found by Haoran Zhang:
1. Use-after-free when no tpgs are found:
This fixes a use after free that occurs when vhost_scsi_set_endpoint is
called more than once and calls after the first call do not find any
tpgs to add to the vs_tpg. When vhost_scsi_set_endpoint first finds
tpgs to add to the vs_tpg array match=true, so we will do:
vhost_vq_set_backend(vq, vs_tpg);
...
kfree(vs->vs_tpg);
vs->vs_tpg = vs_tpg;
If vhost_scsi_set_endpoint is called again and no tpgs are found
match=false so we skip the vhost_vq_set_backend call leaving the
pointer to the vs_tpg we then free via:
kfree(vs->vs_tpg);
vs->vs_tpg = vs_tpg;
If a scsi request is then sent we do:
vhost_scsi_handle_vq -> vhost_scsi_get_req -> vhost_vq_get_backend
which sees the vs_tpg we just did a kfree on.
2. Tpg dir removal hang:
This patch fixes an issue where we cannot remove a LIO/target layer
tpg (and structs above it like the target) dir due to the refcount
dropping to -1.
The problem is that if vhost_scsi_set_endpoint detects a tpg is already
in the vs->vs_tpg array or if the tpg has been removed so
target_depend_item fails, the undepend goto handler will do
target_undepend_item on all tpgs in the vs_tpg array dropping their
refcount to 0. At this time vs_tpg contains both the tpgs we have added
in the current vhost_scsi_set_endpoint call as well as tpgs we added in
previous calls which are also in vs->vs_tpg.
Later, when vhost_scsi_clear_endpoint runs it will do
target_undepend_item on all the tpgs in the vs->vs_tpg which will drop
their refcount to -1. Userspace will then not be able to remove the tpg
and will hang when it tries to do rmdir on the tpg dir.
3. Tpg leak:
This fixes a bug where we can leak tpgs and cause them to be
un-removable because the target name is overwritten when
vhost_scsi_set_endpoint is called multiple times but with different
target names.
The bug occurs if a user has called VHOST_SCSI_SET_ENDPOINT and setup
a vhost-scsi device to target/tpg mapping, then calls
VHOST_SCSI_SET_ENDPOINT again with a new target name that has tpgs we
haven't seen before (target1 has tpg1 but target2 has tpg2). When this
happens we don't teardown the old target tpg mapping and just overwrite
the target name and the vs->vs_tpg array. Later when we do
vhost_scsi_clear_endpoint, we are passed in either target1 or target2's
name and we will only match that target's tpgs when we loop over the
vs->vs_tpg. We will then return from the function without doing
target_undepend_item on the tpgs.
Because of all these bugs, it looks like being able to call
vhost_scsi_set_endpoint multiple times was never supported. The major
user, QEMU, already has checks to prevent this use case. So to fix the
issues, this patch prevents vhost_scsi_set_endpoint from being called
if it's already successfully added tpgs. To add, remove or change the
tpg config or target name, you must do a vhost_scsi_clear_endpoint
first.
Fixes: 25b98b64e284 ("vhost scsi: alloc cmds per vq instead of session")
Fixes: 4f7f46d32c98 ("tcm_vhost: Use vq->private_data to indicate if the endpoint is setup")
Reported-by: Haoran Zhang <wh1sper@zju.edu.cn>
Closes: https://lore.kernel.org/virtualization/e418a5ee-45ca-4d18-9b5d-6f8b6b1add8e@oracle.com/T/#me6c0041ce376677419b9b2563494172a01487ecb
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20250129210922.121533-1-michael.christie@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Stefano Garzarella <sgarzare@redhat.com>
2025-01-29 15:09:22 -06:00
|
|
|
|
|
|
|
|
|
2013-04-03 14:17:37 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:20 -06:00
|
|
|
|
2013-04-03 14:17:37 +08:00
|
|
|
|
2020-11-09 23:33:20 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-03-20 21:06:18 -05:00
|
|
|
|
|
|
|
|
|
2020-11-09 23:33:20 -06:00
|
|
|
|
2023-03-20 21:06:18 -05:00
|
|
|
|
2020-11-09 23:33:20 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vhost-scsi: Fix handling of multiple calls to vhost_scsi_set_endpoint
If vhost_scsi_set_endpoint is called multiple times without a
vhost_scsi_clear_endpoint between them, we can hit multiple bugs
found by Haoran Zhang:
1. Use-after-free when no tpgs are found:
This fixes a use after free that occurs when vhost_scsi_set_endpoint is
called more than once and calls after the first call do not find any
tpgs to add to the vs_tpg. When vhost_scsi_set_endpoint first finds
tpgs to add to the vs_tpg array match=true, so we will do:
vhost_vq_set_backend(vq, vs_tpg);
...
kfree(vs->vs_tpg);
vs->vs_tpg = vs_tpg;
If vhost_scsi_set_endpoint is called again and no tpgs are found
match=false so we skip the vhost_vq_set_backend call leaving the
pointer to the vs_tpg we then free via:
kfree(vs->vs_tpg);
vs->vs_tpg = vs_tpg;
If a scsi request is then sent we do:
vhost_scsi_handle_vq -> vhost_scsi_get_req -> vhost_vq_get_backend
which sees the vs_tpg we just did a kfree on.
2. Tpg dir removal hang:
This patch fixes an issue where we cannot remove a LIO/target layer
tpg (and structs above it like the target) dir due to the refcount
dropping to -1.
The problem is that if vhost_scsi_set_endpoint detects a tpg is already
in the vs->vs_tpg array or if the tpg has been removed so
target_depend_item fails, the undepend goto handler will do
target_undepend_item on all tpgs in the vs_tpg array dropping their
refcount to 0. At this time vs_tpg contains both the tpgs we have added
in the current vhost_scsi_set_endpoint call as well as tpgs we added in
previous calls which are also in vs->vs_tpg.
Later, when vhost_scsi_clear_endpoint runs it will do
target_undepend_item on all the tpgs in the vs->vs_tpg which will drop
their refcount to -1. Userspace will then not be able to remove the tpg
and will hang when it tries to do rmdir on the tpg dir.
3. Tpg leak:
This fixes a bug where we can leak tpgs and cause them to be
un-removable because the target name is overwritten when
vhost_scsi_set_endpoint is called multiple times but with different
target names.
The bug occurs if a user has called VHOST_SCSI_SET_ENDPOINT and setup
a vhost-scsi device to target/tpg mapping, then calls
VHOST_SCSI_SET_ENDPOINT again with a new target name that has tpgs we
haven't seen before (target1 has tpg1 but target2 has tpg2). When this
happens we don't teardown the old target tpg mapping and just overwrite
the target name and the vs->vs_tpg array. Later when we do
vhost_scsi_clear_endpoint, we are passed in either target1 or target2's
name and we will only match that target's tpgs when we loop over the
vs->vs_tpg. We will then return from the function without doing
target_undepend_item on the tpgs.
Because of all these bugs, it looks like being able to call
vhost_scsi_set_endpoint multiple times was never supported. The major
user, QEMU, already has checks to prevent this use case. So to fix the
issues, this patch prevents vhost_scsi_set_endpoint from being called
if it's already successfully added tpgs. To add, remove or change the
tpg config or target name, you must do a vhost_scsi_clear_endpoint
first.
Fixes: 25b98b64e284 ("vhost scsi: alloc cmds per vq instead of session")
Fixes: 4f7f46d32c98 ("tcm_vhost: Use vq->private_data to indicate if the endpoint is setup")
Reported-by: Haoran Zhang <wh1sper@zju.edu.cn>
Closes: https://lore.kernel.org/virtualization/e418a5ee-45ca-4d18-9b5d-6f8b6b1add8e@oracle.com/T/#me6c0041ce376677419b9b2563494172a01487ecb
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20250129210922.121533-1-michael.christie@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Stefano Garzarella <sgarzare@redhat.com>
2025-01-29 15:09:22 -06:00
|
|
|
|
2020-11-09 23:33:20 -06:00
|
|
|
|
2013-04-25 15:35:20 +08:00
|
|
|
|
2013-02-05 12:31:57 +08:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2013-05-06 16:38:27 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2014-10-08 06:19:20 +00:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
|
|
|
|
|
2013-04-03 14:17:37 +08:00
|
|
|
|
|
|
|
|
|
2013-02-05 12:31:57 +08:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-27 11:16:48 +08:00
|
|
|
|
2012-07-30 13:30:00 -07:00
|
|
|
|
2013-03-15 09:14:05 +08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2013-04-03 14:17:37 +08:00
|
|
|
|
|
|
|
|
|
2013-04-25 15:35:20 +08:00
|
|
|
|
|
|
|
|
|
2013-04-03 14:17:37 +08:00
|
|
|
|
|
|
|
|
|
2013-02-05 12:31:57 +08:00
|
|
|
|
|
|
|
|
|
2013-05-06 16:38:28 +08:00
|
|
|
|
|
|
|
|
|
2013-02-05 12:31:57 +08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2013-05-06 16:38:28 +08:00
|
|
|
|
2013-02-05 12:31:57 +08:00
|
|
|
|
|
|
|
|
|
2023-03-20 21:06:20 -05:00
|
|
|
|
2013-02-05 12:31:57 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-06 16:38:28 +08:00
|
|
|
|
2013-02-05 12:31:57 +08:00
|
|
|
|
2013-05-06 16:38:28 +08:00
|
|
|
|
2013-02-05 12:31:57 +08:00
|
|
|
|
|
|
|
|
|
2023-03-20 21:06:20 -05:00
|
|
|
|
2013-02-05 12:31:57 +08:00
|
|
|
|
2023-03-20 21:06:20 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-06 16:38:28 +08:00
|
|
|
|
|
|
|
|
|
2013-02-05 12:31:57 +08:00
|
|
|
|
2023-03-20 21:06:20 -05:00
|
|
|
|
2013-05-06 16:38:28 +08:00
|
|
|
|
2023-03-20 21:06:20 -05:00
|
|
|
|
2014-10-08 06:19:20 +00:00
|
|
|
|
2015-05-03 08:50:52 +02:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2021-05-25 12:47:31 -05:00
|
|
|
|
2023-03-20 21:06:20 -05:00
|
|
|
|
2013-04-03 14:17:37 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vhost-scsi: Fix handling of multiple calls to vhost_scsi_set_endpoint
If vhost_scsi_set_endpoint is called multiple times without a
vhost_scsi_clear_endpoint between them, we can hit multiple bugs
found by Haoran Zhang:
1. Use-after-free when no tpgs are found:
This fixes a use after free that occurs when vhost_scsi_set_endpoint is
called more than once and calls after the first call do not find any
tpgs to add to the vs_tpg. When vhost_scsi_set_endpoint first finds
tpgs to add to the vs_tpg array match=true, so we will do:
vhost_vq_set_backend(vq, vs_tpg);
...
kfree(vs->vs_tpg);
vs->vs_tpg = vs_tpg;
If vhost_scsi_set_endpoint is called again and no tpgs are found
match=false so we skip the vhost_vq_set_backend call leaving the
pointer to the vs_tpg we then free via:
kfree(vs->vs_tpg);
vs->vs_tpg = vs_tpg;
If a scsi request is then sent we do:
vhost_scsi_handle_vq -> vhost_scsi_get_req -> vhost_vq_get_backend
which sees the vs_tpg we just did a kfree on.
2. Tpg dir removal hang:
This patch fixes an issue where we cannot remove a LIO/target layer
tpg (and structs above it like the target) dir due to the refcount
dropping to -1.
The problem is that if vhost_scsi_set_endpoint detects a tpg is already
in the vs->vs_tpg array or if the tpg has been removed so
target_depend_item fails, the undepend goto handler will do
target_undepend_item on all tpgs in the vs_tpg array dropping their
refcount to 0. At this time vs_tpg contains both the tpgs we have added
in the current vhost_scsi_set_endpoint call as well as tpgs we added in
previous calls which are also in vs->vs_tpg.
Later, when vhost_scsi_clear_endpoint runs it will do
target_undepend_item on all the tpgs in the vs->vs_tpg which will drop
their refcount to -1. Userspace will then not be able to remove the tpg
and will hang when it tries to do rmdir on the tpg dir.
3. Tpg leak:
This fixes a bug where we can leak tpgs and cause them to be
un-removable because the target name is overwritten when
vhost_scsi_set_endpoint is called multiple times but with different
target names.
The bug occurs if a user has called VHOST_SCSI_SET_ENDPOINT and setup
a vhost-scsi device to target/tpg mapping, then calls
VHOST_SCSI_SET_ENDPOINT again with a new target name that has tpgs we
haven't seen before (target1 has tpg1 but target2 has tpg2). When this
happens we don't teardown the old target tpg mapping and just overwrite
the target name and the vs->vs_tpg array. Later when we do
vhost_scsi_clear_endpoint, we are passed in either target1 or target2's
name and we will only match that target's tpgs when we loop over the
vs->vs_tpg. We will then return from the function without doing
target_undepend_item on the tpgs.
Because of all these bugs, it looks like being able to call
vhost_scsi_set_endpoint multiple times was never supported. The major
user, QEMU, already has checks to prevent this use case. So to fix the
issues, this patch prevents vhost_scsi_set_endpoint from being called
if it's already successfully added tpgs. To add, remove or change the
tpg config or target name, you must do a vhost_scsi_clear_endpoint
first.
Fixes: 25b98b64e284 ("vhost scsi: alloc cmds per vq instead of session")
Fixes: 4f7f46d32c98 ("tcm_vhost: Use vq->private_data to indicate if the endpoint is setup")
Reported-by: Haoran Zhang <wh1sper@zju.edu.cn>
Closes: https://lore.kernel.org/virtualization/e418a5ee-45ca-4d18-9b5d-6f8b6b1add8e@oracle.com/T/#me6c0041ce376677419b9b2563494172a01487ecb
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20250129210922.121533-1-michael.christie@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Stefano Garzarella <sgarzare@redhat.com>
2025-01-29 15:09:22 -06:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2012-07-30 13:30:00 -07:00
|
|
|
|
2013-03-15 09:14:05 +08:00
|
|
|
|
2012-07-30 13:30:00 -07:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2013-04-03 14:17:37 +08:00
|
|
|
|
|
|
|
|
|
2014-06-05 15:20:23 +03:00
|
|
|
|
2025-04-02 23:29:51 -07:00
|
|
|
|
2014-06-05 15:20:23 +03:00
|
|
|
|
|
|
|
|
|
2013-04-03 14:17:37 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-05 15:20:23 +03:00
|
|
|
|
2025-04-02 23:29:51 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-07 22:05:25 -05:00
|
|
|
|
2014-06-05 15:20:23 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-02 23:29:51 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-03 14:17:37 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2023-06-26 18:22:59 -05:00
|
|
|
|
2013-05-06 16:38:26 +08:00
|
|
|
|
2013-04-27 11:16:48 +08:00
|
|
|
|
2022-07-07 22:05:25 -05:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2021-01-23 00:08:53 -08:00
|
|
|
|
|
|
|
|
|
2024-12-03 13:15:12 -06:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2022-07-07 22:05:25 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
treewide: Replace kmalloc with kmalloc_obj for non-scalar types
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:
Single allocations: kmalloc(sizeof(TYPE), ...)
are replaced with: kmalloc_obj(TYPE, ...)
Array allocations: kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with: kmalloc_objs(TYPE, COUNT, ...)
Flex array allocations: kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with: kmalloc_flex(*PTR, FAM, COUNT, ...)
(where TYPE may also be *VAR)
The resulting allocations no longer return "void *", instead returning
"TYPE *".
Signed-off-by: Kees Cook <kees@kernel.org>
2026-02-20 23:49:23 -08:00
|
|
|
|
|
|
|
|
|
2022-07-07 22:05:25 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
treewide: Replace kmalloc with kmalloc_obj for non-scalar types
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:
Single allocations: kmalloc(sizeof(TYPE), ...)
are replaced with: kmalloc_obj(TYPE, ...)
Array allocations: kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with: kmalloc_objs(TYPE, COUNT, ...)
Flex array allocations: kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with: kmalloc_flex(*PTR, FAM, COUNT, ...)
(where TYPE may also be *VAR)
The resulting allocations no longer return "void *", instead returning
"TYPE *".
Signed-off-by: Kees Cook <kees@kernel.org>
2026-02-20 23:49:23 -08:00
|
|
|
|
2022-07-07 22:05:25 -05:00
|
|
|
|
2013-09-17 09:30:34 +03:00
|
|
|
|
2013-04-27 11:16:48 +08:00
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2022-07-07 22:05:25 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
2013-05-06 16:38:26 +08:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2013-05-06 16:38:26 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-07 22:05:25 -05:00
|
|
|
|
2023-06-26 18:22:59 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-27 11:16:48 +08:00
|
|
|
|
2022-07-07 22:05:25 -05:00
|
|
|
|
2020-05-29 16:02:58 +08:00
|
|
|
|
2013-04-27 11:16:49 +08:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-04-27 11:16:49 +08:00
|
|
|
|
2013-05-06 16:38:26 +08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2013-09-17 09:30:34 +03:00
|
|
|
|
2022-07-07 22:05:25 -05:00
|
|
|
|
|
|
|
|
|
2013-09-17 09:30:34 +03:00
|
|
|
|
2022-07-07 22:05:25 -05:00
|
|
|
|
|
|
|
|
|
2014-06-12 19:00:01 +03:00
|
|
|
|
2013-09-17 09:30:34 +03:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-06 16:38:26 +08:00
|
|
|
|
2013-02-05 12:31:57 +08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2013-05-06 16:38:26 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-25 00:08:58 +08:00
|
|
|
|
2013-05-06 16:38:26 +08:00
|
|
|
|
2022-07-07 22:05:25 -05:00
|
|
|
|
|
|
|
|
|
2014-06-12 19:00:01 +03:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-06 16:38:27 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-25 15:35:22 +08:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2012-07-30 13:30:00 -07:00
|
|
|
|
2013-04-27 11:16:48 +08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-08-18 15:44:09 -07:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-08-18 15:44:09 -07:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-30 13:30:00 -07:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2013-04-25 15:35:22 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2013-03-27 17:23:41 -07:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-06-26 18:23:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2012-12-06 14:03:34 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-11 17:23:00 +02:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-30 15:59:57 -07:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-07-30 15:59:57 -07:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-06 16:38:27 +08:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-05-06 16:38:27 +08:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-27 11:16:48 +08:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
2023-03-20 21:06:22 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-05 15:20:23 +03:00
|
|
|
|
2023-06-26 18:23:00 -05:00
|
|
|
|
2014-06-05 15:20:23 +03:00
|
|
|
|
2023-03-20 21:06:22 -05:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-05-06 16:38:27 +08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2013-05-06 16:38:28 +08:00
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2023-03-20 21:06:23 -05:00
|
|
|
|
2013-04-25 15:35:21 +08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-05-06 16:38:27 +08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2013-05-06 16:38:28 +08:00
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2023-03-20 21:06:23 -05:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2015-10-03 15:32:55 +02:00
|
|
|
|
|
|
|
|
|
2015-03-28 00:03:51 -07:00
|
|
|
|
2015-10-03 15:32:55 +02:00
|
|
|
|
2015-03-28 00:03:51 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-03 15:32:55 +02:00
|
|
|
|
|
|
|
|
|
2015-03-28 00:03:51 -07:00
|
|
|
|
2015-10-03 15:32:55 +02:00
|
|
|
|
2015-03-28 00:03:51 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-29 04:11:45 -05:00
|
|
|
|
2015-03-28 00:03:51 -07:00
|
|
|
|
2015-10-03 15:32:55 +02:00
|
|
|
|
|
|
|
|
|
2015-03-28 00:03:51 -07:00
|
|
|
|
|
|
|
|
|
2015-10-03 15:32:55 +02:00
|
|
|
|
2015-03-28 00:03:51 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-05-06 16:38:27 +08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2013-05-06 16:38:28 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2013-05-06 16:38:28 +08:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-11 07:39:21 -07:00
|
|
|
|
2016-01-09 05:47:55 -08:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2020-11-09 23:33:20 -06:00
|
|
|
|
2016-01-09 05:47:55 -08:00
|
|
|
|
2020-11-09 23:33:20 -06:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2013-05-06 16:38:28 +08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-06 16:38:28 +08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2013-05-06 16:38:28 +08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-30 13:30:00 -07:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2012-07-30 13:30:00 -07:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2012-07-30 13:30:00 -07:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2012-07-30 13:30:00 -07:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2012-07-30 13:30:00 -07:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2012-07-30 13:30:00 -07:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2012-07-30 13:30:00 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2013-06-21 14:32:04 -07:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2012-07-30 13:30:00 -07:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2018-08-02 12:12:27 -05:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-03 15:32:55 +02:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-10-03 15:32:55 +02:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2013-05-06 16:38:28 +08:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2013-05-06 16:38:28 +08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2023-01-29 04:11:45 -05:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2013-05-06 16:38:28 +08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-03 15:32:55 +02:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-10-03 15:32:55 +02:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-03 15:32:55 +02:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2015-10-03 15:32:55 +02:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-06 16:38:27 +08:00
|
|
|
|
2018-06-22 14:53:02 -07:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2015-02-05 10:37:33 +03:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-05 10:37:33 +03:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-20 21:48:03 -07:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2012-07-30 13:30:00 -07:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-06 16:38:27 +08:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-05-06 16:38:27 +08:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2025-09-13 08:40:53 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-06 16:38:27 +08:00
|
|
|
|
2015-10-03 15:32:55 +02:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2023-01-29 04:11:45 -05:00
|
|
|
|
2025-06-11 07:39:21 -07:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-03 15:32:55 +02:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2015-10-03 15:32:55 +02:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-09 20:51:02 +05:30
|
|
|
|
2015-04-08 20:01:35 +02:00
|
|
|
|
2018-11-23 18:36:12 +01:00
|
|
|
|
2020-05-22 16:51:57 +00:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-28 00:03:51 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2013-06-06 02:20:41 -07:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-04-08 20:01:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-27 21:09:01 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2015-04-08 20:01:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
2021-02-27 10:59:58 -06:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-04-08 20:01:35 +02:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-11 07:39:21 -07:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-04-08 20:01:35 +02:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2025-06-11 07:39:21 -07:00
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2013-05-02 03:52:59 +03:00
|
|
|
|
|
|
|
|
|
2012-07-18 14:31:32 -07:00
|
|
|
|
2015-01-31 23:56:53 -08:00
|
|
|
|
|
|
|
|
|