Re: [PATCH net] net: thunderx: don't allow jumbo frames with XDP

2019-04-06 Thread Jesper Dangaard Brouer
On Fri, 5 Apr 2019 17:45:34 +0200 Matteo Croce wrote: > On Fri, Apr 5, 2019 at 2:51 AM Matteo Croce wrote: > > > > On Fri, Apr 5, 2019 at 2:20 AM David Miller wrote: > > > > > > From: Matteo Croce > > > Date: Wed, 3 Apr 2019 01:11:36 +0200 > > > > > > > The thunderx driver forbids to load

Re: [PATCH net] net: thunderx: don't allow jumbo frames with XDP

2019-04-05 Thread Matteo Croce
On Fri, Apr 5, 2019 at 2:51 AM Matteo Croce wrote: > > On Fri, Apr 5, 2019 at 2:20 AM David Miller wrote: > > > > From: Matteo Croce > > Date: Wed, 3 Apr 2019 01:11:36 +0200 > > > > > The thunderx driver forbids to load an eBPF program if the MTU is > > > higher than 1500 bytes, but this can be

Re: [PATCH net] net: thunderx: don't allow jumbo frames with XDP

2019-04-04 Thread Matteo Croce
On Fri, Apr 5, 2019 at 2:20 AM David Miller wrote: > > From: Matteo Croce > Date: Wed, 3 Apr 2019 01:11:36 +0200 > > > The thunderx driver forbids to load an eBPF program if the MTU is > > higher than 1500 bytes, but this can be circumvented by first > > loading the eBPF, and then raising the MT

Re: [PATCH net] net: thunderx: don't allow jumbo frames with XDP

2019-04-04 Thread David Miller
From: Matteo Croce Date: Wed, 3 Apr 2019 01:11:36 +0200 > The thunderx driver forbids to load an eBPF program if the MTU is higher > than 1500 bytes, but this can be circumvented by first loading the eBPF, > and then raising the MTU. > > XDP assumes that SKBs are linear and fit in a single page

Re: [PATCH net] net: thunderx: don't allow jumbo frames with XDP

2019-04-03 Thread Jesper Dangaard Brouer
On Wed, 3 Apr 2019 01:11:36 +0200 Matteo Croce wrote: > The thunderx driver forbids to load an eBPF program if the MTU is higher > than 1500 bytes, but this can be circumvented by first loading the eBPF, > and then raising the MTU. > > XDP assumes that SKBs are linear and fit in a single page,

[PATCH net] net: thunderx: don't allow jumbo frames with XDP

2019-04-02 Thread Matteo Croce
The thunderx driver forbids to load an eBPF program if the MTU is higher than 1500 bytes, but this can be circumvented by first loading the eBPF, and then raising the MTU. XDP assumes that SKBs are linear and fit in a single page, this can lead to undefined behaviours. Fix this by limiting the MTU