]> 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)
commit2aaaceca61a8ba4bfac0b18c1549d592b7392a70
tree291383cb7d7b8b719bb370fe8483c8109a93aaff
parent1dbc25eb45f0b95d46017d56ed8391006bbdc03b
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