Subject: Re: [PATCH net-next 3/3] psp: validate IPv4 header fields in psp_dev_rcv()

From: Willem de Bruijn <[email-masked]>
Date: Tue, 28 Apr 2026 22:42:07 -0400

Jakub Kicinski wrote:
> On Tue, 28 Apr 2026 20:22:34 -0400 Willem de Bruijn wrote:
> > Jakub Kicinski wrote:
> > > psp_dev_rcv() is called from the NIC driver's RX completion path
> > > before the frame reaches ip_rcv_core(), so the IP header has not
> > > been validated in SW, yet. We expect that the device has done
> > > all this validation, but let's also add the SW checks, to avoid
> > > surprises.  
> > 
> > If devices are expected to have verified this, should these be more
> > noisy checks, similar to netdev_rx_csum_fault?
> 
> Maybe "expect" is a bit of a strong word, I meant "anticipate" /
> "suspect". Dropping invalid packet in SW doesn't seem like a huge
> problem, other paths in this function already do. For rx csum the
> problem is that we got a incorrectly math'ed out value for what is
> likely a valid packet.
> 
> That's just to explain my thinking, if you prefer we warn / dump skb
> I can respin.

No, sounds good.

Reviewed-by: Willem de Bruijn <[email-masked]>