Watch
1
Fork
You've already forked kernel_a52xq
0
mirror of https://github.com/a52xq-dev/kernel.git synced 2026-10-19 22:28:12 +07:00
Commit graph kernel_a52xq/include/linux/skb_array.h
Message SHA1
ptr_ring: use kmalloc_array()
As found by syzkaller, malicious users can set whatever tx_queue_len
on a tun device and eventually crash the kernel.

Lets remove the ALIGN(XXX, SMP_CACHE_BYTES) thing since a small
ring buffer is not fast anyway.

Fixes: 2e0ab8ca83 ("ptr_ring: array based FIFO for pointers")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Eric Dumazet   authored and   David S. Miller   commited 2017-08-16 16:28:47 -07:00
81fbfe8ada
skb_array: introduce batch dequeuing
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Jason Wang   authored and   David S. Miller   commited 2017-05-18 10:07:40 -04:00
3528c1a52e
skb_array: introduce skb_array_unconsume
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Jason Wang   authored and   David S. Miller   commited 2017-05-18 10:07:39 -04:00
3acb696015
skb_array: add wrappers for resizing
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Jason Wang   authored and   David S. Miller   commited 2016-07-01 05:32:17 -04:00
bf900b3dbe
skb_array: minor tweak
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Jason Wang   authored and   David S. Miller   commited 2016-07-01 05:32:16 -04:00
fd68adec9d
skb_array: resize support
Update skb_array after ptr_ring API changes.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Tested-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Michael S. Tsirkin   authored and   David S. Miller   commited 2016-06-15 13:58:27 -07:00
7d7072e3ba
skb_array: array based FIFO for skbs
A simple array based FIFO of pointers.  Intended for net stack so uses
skbs for type safety. Implemented as a set of wrappers around ptr_ring.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Tested-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Michael S. Tsirkin   authored and   David S. Miller   commited 2016-06-15 13:58:27 -07:00
ad69f35d1d