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]
Message-ID: <56790278.1090301@suse.de>
Date:	Tue, 22 Dec 2015 08:57:44 +0100
From:	Hannes Reinecke <hare@...e.de>
To:	Finn Thain <fthain@...egraphics.com.au>,
	"James E.J. Bottomley" <JBottomley@...n.com>,
	Michael Schmitz <schmitzmic@...il.com>,
	linux-m68k@...r.kernel.org, linux-scsi@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	"Martin K. Petersen" <martin.petersen@...cle.com>
Subject: Re: [PATCH v3 59/77] ncr5380: Fix autosense bugs

On 12/22/2015 02:18 AM, Finn Thain wrote:
> NCR5380_information_transfer() may re-queue a command for autosense,
> after calling scsi_eh_prep_cmnd(). This creates several possibilities:
>
> 1. Reselection may intervene before the re-queued command gets processed.
>     If the reconnected command then undergoes autosense, this causes the
>     scsi_eh_save data from the previous command to be overwritten.
>
> 2. After NCR5380_information_transfer() calls scsi_eh_prep_cmnd(),
>     a new REQUEST SENSE command may arrive. This would be queued ahead
>     of any command already undergoing autosense, which means the
>     scsi_eh_save data might be restored to the wrong command.
>
> 3. After NCR5380_information_transfer() calls scsi_eh_prep_cmnd(),
>     eh_abort_handler() may abort the command. But the scsi_eh_save data is
>     not discarded, which means the scsi_eh_save data might be incorrectly
>     restored to the next REQUEST SENSE command issued.
>
> This patch adds a new autosense list so that commands that are re-queued
> because of a CHECK CONDITION result can be kept apart from the REQUEST
> SENSE commands that arrive via queuecommand.
>
> This patch also adds a function dedicated to dequeueing and preparing the
> next command for processing. By refactoring the main loop in this way,
> scsi_eh_save takes place when an autosense command is dequeued rather
> than when re-queued.
>
> Signed-off-by: Finn Thain <fthain@...egraphics.com.au>
>
> ---
>   drivers/scsi/NCR5380.c       |  194 +++++++++++++++++++---------------
>   drivers/scsi/NCR5380.h       |    2
>   drivers/scsi/atari_NCR5380.c |  239 ++++++++++++++++++++++++-------------------
>   3 files changed, 249 insertions(+), 186 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare@...e.com>

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