From owner-freebsd-alpha Fri Mar 23 21:45:42 2001 Delivered-To: freebsd-alpha@freebsd.org Received: from meow.osd.bsdi.com (meow.osd.bsdi.com [204.216.28.88]) by hub.freebsd.org (Postfix) with ESMTP id 2686A37B71A; Fri, 23 Mar 2001 21:45:40 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: from laptop.baldwin.cx (john@jhb-laptop.osd.bsdi.com [204.216.28.241]) by meow.osd.bsdi.com (8.11.2/8.11.2) with ESMTP id f2O5j1G37048; Fri, 23 Mar 2001 21:45:01 -0800 (PST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200103240509.f2O59L900618@mass.dis.org> Date: Fri, 23 Mar 2001 21:45:12 -0800 (PST) From: John Baldwin To: Mike Smith Subject: Re: dev_t size mismatch kernel / userland Cc: freebsd-alpha@FreeBSD.org, grog@FreeBSD.org, leclercn@videotron.ca Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On 24-Mar-01 Mike Smith wrote: >> Already tried vinum, works fine after modification of dev_t to >> u_int64_t. I'll change it to uintptr_t tough (cleaner). Hope this gets >> fixed! > > This is wrong. In the kernel or in a module, dev_t is an opaque type. > In userspace, you use udev_t, not dev_t. > > It sounds like vinum is failing to perform the required conversions when > exchanging a dev_t with userland, and the correct fix is going to be to > add these. struct drive, struct plex, etc. are shared between userland and the kernel. It looks like they need to use a udev_t, and the kernel will always have to do udev2dev() before using them. Either that or don't export the structures to userland. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message