[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190404.172039.1083206882112207747.davem@davemloft.net>
Date: Thu, 04 Apr 2019 17:20:39 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: mcroce@...hat.com
Cc: netdev@...r.kernel.org, sgoutham@...ium.com, rric@...nel.org,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH net] net: thunderx: don't allow jumbo frames with XDP
From: Matteo Croce <mcroce@...hat.com>
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, this can lead
> to undefined behaviours.
> Fix this by limiting the MTU to 1500 bytes if an eBPF program is loaded.
>
> Fixes: 05c773f52b96e ("net: thunderx: Add basic XDP support")
> Signed-off-by: Matteo Croce <mcroce@...hat.com>
Please respond to Jesper's feedback about your choice of a limit of 1500.
Otherwise I will toss your patch.
Powered by blists - more mailing lists