From owner-freebsd-bugs Mon Aug 11 21:10:07 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id VAA26409 for bugs-outgoing; Mon, 11 Aug 1997 21:10:07 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.5/8.8.5) id VAA26399; Mon, 11 Aug 1997 21:10:01 -0700 (PDT) Date: Mon, 11 Aug 1997 21:10:01 -0700 (PDT) Message-Id: <199708120410.VAA26399@hub.freebsd.org> To: freebsd-bugs Cc: From: "Justin T. Gibbs" Subject: Re: kern/4270: ch driver does not use bounce buffers Reply-To: "Justin T. Gibbs" Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR kern/4270; it has been noted by GNATS. From: "Justin T. Gibbs" 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 ===========================================