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] [day] [month] [year] [list]
Message-ID: <cb1a24ef23523f01868127430dbbe48428ad5e0d.camel@codeconstruct.com.au>
Date: Tue, 22 Apr 2025 22:16:27 +0800
From: Jeremy Kerr <jk@...econstruct.com.au>
To: admiyo@...amperecomputing.com, Matt Johnston
 <matt@...econstruct.com.au>,  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>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org, Sudeep Holla
	 <sudeep.holla@....com>, Jonathan Cameron <Jonathan.Cameron@...wei.com>, 
	Huisong Li <lihuisong@...wei.com>
Subject: Re: [PATCH net-next v19 1/1] mctp pcc: Implement MCTP over PCC
 Transport

Hi Adam,

[resend, un-HTMLed. Sorry for the noise!]

One bug in the code, and another couple of notes since we'll need a re-roll:

> +#define MCTP_PAYLOAD_LENGTH     256
> +#define MCTP_CMD_LENGTH         4
> +#define MCTP_PCC_VERSION        0x1 /* DSP0253 defines a single version: 1 */

Mismatched DSP reference above - DSP0253 is serial.

> +static netdev_tx_t mctp_pcc_tx(struct sk_buff *skb, struct net_device *ndev)
> +{
> +       struct mctp_pcc_ndev *mpnd = netdev_priv(ndev);
> +       struct mctp_pcc_hdr  *mctp_pcc_header;

Another double-space has crept in here.

> +       void __iomem *buffer;
> +       unsigned long flags;
> +       int len = skb->len;
> +       int rc;
> +
> +       dev_dstats_tx_add(ndev, len);
> +
> +       spin_lock_irqsave(&mpnd->lock, flags);
> +       rc = skb_cow_head(skb, sizeof(struct mctp_pcc_hdr));
> +       if (rc)
> +               return rc;

This will return with mpdn->lock still held.

And should this return the raw rc value? Or NETDEV_TX_OK?

Cheers,


Jeremy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ