lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 31 May 2022 13:18:50 +0000
From:   "Michael Kelley (LINUX)" <mikelley@...rosoft.com>
To:     Saurabh Sengar <ssengar@...ux.microsoft.com>,
        KY Srinivasan <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        "wei.liu@...nel.org" <wei.liu@...nel.org>,
        Dexuan Cui <decui@...rosoft.com>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
        "jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Saurabh Singh Sengar <ssengar@...rosoft.com>
Subject: RE: [PATCH] scsi: storvsc: Enabling WRITE_SAME

From: Saurabh Sengar <ssengar@...ux.microsoft.com>
> 
> This driver already has code logic for WRITE_SAME, but was never working
> because of a bug where WRITE_SAME is disabled at scsi controller level.
> Apparently if WRITE_SAME is disabled at scsi controller level it takes
> precedence over disk level setting. This patch fixes this bug, and enables
> this feature only for VMSTOR protocol version 10.0 and above.
> 
> Signed-off-by: Saurabh Sengar <ssengar@...ux.microsoft.com>
> ---
>  drivers/scsi/storvsc_drv.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
> index ca35309..3e55687 100644
> --- a/drivers/scsi/storvsc_drv.c
> +++ b/drivers/scsi/storvsc_drv.c
> @@ -50,6 +50,7 @@
>   * Win8: 5.1
>   * Win8.1: 6.0
>   * Win10: 6.2
> + * Win10.1: 10.0
>   */
> 
>  #define VMSTOR_PROTO_VERSION(MAJOR_, MINOR_)	((((MAJOR_) & 0xff) << 8) | \
> @@ -59,6 +60,7 @@
>  #define VMSTOR_PROTO_VERSION_WIN8	VMSTOR_PROTO_VERSION(5, 1)
>  #define VMSTOR_PROTO_VERSION_WIN8_1	VMSTOR_PROTO_VERSION(6, 0)
>  #define VMSTOR_PROTO_VERSION_WIN10	VMSTOR_PROTO_VERSION(6, 2)
> +#define VMSTOR_PROTO_VERSION_WIN10_1	VMSTOR_PROTO_VERSION(10, 0)

As you and I discussed offline, it's a bit weird that Hyper-V is using version 10.0
here instead of the expected 6.3, or even 7.0.  I'd like to hold off on this patch
until we can clarify with the Hyper-V team whether this is as expected.

Michael

> 
>  /*  Packet structure describing virtual storage requests. */
>  enum vstor_packet_operation {
> @@ -205,6 +207,7 @@ struct vmscsi_request {
>   */
> 
>  static const int protocol_version[] = {
> +		VMSTOR_PROTO_VERSION_WIN10_1,
>  		VMSTOR_PROTO_VERSION_WIN10,
>  		VMSTOR_PROTO_VERSION_WIN8_1,
>  		VMSTOR_PROTO_VERSION_WIN8,
> @@ -1558,7 +1561,7 @@ static int storvsc_device_configure(struct scsi_device *sdevice)
>  			break;
>  		}
> 
> -		if (vmstor_proto_version >= VMSTOR_PROTO_VERSION_WIN10)
> +		if (vmstor_proto_version >= VMSTOR_PROTO_VERSION_WIN10_1)
>  			sdevice->no_write_same = 0;
>  	}
> 
> @@ -1845,7 +1848,6 @@ static int storvsc_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *scmnd)
>  	.this_id =		-1,
>  	/* Ensure there are no gaps in presented sgls */
>  	.virt_boundary_mask =	PAGE_SIZE-1,
> -	.no_write_same =	1,
>  	.track_queue_depth =	1,
>  	.change_queue_depth =	storvsc_change_queue_depth,
>  };
> --
> 1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ