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