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-next>] [day] [month] [year] [list]
Date:	Mon, 21 Nov 2011 20:17:49 +0800
From:	annie li <annie.li@...cle.com>
To:	"xen-devel@...ts.xensource.com" <xen-devel@...ts.xensource.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	"jeremy@...p.org" <jeremy@...p.org>,
	Ian Campbell <Ian.Campbell@...rix.com>
CC:	Paul Durrant <Paul.Durrant@...rix.com>,
	KURT HACKEL <kurt.hackel@...cle.com>,
	ANNIE LI <annie.li@...cle.com>
Subject: Third version patches for upstreaming grant table version 2

Hi

The following patches introduce and implement grant table version 2. 
This is the third version patches, and based on v3.2.0-rc1+. Changes 
from the previous patches are following:

Patch 1:
* removing gnttab_v1_ops declaration
* renaming update_grant_entry_v1 to gnttab_update_entry_v1

Patch3:
* changing following code

xen_raw_printk();
panic();

back to

panic();
* re-arrange "else if" format in gnttab_request_version function.


Descriptions for those patches:

1. In those patches, the grant table code supports both grant table v1 and v2 version, v2 is an extension from v1. Grant table of guest domain can be either v1 or v2 version, and every grant table entry on one guest should be the same version. 

2. Full page structure of grant table v2 play the same role as grant table v1. Although full page structure is different from v1, grant table 2 is totally backwards compatible with v1. Grant table is shared between guest and Xen, domu and dom0 all have their own grant table shared with Xen, and their grant table version should be set before any grants are activated. When domu grants an entry to dom0 to map a frame,following are steps: 
* domu introduces a grant entry by reference 
* domu informs dom0 the gref 
* dom0 sends hypercall to map frame through this reference, Xen copy shared entry to active entry and update frame 
* dom0 does its work and release the frame, Xen releases the entry. 
* domu redo those steps for a new cycle. 
Xen mapping process can be found in function __gnttab_map_grant_ref in Xen code: xen/common/grant_table.c

3. If dom0 supports grant table v2, guests run on it can either supports v1 or v2. Xen is responsible to judge what  version the guests are using. This is implemented in Xen code: xen/common/grant_table.c. Key word is:  rd->grant_table->gt_version. 

4. Grant table v2 has been supported by Xen for a long time, and receiver-side copying mechanism bases on this implementation. Netback and netfront driver can pick up this new feature to get better network performance and better CPU accounting.


Diff:

 arch/x86/xen/grant-table.c          |   42 ++++-
 drivers/xen/grant-table.c           |  354 
++++++++++++++++++++++++++++++-----
 include/xen/grant_table.h           |   10 +-
 include/xen/interface/grant_table.h |  167 ++++++++++++++++-
 include/xen/interface/xen.h         |    2 +
 5 files changed, 519 insertions(+), 56 deletions(-)

Shortlog:
Annie Li (4):
      xen/granttable: Introducing grant table V2 stucture
      xen/granttable: Refactor some code
      xen/granttable: Grant tables V2 implementation
      xen/granttable: Keep code format clean

Thanks
Annie
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ