Mailinglist Archive: opensuse-amd64 (449 mails)

< Previous Next >
Re: [suse-amd64] 32 bit API for sendmsg using AppleTalk fails with invalid argument
  • From: Helmut Tschemernjak <helmut@xxxxxxxxx>
  • Date: Mon, 18 Oct 2004 20:40:56 +0000 (UTC)
  • Message-id: <41742961.8080809@xxxxxxxxx>
Hello,

I found some ioctl functions for the AppleTalk protocol which are missing in the net/socket.c 32/64 pointer conversion. This may result into the sendmsg errors which I posted yesterday.

The found the following SIOC* in the appletalk/ddp.c file:
SIOCGIFFLAGS
SIOCGIFADDR SIOCSIFADDR SIOCDIFADDR
SIOCADDRT
SIOCATALKDIFADDR
SIOCGIFBRDADDR
SIOCDARP SIOCSARP
There are some more in appletalk/ddp.c which are not listed here.

I checked the code and cannot find the 32/64 bit conversion. Is this correct?

Helmut

Helmut Tschemernjak wrote:
Hello Andi,

thank you for the help. The compat conversion looks OK for all sendmsg msghdr parameters. I will further investigate into it and keep you posted about the results.

Helmut

Andi Kleen wrote:

On Sun, Oct 17, 2004 at 09:35:28PM +0200, Helmut Tschemernjak wrote:

i am new to this list and look for some help regarding the sendmsg system call. I like to find out why the the sendmsg system call works for AppleTalk DDP sockets on Suse 9.1/ia32 and fails on a 64 bit Suse 9.1 OS using the 32 bit existing binary.



Could be a bug in the 32bit emulation layer.

I have tried to investigate where the 32bit API parameters gets converted into 64 bit. I believe there could be a binary API bug. Is the directory "linux/arch/x86_64/ia32" at good place to look?



linux/net/compat.c


It looks like the kernel will do booth system calls 32 bit and 64 bit. Has somebody an idea where the 32 syscall parameters are getting converted into 64 bit for the sendmsg system call?



The only parameters that get converted for sendmsg are the cmsgs.
Addresses normally don't need any translation. From a quick look
at sockaddr_at I also don't see anything that would need translation in there.


I checked already the size of the struct sockaddr_at, it is identical on 32 and 64 bit systems (16 bytes). At the end I have included a pre-processed code sequence where the sendmsg fails with Invalid argument error code.



If you get me a compilable&executable test case I can take a look at it.

-Andi





< Previous Next >
Follow Ups