Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Mar 2001 08:04:01 +0200
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        Greg Lehey <grog@lemis.com>
Cc:        Mike Smith <msmith@freebsd.org>, John Baldwin <jhb@freebsd.org>, leclercn@videotron.ca, freebsd-alpha@freebsd.org
Subject:   Re: dev_t size mismatch kernel / userland 
Message-ID:  <73387.985673041@critter>
In-Reply-To: Your message of "Tue, 27 Mar 2001 09:33:27 %2B0930." <20010327093327.A40349@wantadilla.lemis.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <20010327093327.A40349@wantadilla.lemis.com>, Greg Lehey writes:
>On Monday, 26 March 2001 at 13:00:32 -0800, Mike Smith wrote:
>>>> This will probably make Poul's head spin, but one idea might be to have a
>>>> kdev_t type. :-P  In the kernel kdev_t == dev_t, and in userland, kdev_t is a
>>>> void *.  This would work in this case I think because you never use the dev_t's
>>>> while in userland.  I do like exporting trimmed down structures, however.
>>>> Please don't export mutexes while you are at it. :-P
>>>
>>> Guys,
>>>
>>> I'm new to this subject, so please fill me in: just what in the
>>> (kernel) dev_t do you want to export to userland ?
>>
>> Nothing.  Greg just leaks a dev_t in a structure exchanged between
>> userland and the kernel, and this bit because dev_t is a different
>> size between the two on the Alpha; the right fix is simply to not
>> abuse this structure like this.
>
>You're missing a number of things here.  If a dev_t is defined in
>userland, it should be the same size as in the kernel.  The current
>situation is obviously a bug. 

The current situation is the best compromise between breaking
POSIX compliance for userland or source-code compatibility
for the kernel.

>It's certainly open to discussion
>whether the dev_t definition in userland gets removed or fixed.

The userland definition of dev_t is not changeable without breaking
POSIX compliance.

If you ratify on arch@ that "dev_t" gets renamed in the kernel,
then I'll do the work.

--
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message




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