On Wed, Aug 03, 2005 at 10:02:28PM +0200, Andi Kleen wrote: > Harald Welte <[EMAIL PROTECTED]> writes: > > > Hi Dave! > > > > This (long-awaited) patch adds the generic nfnetlink-based userspace > > logging. nfnetlink_log can be used for any protocol family, and > > supports upt to 65535 logging groups (that could go to separate logging > > daemons, e.g.). > > Hi - I hope it has been tested with 32bit userland on x86-64 already, right?
no, it hasn't. I am travelling and don't have the space for a debian/i386 installation in addition to the debian/x86_64 on this box, sorry :( However, all nfnetlink-based protocols are supposed to be both endian and 32/64 as well as alignment (*) safe. the protocol definitions always use u_intXX_t types, all network byte order, and no kernel pointers passed to userspace or similar crap ;) So the only part in host byte order are the nlmsghdr and the nfattr (similar rtattr). We wanted to make it netwokr byte order, too - but then we would be different then all other netlink users :( so for now, we go for host byte order of Tag and Length, but network byte order value. This way a simple, generic program can parse the structure and convert everything to network byte order without having to know the content of the attributes. > Just to avoid another similar problem with non compat compatible structures > like old style iptables or PF_KEY. We've learned our lesson, thanks :) (*) I've been told there are 64bit alignment issues with netlink on x86_64 in general. Thomas Graf is somehow working on this, IIRC. I didn't investigate this. We do pass 64bit values in attributes between kernel and userspace. -- - Harald Welte <[EMAIL PROTECTED]> http://gnumonks.org/ ============================================================================ "Privacy in residential applications is a desirable marketing option." (ETSI EN 300 175-7 Ch. A6)
pgpSgU81VJ4uZ.pgp
Description: PGP signature