netlink: implement memory mapped sendmsg()
authorPatrick McHardy <kaber@trash.net>
Wed, 17 Apr 2013 06:47:03 +0000 (06:47 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Apr 2013 18:57:57 +0000 (14:57 -0400)
commit5fd96123ee19b96be7d7b57fd42227e1a146ef05
tree291383cb7d7b8b719bb370fe8483c8109a93aaff
parent9652e931e73be7e54a9c40e9bcd4bbdafe92a406
netlink: implement memory mapped sendmsg()

Add support for mmap'ed sendmsg() to netlink. Since the kernel validates
received messages before processing them, the code makes sure userspace
can't modify the message contents after invoking sendmsg(). To do that
only a single mapping of the TX ring is allowed to exist and the socket
must not be shared. If either of these two conditions does not hold, it
falls back to copying.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netlink/af_netlink.c