From owner-freebsd-hackers Sat Oct 31 07:05:08 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA04444 for freebsd-hackers-outgoing; Sat, 31 Oct 1998 07:05:08 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from porkfriedrice.ny.genx.net (porkfriedrice.ny.genx.net [206.64.4.30]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA04438 for ; Sat, 31 Oct 1998 07:05:06 -0800 (PST) (envelope-from bright@hotjobs.com) Received: from localhost (bright@localhost) by porkfriedrice.ny.genx.net (8.9.1/8.9.1) with ESMTP id KAA13436 for ; Sat, 31 Oct 1998 10:07:47 -0500 (EST) (envelope-from bright@hotjobs.com) X-Authentication-Warning: porkfriedrice.ny.genx.net: bright owned process doing -bs Date: Sat, 31 Oct 1998 10:07:47 -0500 (EST) From: Alfred Perlstein X-Sender: bright@porkfriedrice.ny.genx.net To: hackers@FreeBSD.ORG Subject: copyin/copyout routines. Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG someone showed me a driver they were working on that was getting errors using copyin and copyout.. the error was when they used copyin to copy from user land into the kernel they would get a bad adress error. the location they were copying to was on the kernel stack ie. int x; y = copyin(useraddr, &x, sizeof(x)); for some reason i think that copyin only works in/out of the kernel malloc error, basically he should be copying into malloc'd areas, not the stack. is this true? Alfred Perlstein - Programmer, HotJobs Inc. - www.hotjobs.com -- There are operating systems, and then there's FreeBSD. -- http://www.freebsd.org/ 3.0-current To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message