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: <20100901.130333.148556201.davem@davemloft.net>
Date:	Wed, 01 Sep 2010 13:03:33 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	simon.kagstrom@...insight.net
Cc:	davej@...hat.com, netdev@...r.kernel.org
Subject: Re: via-velocity dma-debug warnings again. (2.6.35.2)

From: Simon Kagstrom <simon.kagstrom@...insight.net>
Date: Wed, 1 Sep 2010 12:20:59 +0200

> I'm not really an expert on the subject, but with skb_headlen(), the size
> should be the same for pci_map_single and pci_unmap_single as far as I
> can tell.

That's not the case.

You'll have to use exactly the same formula for computing the length
as the pci_map_single() call uses, which is:

	pktlen = skb_shinfo(skb)->nr_frags == 0 ?
			max_t(unsigned int, skb->len, ETH_ZLEN) :
				skb_headlen(skb);

Otherwise packets smaller than ETH_ZLEN will be unmapped properly
and trigger the same kind of debugging checks Dave is seeing.
--
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