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: <54526711.1080505@freescale.com>
Date:	Thu, 30 Oct 2014 18:28:01 +0200
From:	Claudiu Manoil <claudiu.manoil@...escale.com>
To:	Kevin Hao <haokexin@...il.com>, <netdev@...r.kernel.org>,
	David Miller <davem@...emloft.net>
Subject: Re: [PATCH] net: gianfar: fix dma check map error when DMA_API_DEBUG
 is enabled

On 10/30/2014 12:25 PM, Kevin Hao wrote:

[...]

> @@ -2406,6 +2416,25 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
>   	spin_unlock_irqrestore(&tx_queue->txlock, flags);
>
>   	return NETDEV_TX_OK;
> +
> +dma_map_err:
> +	txbdp = next_txbd(txbdp_start, base, tx_queue->tx_ring_size);
> +	if (do_tstamp)
> +		txbdp = next_txbd(txbdp, base, tx_queue->tx_ring_size);
> +	for (i = 0; i < nr_frags; i++) {
> +		lstatus = txbdp->lstatus;
> +		if (!(lstatus & BD_LFLAG(TXBD_READY)))
> +			break;
> +
> +		txbdp->lstatus = lstatus & ~BD_LFLAG(TXBD_READY);
> +		bufaddr = txbdp->bufPtr;
> +		dma_unmap_page(priv->dev, bufaddr, txbdp->length,
> +			       DMA_TO_DEVICE);
> +		txbdp = next_txbd(txbdp, base, tx_queue->tx_ring_size);
> +	}
> +	gfar_wmb();

Why use the wmb() memory barrier here?

> +	dev_kfree_skb_any(skb);
> +	return NETDEV_TX_OK;
>   }
>

[...]

Hi Dave,

The patch seems ok at first glance (except a minor comment) but I'd like 
to have it tested first because it modifies sensitive code.
I can re-send it to netdev later, after we're done testing it.
Maybe it would be better to stack up a few more gianfar fixes in the 
meantime and send them all to netdev as a pull request, later on.

Thanks,
Claudiu

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ