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

Re: [PATCH v5 01/11] xen: arm: fix len type for guest copy functions


  • To: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Wed, 13 May 2026 13:07:38 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=gmail.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • 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=81Lcg54rbVRNgI+d80x3GYaeOkzYglYsyvUwhW+O5gc=; b=R88YKNpYFCPr0tVHEKwrN8q05zI3uUSs1OtvrU/V2v3v7kwziq1acdW4UBAgso1pHc4myTjdWCl33hTTkDczYn/TAEWibxXBD5gsy1Zpnf6cLrvunivgVAs0am324RaqLIw+ghk4ZzC1hQ6IsPYGe8mabbqbh7i0dxR+cRKXk3K8t+DalxB3sUvD9ee6R0fLAzQcIoIdIc9VQpyajAM/nEXpJKXBw4LZOFYouBCzt1DLPyUDAo+MouLZA0nW3plg8XkQl7OAPTmP4zvZNMjhRhhUpk6GJYVudIj/wqFIdIePDYESHaxhXgiLlyl7yhBE+NE6eIx5VVdvPbxG+rzFpg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=EOW24Ny5izJi+G6QtZBj1xLgiBX6Fm1OHFKxp5X2EnZw+bkxH62jLmVARCItv6mUC/5iEfdjc/6iv3Jbkb+fIQszjP1PD1TfXWFAfJnE4GtCykxT9oknrPPcLwymS2I//kfTfpj5nLLXYFnFP56Km4lb066tEQttd8AkRZvDK4YR682DavJt9sZhVTkWyQC4FitBI33Zuu7zsdCp6mW9yzc9vGkMph3qjFQ0LbkyGpdVqkcvBYncOu/gf8o3KJBP0Mz6fBlHcnPZssNtwIZEEGDg0/3Q8n8AmwX1NIgvYIhBzYDvcWL5rsjmi8TACZRR9Z17me3Ok604uOc0b0hn3A==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Cc: Romain Caritey <Romain.Caritey@xxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Luca Fancellu <luca.fancellu@xxxxxxx>
  • Delivery-date: Wed, 13 May 2026 11:08:38 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 07-May-26 10:58, Oleksii Kurochko wrote:
> Widen the len argument of copy_to_guest_phys_flush_dcache() and the
> copy_to_guest_phys_cb typedef from unsigned int to unsigned long, as
> the function can be used to copy large blobs such as the initrd which
> may exceed 4GB. Update the internal copy_guest() len argument to
> unsigned long accordingly.
> 
> Change the type for local variable size in copy_guest() to avoid
> compilation error because of type mismatch.
> 
> raw_* wrappers above copy_guest() keep returning unsigned long to
> avoid type narrowing; it is not an issue for raw_*'s len argument
> to remain 'unsigned int' since the assignment to copy_guest()'s wider
> unsigned long parameter is safe and there is no raw_* users who
> are using a value bigger than what can fit into 'unsigned int'.
> 
> Fixes: 2986481b3d9e6 ("xen/arm: guest_copy: Extend the prototype to pass the 
> vCPU")
> Fixes: 5302bd490bea7 ("xen/arm: Introduce copy_to_guest_phys_flush_dcache")
> Fixes: d07b7369aa65b ("xen/common: dom0less: introduce common domain-build.c")
> Reported-by: Jan Beulich <jbeulich@xxxxxxxx>
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
> Reviewed-by: Luca Fancellu <luca.fancellu@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®.