Re: [PATCH 1/1] iscsi-target: remove support for obsolete markers

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

 



Hi Christophe,

On Sun, 2015-04-19 at 22:18 +0200, Christophe Vu-Brugier wrote:
> Support for markers is currently broken because of a bug in
> iscsi_enforce_integrity_rules(): the "IFMarkInt_Reject" and
> "OFMarkInt_Reject" variables are always equal to 1 in
> iscsi_enforce_integrity_rules().
> 
> Moreover, fixed interval markers keys (IFMarker, OFMarker, IFMarkInt
> and OFMarkInt) are obsolete according to iSCSI RFC 7143:
> 
> From http://tools.ietf.org/html/rfc7143#section-13.25:
> 
>    13.25.  Obsoleted Keys
> 
>    This document obsoletes the following keys defined in [RFC3720]:
>    IFMarker, OFMarker, OFMarkInt, and IFMarkInt.  However, iSCSI
>    implementations compliant to this document may still receive these
>    obsoleted keys -- i.e., in a responder role -- in a text negotiation.
> 
>    When an IFMarker or OFMarker key is received, a compliant iSCSI
>    implementation SHOULD respond with the constant "Reject" value.  The
>    implementation MAY alternatively respond with a "No" value.
> 
>    However, the implementation MUST NOT respond with a "NotUnderstood"
>    value for either of these keys.
> 
>    When an IFMarkInt or OFMarkInt key is received, a compliant iSCSI
>    implementation MUST respond with the constant "Reject" value.  The
>    implementation MUST NOT respond with a "NotUnderstood" value for
>    either of these keys.
> 
> This patch disables markers by turning the corresponding parameters to
> read-only. The default value of IFMarker and OFMarker remains "No" but
> the user cannot change it to "Yes" anymore. The new value of IFMarkInt
> and OFMarkInt is "Reject".
> 
> Signed-off-by: Christophe Vu-Brugier <cvubrugier@xxxxxxxxxxx>
> ---

<SNIP>

> diff --git a/drivers/target/iscsi/iscsi_target_configfs.c b/drivers/target/iscsi/iscsi_target_configfs.c
> index 469fce4..8686af1 100644
> --- a/drivers/target/iscsi/iscsi_target_configfs.c
> +++ b/drivers/target/iscsi/iscsi_target_configfs.c
> @@ -1313,16 +1313,16 @@ DEF_TPG_PARAM(ErrorRecoveryLevel);
>  TPG_PARAM_ATTR(ErrorRecoveryLevel, S_IRUGO | S_IWUSR);
>  
>  DEF_TPG_PARAM(IFMarker);
> -TPG_PARAM_ATTR(IFMarker, S_IRUGO | S_IWUSR);
> +TPG_PARAM_ATTR(IFMarker, S_IRUGO);
>  
>  DEF_TPG_PARAM(OFMarker);
> -TPG_PARAM_ATTR(OFMarker, S_IRUGO | S_IWUSR);
> +TPG_PARAM_ATTR(OFMarker, S_IRUGO);
>  
>  DEF_TPG_PARAM(IFMarkInt);
> -TPG_PARAM_ATTR(IFMarkInt, S_IRUGO | S_IWUSR);
> +TPG_PARAM_ATTR(IFMarkInt, S_IRUGO);
>  
>  DEF_TPG_PARAM(OFMarkInt);
> -TPG_PARAM_ATTR(OFMarkInt, S_IRUGO | S_IWUSR);
> +TPG_PARAM_ATTR(OFMarkInt, S_IRUGO);
>  

Btw, just a heads up that I've changed these four parameters back to
R/W, as user-space still expects this to be the case.

Thank you,

--nab

--
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