Thomas Higdon
e2f0c49ffa
scsi: Guard against buflen exceeding req->cmd.xfer in scsi_disk_emulate_command
...
Limit the return value (corresponding to the length of the buffer to be
DMAed back to the intiator) to the value in req->cmd.xfer, which is the
amount of data that the initiator expects. Eliminate now-duplicate code
that does this guarding in the functions for individual commands.
Without this, the SCRIPTS code in the emulated LSI device eventually
raises a DMA interrupt for a data overrun when an INQUIRY command whose
buflen exceeds req->cmd.xfer is processed. It's the responsibility of
the client to provide a request buffer and allocation length that are
large enough for the result of the command.
Signed-off-by: Thomas Higdon <thigdon@akamai.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-01-26 14:49:18 +01:00
..
2012-01-06 12:50:44 -06:00
2012-01-21 05:17:01 +01:00
2012-01-19 12:14:42 +01:00
2012-01-17 10:54:07 +00:00
2012-01-13 10:55:56 -06:00
2012-01-13 10:55:56 -06:00
2012-01-13 10:55:56 -06:00
2012-01-13 10:55:56 -06:00
2012-01-22 07:27:06 +00:00
2012-01-19 12:14:40 +01:00
2012-01-19 12:14:40 +01:00
2012-01-19 12:14:40 +01:00
2012-01-19 12:14:40 +01:00
2012-01-13 10:55:56 -06:00
2012-01-17 10:54:07 +00:00
2012-01-17 02:08:22 +01:00
2012-01-17 10:54:07 +00:00
2012-01-04 13:41:42 +00:00
2012-01-17 10:54:07 +00:00
2012-01-17 02:08:22 +01:00
2012-01-17 10:54:07 +00:00
2012-01-13 10:55:56 -06:00
2012-01-22 07:27:06 +00:00
2012-01-13 10:55:56 -06:00
2012-01-25 18:32:59 +00:00
2012-01-13 10:55:56 -06:00
2012-01-13 10:55:56 -06:00
2012-01-23 07:30:43 -06:00
2012-01-13 10:55:56 -06:00
2012-01-10 18:40:09 +01:00
2012-01-12 13:54:17 +01:00
2012-01-12 13:54:17 +01:00
2012-01-12 13:54:17 +01:00
2012-01-13 10:20:50 -06:00
2012-01-13 10:55:56 -06:00
2012-01-25 18:32:47 +00:00
2012-01-21 05:17:04 +01:00
2012-01-13 10:20:50 -06:00
2012-01-13 10:20:50 -06:00
2012-01-13 10:55:56 -06:00
2012-01-13 10:20:51 -06:00
2012-01-13 10:20:51 -06:00
2012-01-13 10:20:51 -06:00
2012-01-19 12:14:40 +01:00
2012-01-19 12:14:40 +01:00
2012-01-19 12:14:40 +01:00
2012-01-20 00:27:12 +01:00
2012-01-20 00:27:12 +01:00
2012-01-10 18:40:01 +01:00
2012-01-19 12:14:41 +01:00
2012-01-19 12:14:41 +01:00
2012-01-19 12:14:41 +01:00
2012-01-13 10:55:56 -06:00
2012-01-17 10:54:07 +00:00
2012-01-13 10:20:50 -06:00
2012-01-13 10:20:50 -06:00
2012-01-21 05:17:01 +01:00
2012-01-13 10:55:56 -06:00
2012-01-13 10:55:56 -06:00
2012-01-13 10:55:56 -06:00
2012-01-13 10:20:50 -06:00
2012-01-13 10:20:50 -06:00
2012-01-13 10:20:50 -06:00
2012-01-13 10:20:50 -06:00
2012-01-19 08:16:41 +00:00
2012-01-13 10:55:56 -06:00
2012-01-22 07:27:06 +00:00
2012-01-19 12:14:39 +01:00
2012-01-19 12:14:39 +01:00
2012-01-19 12:14:39 +01:00
2012-01-19 12:14:39 +01:00
2012-01-13 10:55:56 -06:00
2012-01-13 10:55:56 -06:00
2012-01-13 10:55:56 -06:00
2012-01-04 10:06:25 -06:00
2012-01-13 10:36:59 +00:00
2012-01-19 12:14:42 +01:00
2012-01-23 11:00:26 -06:00
2012-01-23 11:00:26 -06:00
2012-01-20 00:27:12 +01:00
2012-01-22 07:27:06 +00:00
2012-01-22 07:27:06 +00:00
2012-01-13 10:20:51 -06:00
2012-01-13 10:36:59 +00:00
2012-01-13 10:55:56 -06:00
2012-01-21 05:17:01 +01:00
2012-01-21 05:17:01 +01:00
2012-01-20 00:27:13 +01:00
2012-01-20 00:27:12 +01:00
2012-01-13 10:20:50 -06:00
2012-01-13 10:20:51 -06:00
2012-01-17 02:14:42 +01:00
2012-01-17 01:40:18 +01:00
2012-01-13 10:55:56 -06:00
2012-01-13 10:55:56 -06:00
2012-01-13 10:21:03 -06:00
2012-01-22 07:27:06 +00:00
2012-01-22 07:27:06 +00:00
2012-01-25 18:32:47 +00:00
2012-01-17 10:54:07 +00:00
2012-01-17 10:54:07 +00:00
2012-01-22 07:27:06 +00:00
2012-01-26 14:49:18 +01:00
2012-01-06 15:07:00 +00:00
2012-01-22 07:29:16 +00:00
2012-01-13 10:20:50 -06:00
2012-01-13 10:20:50 -06:00
2012-01-07 21:29:26 +01:00
2012-01-13 10:55:56 -06:00
2012-01-21 05:17:02 +01:00
2012-01-22 07:27:06 +00:00
2012-01-13 10:55:56 -06:00
2012-01-13 10:55:56 -06:00
2012-01-13 10:55:56 -06:00
2012-01-13 10:55:56 -06:00
2012-01-17 02:08:19 +01:00
2012-01-13 10:55:56 -06:00
2012-01-25 18:32:47 +00:00
2012-01-13 10:55:56 -06:00
2012-01-13 10:25:44 +01:00
2012-01-13 10:25:44 +01:00
2012-01-17 09:44:50 +01:00
2012-01-13 10:25:44 +01:00
2012-01-17 09:44:50 +01:00
2012-01-13 10:25:44 +01:00
2012-01-17 09:44:50 +01:00
2012-01-13 10:25:44 +01:00
2012-01-13 10:25:44 +01:00
2012-01-13 10:25:44 +01:00
2012-01-17 09:44:50 +01:00
2012-01-13 10:25:44 +01:00
2012-01-17 09:44:50 +01:00
2012-01-13 10:25:44 +01:00
2012-01-17 09:44:50 +01:00
2012-01-13 10:25:44 +01:00
2012-01-17 09:44:32 +01:00
2012-01-17 09:44:50 +01:00
2012-01-19 08:34:38 -06:00
2012-01-17 10:54:07 +00:00
2012-01-25 18:32:47 +00:00
2012-01-13 10:55:56 -06:00
2012-01-25 18:32:47 +00:00
2012-01-21 05:17:01 +01:00
2012-01-26 14:49:18 +01:00
2012-01-13 10:21:03 -06:00
2012-01-21 05:17:01 +01:00
2012-01-13 10:55:56 -06:00
2012-01-21 05:17:01 +01:00
2012-01-22 07:27:06 +00:00
2012-01-13 10:55:56 -06:00
2012-01-10 18:47:06 +01:00
2012-01-13 10:55:56 -06:00
2012-01-13 10:55:56 -06:00
2012-01-13 10:55:56 -06:00
2012-01-13 10:20:50 -06:00
2012-01-13 10:20:50 -06:00
2012-01-13 10:55:56 -06:00