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

Re: Ping: [PATCH] Argo: don't obtain excess page references


  • To: Christopher Clark <christopher.w.clark@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 13 Feb 2023 11:55:11 +0100
  • 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=b3iKdFNPxYhhVdd3DtbkCxa+1wmF8o+QpB/l21Dqtx4=; b=QtvKjgXpCUupy+T62thztxv0KXsr5jtYLLr7BRan/60ibMDqZn/tDEfLyWQE3GxZnM7bw9xjeonF44x/Y7RqZVXS4MDfkvvTi0LIAhFx8xDSbsK+360La463YEkzx2LBJBsD2un/duJmxwQjOmlKFKQvLTCOY3BCK8qfCYMwFebNB1I3ntYFgWJIaQFPUPiGwfN8XYTgsHcdj2rOSDtw5yjBYfrIS3+TK/ctsMkUC1IhjPQ0vIwKOgmHXtskQggWTZ1PZS+erPXSbM4yba6SUU6j3Jzfl5le1EIvC5XVELnKsQ9Eg+WWCwiOGZtgR5qLvHCh5ogktm+5nry8qZJgFQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Oh9UaLaLxYbaYoqVLGt6mSxKHZNUa8T0T8THiBT8PZYauGWQ3vgORfoXk6TJAWAJNBKmlbt83m6uZFSZK5H87p/l1hwUVCZFgguw5MJJi+ili36Kkm5GzG5lJwaYtLsLw0aemHj1sCByX4Ovb0VsAg5IVicOP2qmvNjThjavjiNmfIAuIoRdcLwbG34VlcaobUoJTgEQ8+Yh4uMVMQGzLngFOdDvsvTxgsrOXSqmVajrCp4ksCiUxf48G27eHe4bo5N97nDjOZtSxPVdXO6erJ8GCzmnRFthWidEC0BXwkuLe97auwGrDTYO+v0Mq+4Z0XUmwWGSuI9/m5hc7hAA+g==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 13 Feb 2023 10:55:53 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 30.01.2023 09:03, Jan Beulich wrote:
> On 30.01.2023 05:35, Christopher Clark wrote:
>> On Mon, Nov 21, 2022 at 4:41 AM Jan Beulich <jbeulich@xxxxxxxx> wrote:
>>
>>> On 11.10.2022 11:28, Jan Beulich wrote:
>>>> find_ring_mfn() already holds a page reference when trying to obtain a
>>>> writable type reference. We shouldn't make assumptions on the general
>>>> reference count limit being effectively "infinity". Obtain merely a type
>>>> ref, re-using the general ref by only dropping the previously acquired
>>>> one in the case of an error.
>>>>
>>>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>>>
>>> Ping?
>>
>> Sorry it has taken me so long to review this patch and thank-you for
>> posting it. The points raised are helpful.
>>
>> Wrt to the patch - I can't ack because:
>> the general ref that is already held is from the page owner, and it may
>> actually be foreign; so the second ref acquire is currently ensuring that
>> it is a match for the owner of the ring. That needs addressing.
> 
> I'm afraid I may not understand your reply: Are you saying there's something
> wrong with the change? Or are you saying there's something wrong that merely
> becomes apparent due to the change? Or yet something else?

And to extend on the questions: What notion of "foreign" are you referring
to here? The earlier check_get_page_from_gfn() is passed the very same
domain. And anyway, get_page() wouldn't allow to acquire a ref with a
domain other than the page owner. Plus the sole caller of find_ring_mfns()
passes currd.

Jan



 


Rackspace

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