1
0
Fork 0
alistair23-linux/net
Pablo Neira Ayuso c05cdb1b86 netlink: allow large data transfers from user-space
I can hit ENOBUFS in the sendmsg() path with a large batch that is
composed of many netlink messages. Here that limit is 8 MBytes of
skbuff data area as kmalloc does not manage to get more than that.

While discussing atomic rule-set for nftables with Patrick McHardy,
we decided to put all rule-set updates that need to be applied
atomically in one single batch to simplify the existing approach.
However, as explained above, the existing netlink code limits us
to a maximum of ~20000 rules that fit in one single batch without
hitting ENOBUFS. iptables does not have such limitation as it is
using vmalloc.

This patch adds netlink_alloc_large_skb() which is only used in
the netlink_sendmsg() path. It uses alloc_skb if the memory
requested is <= one memory page, that should be the common case
for most subsystems, else vmalloc for higher memory allocations.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-07 16:26:34 -07:00
..
9p Lots of virtio work which wasn't quite ready for last merge window. Plus 2013-05-02 14:14:04 -07:00
802 net/802/mrp: fix lockdep splat 2013-05-14 13:02:30 -07:00
8021q net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
appletalk net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
atm net: always pass struct netdev_notifier_info to netdevice notifiers 2013-05-28 21:58:54 -07:00
ax25 net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
batman-adv batman-adv: Start new development cycle 2013-05-29 02:44:56 +02:00
bluetooth Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-01 17:51:54 -07:00
bridge Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next 2013-06-06 01:03:06 -07:00
caif net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
can net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
ceph libceph: init sent and completed when starting 2013-05-13 12:52:23 -05:00
core Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-06-05 16:37:30 -07:00
dcb
dccp
decnet net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
dns_resolver
dsa
ethernet
ieee802154 net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
ipv4 net: tcp: move GRO/GSO functions to tcp_offload 2013-06-07 14:39:05 -07:00
ipv6 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-06-05 16:37:30 -07:00
ipx net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
irda net: irda: using kzalloc() instead of kmalloc() to avoid strncpy() issue. 2013-05-19 15:10:47 -07:00
iucv net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
key xfrm: force a garbage collection after deleting a policy 2013-05-31 17:30:07 -07:00
l2tp
lapb
llc
mac80211 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-06-05 16:37:30 -07:00
mac802154 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-04-30 03:55:20 -04:00
mpls MPLS: Add limited GSO support 2013-05-27 22:50:59 -07:00
netfilter Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next 2013-06-06 01:03:06 -07:00
netlabel net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
netlink netlink: allow large data transfers from user-space 2013-06-07 16:26:34 -07:00
netrom net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
nfc NFC: Remove commented out LLCP related Makefile line 2013-05-21 10:47:41 +02:00
openvswitch net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
packet net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
phonet net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
rds
rfkill Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next 2013-04-22 14:58:14 -04:00
rose net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
rxrpc
sched Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-06-05 16:37:30 -07:00
sctp sctp: Correct byte order of access to skb->{network, transport}_header 2013-05-31 01:41:36 -07:00
sunrpc Merge branch 'for-3.10' of git://linux-nfs.org/~bfields/linux 2013-05-31 09:48:56 +09:00
tipc net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
unix af_unix: fix a fatal race with bit fields 2013-05-01 15:13:49 -04:00
vmw_vsock Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-04-30 03:55:20 -04:00
wimax
wireless Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-06-05 16:37:30 -07:00
x25 net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
xfrm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-06-05 16:37:30 -07:00
Kconfig MPLS: Add limited GSO support 2013-05-27 22:50:59 -07:00
Makefile MPLS: Add limited GSO support 2013-05-27 22:50:59 -07:00
compat.c net: Unbreak compat_sys_{send,recv}msg 2013-06-06 11:52:14 -07:00
nonet.c
socket.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-06-06 23:39:26 -07:00
sysctl_net.c