Re: [PATCH v2 0/6] SCSI target patches for kernel v4.12

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2017-05-10 at 13:37 -0700, Bart Van Assche wrote:
> Hello Nic,
> 
> As you requested I have rebased this patch series on top of the for-next
> branch of your target-pending git repository and I have left out those
> patches that are not bug fixes. Please consider these patches for kernel
> v4.12.

No, I'm not going to merge a bunch of changes at the last minute to
avoid a regression for something your patch exposed in for-next.

If you're able to trigger a issue outside of WRITE_VERIFY with
iscsi-target for target-pending/for-next, then we should make a change
to Roland's commit c72c525022 in >= v4.3.y to do the following.

diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 37f5735..b20acc8 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -1165,10 +1165,16 @@ int transport_dump_vpd_ident(
                        " 0x%02x\n", cmd->se_tfo->get_fabric_name(),
                                cmd->data_length, size, cmd->t_task_cdb[0]);
 
-               if (cmd->data_direction == DMA_TO_DEVICE &&
-                   cmd->se_cmd_flags & SCF_SCSI_DATA_CDB) {
-                       pr_err("Rejecting underflow/overflow WRITE data\n");
+               if (cmd->data_direction == DMA_TO_DEVICE) {
+
+                   if (cmd->se_cmd_flags & SCF_SCSI_DATA_CDB) {
+                       pr_err("Rejecting underflow/overflow WRITE SCSI_DATA_CDB\n");
+                       return TCM_INVALID_CDB_FIELD;
+                   }
+                   if (size > cmd->data_length) {
+                       pr_err("Rejecting overflow for WRITE CDB\n");
                        return TCM_INVALID_CDB_FIELD;
+                   }
                }
                /*
                 * Reject READ_* or WRITE_* with overflow/underflow for

Otherwise if you want to actually support WRITE overflow, you're more
than welcome to pursue that for v4.13-rc1, but I'm not going to make a
merge a bunch of changes at the last minute of a merge window.

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux