[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/6] xen/arm: fix math in add_ext_regions


  • To: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Mon, 5 May 2025 09:52:36 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0qmRJpmiC86jBahLrJ4W7DAKBIe2WvtZHlOzi0dqJOw=; b=Z7MrPl0xapcJFxKLc3huL1fevzN77dqV0RgL3yiTQNKQSLCmAiFa31+v/jIr2+FUkoXtZ9/JtQgPSPuPkoW9mum9bmRkuA/gER+y+r8dwePjpzzkOyM4w8sk49r3QP4hCBdINtMQMCQQsC+R68ybllrOJeS6SaRMme5oJU85WFOaYN+SI1373cNPrVLO8QYXVL39nxLcEW17c06H2n1iyjjBUkkY+Zr+oA5oZIjqoiXotmj1Y1D8jXNXoSmO64HMFwXthKIBmI48Po7LZYkdAeIteFuWeiPi3L3ypvSX8hCfl8iPj46+JzMGPnB/oGIb5ZdvRtOD4F/vOEvZsvVjGQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Orcl7anhJ6iQERiDkRanvRT4o251YaJjrtbISMJBPAFD1Vuwnjty+DkR6Yv/vNxMLXbW1P/lvMoU+wKCY4lkx8z2bxeicpO4XakkHfgpOhdLA1OXScPQxXCfVx8wIPbJswEjtNJEigvIiXnl0lZguXkdCV9QGw2nfYiJ9mgUC88nzU/biVdqiyMeV33Je6xyLot02FE0NzWWdTmbCJmFRTHPF6ue2j+hrGldxdF/paBBbJXoMc0DA6Svz4ezBIRTcjF0LES1oTaggEhEmjm3jcwTPjWtoqHU7yoKqrTLSTcuqk+FKOJl2ED4MHqN7lefkZa+zhrAqSfAVkEyB8dOjg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
  • Delivery-date: Mon, 05 May 2025 07:52:54 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 05/05/2025 04:56, Stewart Hildebrand wrote:
> In commit f37a59813979, the arguments to add_ext_regions() were switched
> from addresses to frame numbers. add_ext_regions() converts the frame
> numbers back to addresses, but the end address (e) is rounded down to
> page size alignment. The logic to calculate the size assumes e points to
> the last address, not page, effectively leading to the region size being
> erroneously calculated to be 2M smaller than the actual size of the
> region.
> 
> Fix by adding 1 to the frame number before converting back to address.
> 
> Fixes: f37a59813979 ("xen/arm: domain_build: Track unallocated pages using 
> the frame number")
> Signed-off-by: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
Acked-by: Michal Orzel <michal.orzel@xxxxxxx>

~Michal




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.