Thread (26 messages) flat view 26 messages, 6 authors, 2016-03-14

Re: [PATCH net-next 08/13] net/mlx5e: Add fragmented memory support for RX multi packet WQE

From: Eric Dumazet <hidden>
Date: 2016-03-14 20:23:19

On Mon, 2016-03-14 at 20:16 +0200, Saeed Mahameed wrote:
we can do special accounting for ooo like issues in the stack (maybe
count page references and sum up page sizes as you suggest), device
drivers shouldn't have special handling/accounting to protect against
such cases.
The existing skb->truesize is doing this already.

The fact that some drivers use PAGE_SIZE/2 instead of PAGE_SIZE is an
heuristic that is mostly okay, and we accept the risk :

Even if a smart attack is happening, host will consume 200 XB instead of
100 XB.

But pretending to use 128 bytes is simply a dangerous weapon over your
head, since you end up consuming 1600 XB.

With tcp_mem[2] being 18% of physical memory, you end up consuming all
physical memory and crash.

I can tell you that these kind of attacks are very real. I´ve seen them
in action.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help