Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: linux emulation take two
On Wed, Jun 03, 2015 at 11:15:25AM -0400, Christos Zoulas wrote:
> On Jun 3, 3:52pm, prlw1%cam.ac.uk@localhost (Patrick Welche) wrote:
> -- Subject: Re: linux emulation take two
>
> | On Tue, Jun 02, 2015 at 03:34:31PM +0000, Christos Zoulas wrote:
> | > In article <20150602134017.GC10950%quark.internal.precedence.co.uk@localhost>,
> | > Patrick Welche <prlw1%cam.ac.uk@localhost> wrote:
> | > >Starting again... On the same -current/amd64 computer, with suse 13.2
> | > >installed, /emul/linux32/usr/bin/xeyes fails with:
> | >
> | > There is no chance those will work under linux32. You need to
> | > convert the msghdr structures and the iov's... Copying the
> | > sendmsg/recvmsg code from linux/common/linux_socket.c to
> | > linux32/common/linux32_socket.c, adjusting the structs, and then
> | > doing the iov conversions like they are done in
> | > netbsd32/netbsd32_socket.c is what needs to be done to get those
> | > working. Give it a try! It should not be too hard, all the bits
> | > are there.
> |
> | I've been having a good crack at it - this bit doesn't look promising though:
I just managed enough of linux32_sys_recvmsg to run 32-bit linux xeyes.
I didn't deal with the control structure, and return ENOSYS if that
part is needed. (This means that xeyes only needs the iov part.)
So, I just tried a more complicated 32-bit linux binary, hoping that
as it does networking, it might use the control structure part for
testing.
I just got a panic linux32_ioctl_socket. The backtrace seems very odd,
as:
(gdb) frame 8
#8 0xffffffff80526e98 in netbsd32_ioctl (l=<optimized out>,
uap=uap@entry=0xfffffe804466bdd0, retval=retval@entry=0xfffffe804466be70)
at /usr/ptl/jsonn/src/sys/compat/netbsd32/netbsd32_ioctl.c:1063
1063 error = (*fp->f_ops->fo_ioctl)(fp, FIOASYNC, (void *)&tmp);
suggests FIOASYNC, yet
(gdb) frame 7
#7 0xffffffff806fa316 in soo_ioctl (fp=<optimized out>, cmd=3223349517,
data=0xfffffe804466bd18) at /usr/ptl/jsonn/src/sys/kern/sys_socket.c:202
202 error = ifioctl(so, cmd, data, curlwp);
and in sys_socket:soo_ioctl() we have
switch (cmd) {
...
case FIOASYNC:
...
break;
default:
...
error = ifioctl(so, cmd, data, curlwp);
break;
}
so I didn't expect to reach line sys_socket.c:202...
Thoughts?
Cheers,
Patrick
Home |
Main Index |
Thread Index |
Old Index