Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Aug 1997 21:10:01 -0700 (PDT)
From:      "Justin T. Gibbs" <gibbs@plutotech.com>
To:        freebsd-bugs
Subject:   Re: kern/4270: ch driver does not use bounce buffers 
Message-ID:  <199708120410.VAA26399@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/4270; it has been noted by GNATS.

From: "Justin T. Gibbs" <gibbs@plutotech.com>
To: fmc@reanimators.org
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: kern/4270: ch driver does not use bounce buffers 
Date: Mon, 11 Aug 1997 22:03:28 -0600

 >	Some notes:
 
 ...
 
 >	(c) There's another code path in the ch driver where a buffer
 >	    is allocated on the stack (not malloc()ed) and passed
 >	    down through scsi_scsi_cmd().  Is that safe?  I don't
 >	    know.  (See ch_get_params() and the use of sense_data.)
 
 Yes, it happens to be safe as scsi_scsi_cmd has a hack in it to
 detect stack allocations and to bounce them either through a malloced
 buffer or a vm_bounce buffer.  It is a hack since the type drivers
 should not be putting anything on the stack since at the time the
 virtual address is translated/accessed/etc. you may be in a totally
 different process context or none at all.
 
 --
 Justin T. Gibbs
 ===========================================
   FreeBSD: Turning PCs into workstations
 ===========================================



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708120410.VAA26399>