lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aGzmxAEN9KFC/qce@test-OptiPlex-Tower-Plus-7010>
Date: Tue, 8 Jul 2025 15:07:08 +0530
From: Hariprasad Kelam <hkelam@...vell.com>
To: Simon Horman <horms@...nel.org>
CC: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        Sunil Goutham
	<sgoutham@...vell.com>,
        Geetha sowjanya <gakula@...vell.com>,
        "Subbaraya
 Sundeep" <sbhatta@...vell.com>,
        Bharat Bhushan <bbhushan2@...vell.com>,
        "Andrew Lunn" <andrew+netdev@...n.ch>,
        "David S. Miller"
	<davem@...emloft.net>,
        "Eric Dumazet" <edumazet@...gle.com>,
        Jakub Kicinski
	<kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
        Tomasz Duszynski
	<tduszynski@...vell.com>
Subject: Re: [net] Octeontx2-vf: Fix max packet length errors

On 2025-07-04 at 20:45:11, Simon Horman (horms@...nel.org) wrote:
> On Wed, Jul 02, 2025 at 04:35:18PM +0530, Hariprasad Kelam wrote:
> > Implement packet length validation before submitting packets to
> > the hardware to prevent MAXLEN_ERR.
> > 
> > Fixes: 3184fb5ba96e ("octeontx2-vf: Virtual function driver support")
> > Signed-off-by: Hariprasad Kelam <hkelam@...vell.com>
> > ---
> >  drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c | 7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c
> > index 8a8b598bd389..766237cd86c3 100644
> > --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c
> > +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c
> > @@ -394,6 +394,13 @@ static netdev_tx_t otx2vf_xmit(struct sk_buff *skb, struct net_device *netdev)
> >  	struct otx2_snd_queue *sq;
> >  	struct netdev_queue *txq;
> >  
> > +	/* Check for minimum and maximum packet length */
> > +	if (skb->len <= ETH_HLEN ||
> > +	    (!skb_shinfo(skb)->gso_size && skb->len > vf->tx_max_pktlen)) {
> > +		dev_kfree_skb(skb);
> > +		return NETDEV_TX_OK;
> > +	}
> 
> Hi Hariprasad,
> 
> I see the same check in otx2_xmit().
> But I wonder if in that case and this one the rx drop counter for the
> netdev should be incremented.
>  
  Assuming its tx_drop counter, Will add suggested change in V2.
  
> Also, do you need this check in rvu_rep_xmit() too?
> 
  ACK, will add this check in V2.

THanks,
Hariprasad k 

> > +
> >  	sq = &vf->qset.sq[qidx];
> >  	txq = netdev_get_tx_queue(netdev, qidx);
> >  
> > -- 
> > 2.34.1
> > 
> > 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ