]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9c3977ba7473277e7d36d6db98883bb65882bb88
tree291383cb7d7b8b719bb370fe8483c8109a93aaff
parentfc887c437e45a342fd7bda225a341827fedb07ec
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