1. 24 10月, 2011 1 次提交
  2. 17 9月, 2011 2 次提交
    • N
      iscsi-target: Fix sendpage breakage with proper padding+DataDigest iovec offsets · 40b05497
      Nicholas Bellinger 提交于
      This patch fixes a bug in the iscsit_fe_sendpage_sg() transmit codepath that
      was originally introduced with the v3.1 iscsi-target merge that incorrectly
      uses hardcoded cmd->iov_data_count values to determine cmd->iov_data[] offsets
      for extra outgoing padding and DataDigest payload vectors.
      
      This code is obviously incorrect for the DataDigest enabled case with sendpage
      offload, and this fix ensures correct operation for padding + DataDigest,
      padding only, and DataDigest only cases.  The bug was introduced during a
      pre-merge change in iscsit_fe_sendpage_sg() to natively use struct scatterlist
      instead of the legacy v3.0 struct se_mem logic.
      
      Cc: Andy Grover <agrover@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      40b05497
    • N
      iscsi-target: Disable markers + remove dangerous local scope array usage · 2ff017f5
      Nicholas Bellinger 提交于
      This patch makes iscsi-target explictly disable OFMarker=Yes and IFMarker=yes
      parameter key usage during iscsi login by setting IFMarkInt_Reject and
      OFMarkInt_Reject values in iscsi_enforce_integrity_rules() to effectively
      disable iscsi marker usage.  With this patch, an initiator proposer asking
      to enable either marker parameter keys will be issued a 'No' response, and
      the target sets OFMarkInt + IFMarkInt parameter key response to 'Irrelevant'.
      
      With markers disabled during iscsi login, this patch removes the problematic
      on-stack local-scope array for marker intervals in iscsit_do_rx_data() +
      iscsit_do_tx_data(), and other related marker code in iscsi_target_util.c.
      This fixes a potentional stack smashing scenario with small range markers
      enabled and a large MRDSL as reported by DanC here:
      
      [bug report] target: stack can be smashed
      http://www.spinics.net/lists/target-devel/msg00453.htmlReported-by: NDan Carpenter <error27@gmail.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      2ff017f5
  3. 23 8月, 2011 1 次提交
  4. 26 7月, 2011 1 次提交
    • N
      iscsi-target: Add iSCSI fabric support for target v4.1 · e48354ce
      Nicholas Bellinger 提交于
      The Linux-iSCSI.org target module is a full featured in-kernel
      software implementation of iSCSI target mode (RFC-3720) for the
      current WIP mainline target v4.1 infrastructure code for the v3.1
      kernel.  More information can be found here:
      
      http://linux-iscsi.org/wiki/ISCSI
      
      This includes support for:
      
         * RFC-3720 defined request / response state machines and support for
           all defined iSCSI operation codes from Section 10.2.1.2 using libiscsi
           include/scsi/iscsi_proto.h PDU definitions
         * Target v4.1 compatible control plane using the generic layout in
           target_core_fabric_configfs.c and fabric dependent attributes
           within /sys/kernel/config/target/iscsi/ subdirectories.
         * Target v4.1 compatible iSCSI statistics based on RFC-4544 (iSCSI MIBS)
         * Support for IPv6 and IPv4 network portals in M:N mapping to TPGs
         * iSCSI Error Recovery Hierarchy support
         * Per iSCSI connection RX/TX thread pair scheduling affinity
         * crc32c + crc32c_intel SSEv4 instruction offload support using libcrypto
         * CHAP Authentication support using libcrypto
         * Conversion to use internal SGl allocation with iscsit_alloc_buffs() ->
           transport_generic_map_mem_to_cmd()
      
      (nab: Fix iscsi_proto.h struct scsi_lun usage from linux-next in commit:
            iscsi: Use struct scsi_lun in iscsi structs instead of u8[8])
      (nab: Fix 32-bit compile warnings)
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NAndy Grover <agrover@redhat.com>
      Acked-by: NRoland Dreier <roland@kernel.org>
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      e48354ce