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: <20110710.111822.1898388363586143047.fujita.tomonori@lab.ntt.co.jp>
Date:	Sun, 10 Jul 2011 11:18:22 +0900 (JST)
From:	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
To:	jim.cromie@...il.com
Cc:	davem@...emloft.net, thockin@...kin.org, netdev@...r.kernel.org
Subject: Re: [PATCH] natsemi: silence dma-debug warnings

On Sat, 9 Jul 2011 20:10:17 -0600
Jim Cromie <jim.cromie@...il.com> wrote:

>>>> Which pci_unmap_single are you talking about?
>>>>
>>>
>>>
>>>    2131 static void netdev_tx_done(struct net_device *dev)
>>>    2132 {
>>> ...
>>>    2160                 pci_unmap_single(np->pci_dev,np->tx_dma[entry],
>>>    2161                                         np->tx_skbuff[entry]->len,
>>>    2162                                         PCI_DMA_TODEVICE);
>>
>> It's pci_unmap_single call for tx_dma buffers. We fixed
>> pci_unmap_single calls for rx_dma buffers.
>>
>> Looks like the driver correctlly uses pci_map_single and
>> pci_unmap_single for tx_dma buffers.
>>
> 
> thanks for checking.
> 
> and oops, the one I was referring to was this one,
> patched locally.
> 
> 
>     possible dma-debug error, unseen
> 
> diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
> index e4bd202..0df7a47 100644
> --- a/drivers/net/natsemi.c
> +++ b/drivers/net/natsemi.c
> @@ -2007,8 +2007,8 @@ static void drain_tx(struct net_device *dev)
> 
>         for (i = 0; i < TX_RING_SIZE; i++) {
>                 if (np->tx_skbuff[i]) {
> -                       pci_unmap_single(np->pci_dev,
> -                               np->tx_dma[i], np->tx_skbuff[i]->len,
> +                       pci_unmap_single(np->pci_dev, np->tx_dma[i],
> +                               np->tx_skbuff[i]->len + NATSEMI_PADDING,
>                                 PCI_DMA_TODEVICE);
>                         dev_kfree_skb(np->tx_skbuff[i]);
>                         dev->stats.tx_dropped++;
> 
> again, I havent seen a warning here,
> either with or without this patch.
> 
> Given the wording of the warning (mismatch, ie > or <, not ==)
> I presume I should get a warning if the PADDING is wrong here,
> and I actually run this codepath ?

I don't think you run this code path. And as I wrote, the current code
looks correct.
--
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