From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965267AbcFMMVP (ORCPT ); Mon, 13 Jun 2016 08:21:15 -0400 Received: from smtp.eu.citrix.com ([185.25.65.24]:62168 "EHLO SMTP.EU.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965229AbcFMMVO (ORCPT ); Mon, 13 Jun 2016 08:21:14 -0400 X-IronPort-AV: E=Sophos;i="5.26,466,1459814400"; d="scan'208";a="23984745" From: Paul Durrant To: Julien Grall , "boris.ostrovsky@oracle.com" , David Vrabel , "jgross@suse.com" , "sstabellini@kernel.org" , "konrad.wilk@oracle.com" CC: "steve.capper@arm.com" , Andrew Cooper , "linux-kernel@vger.kernel.org" , "xen-devel@lists.xen.org" , "JBeulich@suse.com" Subject: RE: [Xen-devel] [PATCH] xen: grant-table: Check truncation when giving access to a frame Thread-Topic: [Xen-devel] [PATCH] xen: grant-table: Check truncation when giving access to a frame Thread-Index: AQHRxWGj1ni/LeDD50+bfNa7WAZ8Hp/nTuiQ Date: Mon, 13 Jun 2016 12:12:49 +0000 Message-ID: References: <1465815046-5390-1-git-send-email-julien.grall@arm.com> In-Reply-To: <1465815046-5390-1-git-send-email-julien.grall@arm.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-DLP: AMS1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u5DCLLXX007464 > -----Original Message----- > From: Xen-devel [mailto:xen-devel-bounces@lists.xen.org] On Behalf Of > Julien Grall > Sent: 13 June 2016 11:51 > To: boris.ostrovsky@oracle.com; David Vrabel; jgross@suse.com; > sstabellini@kernel.org; konrad.wilk@oracle.com > Cc: steve.capper@arm.com; Andrew Cooper; linux-kernel@vger.kernel.org; > xen-devel@lists.xen.org; Julien Grall; JBeulich@suse.com > Subject: [Xen-devel] [PATCH] xen: grant-table: Check truncation when giving > access to a frame > > The version 1 of the grant-table protocol only supports frame encoded on > 32-bit. > > When the platform is supporting 48-bit physical address, the frame will > be encoded on 36-bit which will lead a truncation and give access to > the wrong frame. > > On ARM Xen will always allow the guest to use all the physical address, > although today the RAM is always located under 40-bits (see > xen/include/public/arch-arm.h). > > Add a truncation check in gnttab_update_entry_v1 to prevent the guest to > give access to the wrong frame. > > Signed-off-by: Julien Grall > > --- > This is limiting us to a 44-bit address space whilst ARM can support > up to 48-bit today. This number of bit will increase to 52-bit in > upcoming processors [1]. > > It might be good to start thinking to extend the version 1 of the > protocol to use 64-bit frame number. ...or simply use version 2 of the protocol. Paul