[rds-devel] FW: RDS -- how to detect peer is gone ?

Greg Lindahl lindahl at pbm.com
Wed Mar 31 18:17:26 PDT 2010


On Wed, Mar 31, 2010 at 05:13:19PM -0700, Andy Grover wrote:

> RDS is using the CMSG_ calls defined in "man 3 cmsg" for ancillary data.
> Are we using these incorrectly in the RDS kernel code?

Good question. I've never used cmsg before, but some quick code
writing tells me that from userland, Linux does an odd thing in
32-bits on a 64-bit kernel compared to what the manpage says should
work.

cmsg_len in Linux is not a socklen_t, it is a __kernel_size_t, and
__kernel_size_t is 32 bits for an ia32 userland.  I can't find any
place in the modern kernel where it's translated like ioctls are.

There must be lots of discussion about this, here's one example:

http://oss.sgi.com/archives/netdev/2000-10/msg00152.html

but the discussion is old.

I think bringing it up on netdev would be a good idea.

-- greg





More information about the rds-devel mailing list