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

Re: [PATCH v2] vpci: add permission checks to map_range()


  • To: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 27 Jul 2023 13:35:36 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=FZ7Bt4bKzvvAUqYc1pqZEPq1l2hAsBEIywIW2BTRUXg=; b=kaR4BTwtj36XbEDtxLMbwrT3u69/DV0LL0kR4U24L9d2YP2z2wss1o2bnUF2JQ+Z7cqzDn9avbbyhkFOLlXqkeOc1DDGw4k15guLoiNB/TVlkecbArU5w9E/110XwoNZzymkwrJWazeS5+cu+1LvU+qS54KORcdLFtXSWgxq9PRpu5F+k85fAHQSl/HuQLUlS+i6frUkupEmrqAyZA2q31TsFmRhY7bq2az48hdu1A2jZ+Ca9e9VIjJ9fxAox7WrzOwKSE0jOMyc9YrMJU3FT/5SGyKn6meAg62mr1CmuRaCT0FC5Q7jfN/pub9jopw0/TLXKHnVn8QsPDjkCT6JjQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BO8zXo9dOiwV6NfNnpuVRZzUKcA9xYPABM7dcToQhDGQQnaO4/BhWlAgkpp+d4eC8IUH0Vw9pT2UVLhkUygzpnvBDjBm0Rk79UqLawYwrZGP4Es/bTQcQrrFvOAbWdq1lzVcAQcn2wHJColfmUtyj5sf4UfBPh2BL2q6z3Jd105qxzJGMAE7fuyw5uVzxhQtbv3W+Dc7BhNYW2S0gSAgVYIEqSJ5aziGxH8NXfovy5auQIH40mbbl/l4W3P0IEglxMaBiN6gD7MlwZ+3XTRuNL5wPRGACQxBh0DJKexExOY0fr1hjpEG4vL/V+WAMlbtqIQ07+nhTcVzOgoXw89VEw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Delivery-date: Thu, 27 Jul 2023 11:35:53 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 27.07.2023 13:07, Daniel P. Smith wrote:
> 
> 
> On 7/27/23 03:56, Jan Beulich wrote:
>> On 26.07.2023 16:01, Roger Pau Monne wrote:
>>> Just like it's done for the XEN_DOMCTL_memory_mapping hypercall, add
>>> the permissions checks to vPCI map_range(), which is used to map the
>>> BARs into the domain p2m.
>>>
>>> Adding those checks requires that for x86 PVH hardware domain builder
>>> the permissions are set before initializing the IOMMU, or else
>>> attempts to initialize vPCI done as part of IOMMU device setup will
>>> fail due to missing permissions to create the BAR mappings.
>>>
>>> While moving the call to dom0_setup_permissions() convert the panic()
>>> used for error handling to a printk, the caller will already panic if
>>> required.
>>>
>>> Fixes: 9c244fdef7e7 ('vpci: add header handlers')
>>> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
>>
>> I've committed this, but despite the Fixes: tag I'm not sure this
>> wants backporting. Thoughts?
> 
>  From a cursory review thus far, since this introduced a new XSM hook 
> site, shouldn't this have at least had an Rb by an XSM 
> reviewer/maintainer?

Probably, but already back then I said this model isn't going to work
flawlessly.

> I would have replied sooner, but have been on holiday for last two weeks.

I guess there was no way for us to know without you sending a note to
private@ (which, I will admit, you may not even have been aware of).

Jan



 


Rackspace

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