Coda File System

Re: Continued: 64-bit issues

From: Michael Tautschnig <michael.tautschnig_at_zt-consulting.com>
Date: Fri, 6 Aug 2004 09:39:32 +0200 (CEST)
>
> > As I took a closer look into the sources, I got pretty sure, that my
> > problem lies in the different pointer-sizes when having a 32-bit userland
> > and a 64-bit kernel. Could somebody confirm that?
>
> That would cause trouble, yes.
>
> > The structs ViceIoctl and PioctlData both contain pointers - but what
> > would be a good solution for that problem?
>
> If I follow (which I'm not sure), you are saying that structures which
> are passed by reference across the user/kernel boundary contain
> pointers to other structures?  This is a real problem, because with a
> 64-bit venus we can't assume the high 4 bytes are zero.  A kludge
> would be to define then as uint32_t, and cast back to pointers in the
> kernel.  With a 32-bit venus, you'll get the right answer since there
> of course are no addresses >32 bits.

Well, but this absolutely not portable to pure 64-bit Systems - but what
about using u_int64_t? I'll try... But is this the preferred solution for
such problems? Are there any better solutions?

Regards,
Michael
Received on 2004-08-06 03:45:21