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>] [day] [month] [year] [list]
Date:	Fri, 21 Feb 2014 07:15:47 +0000
From:	Sathya Perla <Sathya.Perla@...lex.Com>
To:	"jiang.biao2@....com.cn" <jiang.biao2@....com.cn>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:	Subramanian Seetharaman <subbu.seetharaman@...lex.com>,
	Ajit Khaparde <Ajit.Khaparde@...lex.Com>,
	"wang.liang82@....com.cn" <wang.liang82@....com.cn>,
	"cai.qu@....com.cn" <cai.qu@....com.cn>,
	"li.fengmao@....com.cn" <li.fengmao@....com.cn>,
	"long.chun@....com.cn" <long.chun@....com.cn>,
	David Miller <davem@...emloft.net>
Subject: RE: RE: [PATCH] be2net: Bugfix for packet drop with kernel param
 swiotlb=force

> -----Original Message-----
> From: jiang.biao2@....com.cn [mailto:jiang.biao2@....com.cn]
> 
> > >
> > > From: Li Fengmao <li.fengmao@....com.cn>
> > >
> > > There will be packet drop with kernel param "swiotlb = force" on
> > > Emulex 10Gb NIC using be2net driver. The problem is caused by
> > > receiving skb without calling pci_unmap_page() in get_rx_page_info().
> > > rx_page_info->last_page_user is initialized to false in
> > > be_post_rx_frags() when current frag are mapped in the first half of
> > > the same page with another frag. But in that case with
> > > "swiotlb = force" param, data can not be copied into the page of
> > > rx_page_info without calling pci_unmap_page, so the data frag mapped
> > > in the first half of the page will be dropped.
> > >
> > > It can be solved by creating only a mapping relation between frag
> > > and page, and deleting rx_page_info->last_page_user to ensure
> > > calling pci_unmap_page when handling each receiving frag.
> >
> > This patch uses an entire page for each RX frag (whose default size is 2048).
> > Consequently, on platforms like ppc64 where the default PAGE_SIZE is 64K,
> > memory usage becomes very inefficient.
> >
> > Instead, I've tried a partial-page mapping scheme. This retains the
> > page sharing logic, but un-maps each frag separately so that
> > the data is copied from the bounce buffers.
> >
> > Pls see if this works for you;  thanks.
> >
> Our patch indeed has some problem because use an entire page by alloc_pages,
> maybe kmalloc should be appropriate.
> Your modification works for us, it should be a right patch for the bug.

Thanks for verifying. I'll re-post my patch with a proper sign-off.

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