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] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 14 Jul 2014 08:16:12 +0200
From:	Hannes Reinecke <hare@...e.de>
To:	"K. Y. Srinivasan" <kys@...rosoft.com>, jasowang@...hat.com,
	apw@...onical.com, linux-kernel@...r.kernel.org,
	devel@...uxdriverproject.org, ohering@...e.com,
	jbottomley@...allels.com, hch@...radead.org,
	linux-scsi@...r.kernel.org
CC:	stable@...r.kernel.org
Subject: Re: [PATCH V3 3/7] Drivers: scsi: storvsc: Filter commands based
 on the storage protocol version

On 07/12/2014 06:48 PM, K. Y. Srinivasan wrote:
> Going forward it is possible that some of the commands that are not currently
> implemented will be implemented on future Windows hosts. Even if they are not
> implemented, we are told the host will corrrectly handle unsupported
> commands (by returning appropriate return code and sense information).
> Make command filtering depend on the host version.
>
> In this version of the patch I have addressed comments from
> Christoph Hellwig <hch@...radead.org>
>
> Signed-off-by: K. Y. Srinivasan <kys@...rosoft.com>
> Cc: <stable@...r.kernel.org>
> ---
>   drivers/scsi/storvsc_drv.c |   16 +++++++++++++---
>   1 files changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
> index cebcef7..8f8847e 100644
> --- a/drivers/scsi/storvsc_drv.c
> +++ b/drivers/scsi/storvsc_drv.c
> @@ -1553,9 +1553,19 @@ static int storvsc_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *scmnd)
>   	struct vmscsi_request *vm_srb;
>   	struct stor_mem_pools *memp = scmnd->device->hostdata;
>
> -	if (!storvsc_scsi_cmd_ok(scmnd)) {
> -		scmnd->scsi_done(scmnd);
> -		return 0;
> +	if (vmstor_current_major <= VMSTOR_WIN8_MAJOR) {
> +		/*
> +		 * On legacy hosts filter unimplemented commands.
> +		 * Future hosts are expected to correctly handle
> +		 * unsupported commands. Furthermore, it is
> +		 * possible that some of the currently
> +		 * unsupported commands maybe supported in
> +		 * future versions of the host.
> +		 */
> +		if (!storvsc_scsi_cmd_ok(scmnd)) {
> +			scmnd->scsi_done(scmnd);
> +			return 0;
> +		}
>   	}
>
>   	request_size = sizeof(struct storvsc_cmd_request);
>
Reviewed-by: Hannes Reinecke <hare@...e.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@...e.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ