ports/emulators/linux_base on amd64

Sean McNeil sean at mcneil.com
Wed Dec 15 10:59:40 PST 2004


On Wed, 2004-12-15 at 12:26 +0200, Ruslan Ermilov wrote:
> The reason for this is as follows:
> 
> hammer# grep -C3 TJR /sys/compat/linux/linux_socket.c 
>         struct iovec *iov;
>         int error;
> 
>         /* XXXTJR sendmsg is broken on amd64 */
> 
>         error = copyin(args, &linux_args, sizeof(linux_args));
>         if (error)
> --
>         struct cmsghdr *cmsg;
>         int error;
> 
>         /* XXXTJR recvmsg is broken on amd64 */
> 
>         if ((error = copyin(args, &linux_args, sizeof(linux_args))))
>                 return (error);

Is there any additional work being done with linux emulation on amd64?
There is something odd here that puzzles me.  There are changes to
convert 32-bit pointers over to 64-bit as it does the copyin.  For
sendmsg/recvmsg, these have a msghdr structure that can get a little
complicated (especially mgs_control which is protocol dependent).  But
I'm not sure why this is done at all.  Why convert the 32-bit pointers
in the linux emulation?  Why not have the linux emulation as it should
be - independent of architecture sizes - and have it build on top of
64-bit or compat_ia32 for 32-bit?  This would go a very long way in
getting linux64 working under FreeBSD, wouldn't it?

Cheers,
Sean

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-amd64/attachments/20041215/cd1874f1/attachment.bin


More information about the freebsd-amd64 mailing list