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: <CAJfuBxwhxhMpxBS6L7FANcqeyipjCR1cjhPraYVpOv55_weC6g@mail.gmail.com>
Date:	Sat, 9 Jul 2011 20:10:17 -0600
From:	Jim Cromie <jim.cromie@...il.com>
To:	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
Cc:	davem@...emloft.net, thockin@...kin.org, netdev@...r.kernel.org
Subject: Re: [PATCH] natsemi: silence dma-debug warnings

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