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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1317802A-6BB6-468B-9FA0-8A05CDDFEA8C@oracle.com>
Date:	Thu, 23 Jan 2014 21:38:04 +0800
From:	Annie <annie.li@...cle.com>
To:	David Vrabel <david.vrabel@...rix.com>
Cc:	"xen-devel@...ts.xen.org" <xen-devel@...ts.xen.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"konrad.wilk@...cle.com" <konrad.wilk@...cle.com>,
	"ian.campbell@...rix.com" <ian.campbell@...rix.com>,
	"wei.liu2@...rix.com" <wei.liu2@...rix.com>
Subject: Re: [[Xen-devel] [PATCH net-next v3] xen-netfront: clean up code in xennet_release_rx_bufs




On 01/23/2014 2:55 AM, David Vrabel <david.vrabel@...rix.com> wrote

> On 23/01/14 01:36, Annie Li wrote:
>> From: Annie Li <annie.li@...cle.com>
>> 
>> This patch removes grant transfer code from netfront, and improves ending
>> grant acess mechanism since gnttab_end_foreign_access_ref may fail when
>> the grant entry is currently used for reading or writing.
>> 
>> * release grant reference and skb for tx/rx path, use get_page/put_page to
>> ensure page is released when grant access is completed successfully.
>> * change corresponding code in xen-blkfront/xen-tpmfront/xen-pcifront because
>> of code change for put_page in gnttab_end_foreign_access.
>> * clean up grant transfer code kept from old netfront(2.6.18) which grants
>> pages for access/map and transfer. But grant transfer is deprecated in current
>> netfront, so remove corresponding release code for transfer.
>> 
>> V3: Changes as suggestion from David Vrabel, ensure pages are not freed untill
>> grant acess is ended.
>> 
>> V2: improve patch comments.
>> Signed-off-by: Annie Li <annie.li@...cle.com>
>> ---
>> drivers/block/xen-blkfront.c    |   25 ++++++++---
>> drivers/char/tpm/xen-tpmfront.c |    7 +++-
>> drivers/net/xen-netfront.c      |   93 ++++++++++++--------------------------
>> drivers/pci/xen-pcifront.c      |    7 +++-
>> drivers/xen/grant-table.c       |    4 +-
>> 5 files changed, 63 insertions(+), 73 deletions(-)
> 
> I don't understand why you've made all these unnecessary changes to the
> other frontends and grant-table.c.
> 
> The xen-netfront.c changes are fine on their own.

Changes in grant-table.c corresponds to get_page before gnttab_end_foreign_access, just keeping consistent in the function name. This change does not really change the mechanism, so I can revert it.

For the changes in other frontends, the reason is they also have similar issue - grant access probably is not ended successfully when the page is freed.

Thanks
Annie
> 
> David
> --
> 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
--
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