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: <20070614164447.GA1110@hmsreliant.homelinux.net>
Date:	Thu, 14 Jun 2007 12:44:47 -0400
From:	Neil Horman <nhorman@...driver.com>
To:	Randy Dunlap <randy.dunlap@...cle.com>
Cc:	linux-kernel@...r.kernel.org, mike.miller@...com,
	iss_storagedev@...com, akpm@...ux-foundation.org
Subject: Re: [PATCH] cciss: force ignore of responses to unsent scsi commands after kexec reboot

On Thu, Jun 14, 2007 at 08:59:24AM -0700, Randy Dunlap wrote:
> On Thu, 14 Jun 2007 11:31:19 -0400 Neil Horman wrote:
> 
> > Hey -
> > 	cciss hardware currently can continue to send responses to scsi commands
> > after the host system has undergone a kexec reboot.  The way the drier is
> > currently written, reception of these commands results in a BUG halt, since it
> > can't match the response to any issued command since the boot.  This patch
> > corrects that by using the kexec reset_devices command line paramter to force
> > ignore any commands that it cant correlate.
> > 
> > Regards
> > Neil
> > 
> > Signed-off-by: Neil Horman <nhorman@...driver.com>
> > 
> > 
> >  cciss.c |    8 ++++++++
> >  1 file changed, 8 insertions(+)
> > 
> > 
> > diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
> > index 5acc6c4..ec1c1d2 100644
> > --- a/drivers/block/cciss.c
> > +++ b/drivers/block/cciss.c
> > @@ -2131,6 +2131,14 @@ static int add_sendcmd_reject(__u8 cmd, int ctlr, unsigned long complete)
> >  		       ctlr, complete);
> >  		/* not much we can do. */
> >  #ifdef CONFIG_CISS_SCSI_TAPE
> > +		/* We might get notification of completion of commands
> > +		 * which we never issued in this kernel if this boot is
> > +		 * taking place after previous kernel's crash. Simply
> > +		 * ignore the commands in this case.
> > +		 */
> > +		if (reset_devices)
> > +			return 0;
> > +
> >  		return 1;
> >  	}
> 
> But this patch applies only to SCSI tape devices, not to
> disk devices?
> 
No it only applies if CONFIG_CISS_SCSI_TAPE is defined (which is different than
only being applicable to scsi tape devices.  I'm not sure why the cciss driver
ifdefs the relevant code to only support TAPE devices, but I figured that wasn't
as relevant to this problem.  Sufice it to say, that all scsi commands to all
cciss devices pass through this code if CONFIG_CISS_SCSI_TAPE is defined, and if
its not defined, add_sendcmd_reject always returns 0

Thanks & Regards
Neil

> ---
> ~Randy
> *** Remember to use Documentation/SubmitChecklist when testing your code ***

-- 
/***************************************************
 *Neil Horman
 *Software Engineer
 *Red Hat, Inc.
 *nhorman@...driver.com
 *gpg keyid: 1024D / 0x92A74FA1
 *http://pgp.mit.edu
 ***************************************************/
-
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