From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965435AbcFMLKJ (ORCPT ); Mon, 13 Jun 2016 07:10:09 -0400 Received: from foss.arm.com ([217.140.101.70]:50944 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965088AbcFMLKI (ORCPT ); Mon, 13 Jun 2016 07:10:08 -0400 Subject: Re: [Xen-devel] [PATCH] xen: grant-table: Check truncation when giving access to a frame To: David Vrabel , boris.ostrovsky@oracle.com, jgross@suse.com, sstabellini@kernel.org, konrad.wilk@oracle.com References: <1465815046-5390-1-git-send-email-julien.grall@arm.com> <575E9198.70103@citrix.com> Cc: andrew.cooper3@citrix.com, xen-devel@lists.xen.org, linux-kernel@vger.kernel.org, JBeulich@suse.com, steve.capper@arm.com From: Julien Grall Message-ID: <575E948B.7060507@arm.com> Date: Mon, 13 Jun 2016 12:10:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <575E9198.70103@citrix.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi David, On 13/06/16 11:57, David Vrabel wrote: > On 13/06/16 11:50, Julien Grall wrote: >> 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. > > In hindsight, we shouldn't have dropped the V2 support from Linux. > Should we reinstate it? What were the reasons to drop the v2 support from Linux? More importantly why people did choose to stay on v1? Cheers, -- Julien Grall