Re: [PATCH] neigh: increase unres_qlen by one magnitude

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Le mardi 08 novembre 2011 à 17:24 -0500, David Miller a écrit :

> Pretty risky don't you think?
> 

Yes :)

> So now we'll allow essentially any remote machine to force us to hold
> on to memory on the order of (32 * num_ips_in_subnet) for each IP
> address configured.
> 

Exact limit is 32 * min(num_ips_in_subnet, 1024) : 32768 packets

(because gc_thresh3 is 1024 : max allowed number of neighbors)

> Just spam UDP or ICMP packets with a source address iterating over
> addresses in one of the host's subnets.  If the subnet space is
> relatively large, chances are %99 of those IPs won't respond to ARP
> and we'll queue up the ICMP replies.
> 
> Probably what will trigger first, actually, is we'll hit the per-cpu
> ICMP socket send buffer limit.  Because we won't even get to the
> point in the TX path where we will early orphan the SKB.
> 
> So essentially this will stop ICMP responses completely for all
> traffic processed on that cpu.
> 
> I realize you're trying to address a very real problem, but I'm just
> not sure at all that unilaterally increasing the value like this is
> safe.

Since you speak of icmp sock, its limit is more governed by cumulative
skb truesizes.

Maybe we can do the same for unres_qlen, and setup a byte limit instead
of 3 packets limit (say 64Kbytes of truesize per destination)



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux Kernel Discussion]     [Ethernet Bridging]     [Linux Wireless Networking]     [Linux Bluetooth Networking]     [Linux Networking Users]     [VLAN]     [Git]     [IETF Annouce]     [Linux Assembly]     [Security]     [Bugtraq]     [Photo]     [Singles Social Networking]     [Yosemite Information]     [MIPS Linux]     [ARM Linux Kernel]     [ARM Linux]     [Linux Virtualization]     [Linux Security]     [Linux IDE]     [Linux RAID]     [Linux SCSI]     [Free Dating]

Add to Google Powered by Linux