[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4] xen/arm: p2m: Populate pages for GICv2 mapping in arch_domain_create()
- To: Henry Wang <Henry.Wang@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
- Date: Mon, 17 Oct 2022 19:07:32 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=QuAvrJvYXucoKIMO8EkIU6VL6cY3WHerJ0IxHPEf9Mc=; b=jVEjfsuxBPArUCWODoAkrr4vg4OvkCya355NTXmSijZ7Ua5MR8S/Wp15BRLF4ax+3jlJrdUFNS36N4psJCNkvccXeRs35gcfaVMnynPNd36wu69hoMGU3E5jFucGphtCN5y831kt+uBZmArTp9fA7j6xplKG06ZyEc+k13KAWwvIThf0J6lvyvhnr+WWVXXokYVUfDOYJ/UlciHJLAw+cNSzwjNzbZGG7v9YgyQQxXbLysFIQDf+IeSYnPj050hp2WjZjRfxa2RQVkjCyESysrMTuboxoN9il/w7zdjBOJxRpsVUnXUaN+7IsdVq7WioZuVFWc8V6g1dOFtUQ7X7Eg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y0Avv6VNM7W+mjkt6To68Brsi8xo3pgb9EMC/yQpjNsGNYeNdiUquNgnZhRA8Ruukp2f8Kl+yYMNWV8RbBDQrpI3e2P4MFgh0tuqdz4if1pLb9l2/JyF/giT/lECoHf6EpRQYIeoUvjw+idh5Zpu7LaXSYbFjF74Y18ehjHw1IMkWoQowas0HMw6Yyr5vJpm3jPV/Zx2pKZ8TVcOdEL1C3angsnlPtLSn38gKbJ7ccdmzdVIHaWRPLRLaoistkZfdpR5+0d5YR0t8iBOBumOxgYZD8ukwC70LYVEsI1WMYe6Fz1dK9wGyI1LvdYl135aW/mcie1AXD9KjC1OFIu7jg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Wei Chen <wei.chen@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Mon, 17 Oct 2022 19:08:31 +0000
- Ironport-data: A9a23:wPSmh6uzAQaw7MUhO67Mhewj3efnVNtfMUV32f8akzHdYApBsoF/q tZmKW+Ab6yCNmD8Ld9xbNu28BwFuMKHzoc3GVY5pX0wF39G+JbJXdiXEBz9bniYRiHhoOCLz O1FM4Wdc5pkJpP4jk3wWlQ0hSAkjclkfpKlVKiefHgZqTZMEE8JkQhkl/MynrlmiN24BxLlk d7pqojUNUTNNwRcawr40Ire7kIy1BjOkGlA5AZnPakU5AW2e0Q9V/rzG4ngdxMUfaEMdgKKb 76r5K20+Grf4yAsBruN+losWhRXKlJ6FVHmZkt+A8BOsDAbzsAB+v9T2M4nQVVWk120c+VZk 72hg3ASpTABZcUgkMxFO/VR/roX0aduoNcrKlDn2SCfItGvn9IBDJyCAWlvVbD09NqbDklu7 eMnLS4wRCm9oMGr8KzrcO5LgvQKeZyD0IM34hmMzBn/JNN/GNXoZPyP4tVVmjAtmspJAPDSI dIDbiZiZwjBZBsJPUoLDJU5n6GjgXyXnz9w8QrJ4/ZopTWNilUujtABM/KMEjCObexTklyVu STt+GPhDwtBHNee1SCE4jSngeqncSbTCN9OSeLjqqQCbFu74nEjUCMO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5/0CH8yzYY fABK5r
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHY4kjMT/hxO9gc1E6OcnjJPjKrQq4S8teA
- Thread-topic: [PATCH v4] xen/arm: p2m: Populate pages for GICv2 mapping in arch_domain_create()
On 17/10/2022 17:51, Henry Wang wrote:
> diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
> index f17500ddf3..0b4e24218e 100644
> --- a/xen/arch/arm/p2m.c
> +++ b/xen/arch/arm/p2m.c
> @@ -1784,6 +1800,8 @@ int p2m_init(struct domain *d)
> !iommu_has_feature(d, IOMMU_FEAT_COHERENT_WALK);
>
> rc = p2m_alloc_table(d);
> + if ( rc != 0 )
> + return rc;
This error path now leaks the VMID.
And to preempt the obvious change, if you simply move this lower, you'll
introduce a path where p2m_teardown() falls over a NULL pointer.
~Andrew
|