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]
Date:	Wed, 18 Sep 2013 16:22:27 +0100
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Stephen Hemminger <stephen@...workplumber.org>,
	<netdev@...r.kernel.org>
CC:	Mirko Lindner <mlindner@...vell.com>,
	<linux-kernel@...r.kernel.org>,
	Igor Gnatenko <i.gnatenko.brain@...il.com>
Subject: Re: [REGRESSION][BISECTED] skge: add dma_mapping check

On Wed, 2013-09-18 at 13:00 +0400, Igor Gnatenko wrote:
> Since 136d8f377e1575463b47840bc5f1b22d94bf8f63 commit we have kernel
> panic on:
[...]

At a first glance, it looks like this bit is wrong:

> @@ -3058,13 +3090,17 @@ static struct sk_buff *skge_rx_get(struct net_device *dev,
>  		if (!nskb)
>  			goto resubmit;
>  
> +		if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) {
> +			dev_kfree_skb(nskb);
> +			goto resubmit;
> +		}
> +
>  		pci_unmap_single(skge->hw->pdev,
>  				 dma_unmap_addr(e, mapaddr),
>  				 dma_unmap_len(e, maplen),
>  				 PCI_DMA_FROMDEVICE);
>  		skb = e->skb;
>  		prefetch(skb->data);
> -		skge_rx_setup(skge, e, nskb, skge->rx_buf_size);
>  	}
>  
>  	skb_put(skb, len);

That pci_unmap_single() appears to unmap the *new*, rather than old, DMA
mapping.  I think you need to copy out the old DMA address and length
before doing skge_rx_setup().

Try it with an IOMMU in strict mode (intel_iommu=on,strict or
amd_iommu=fullflush).

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
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