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

Re: [PATCH] IOMMU: make domctl handler tolerate NULL domain


  • To: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 19 Apr 2022 12:59:00 +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=XMF2QP4JiD6lAd5TY/BvJitjdqmdkDexMhqRSsWikug=; b=d0um1ys+EK4uf3pONYQLQoi60eywYFiCqI5r94ekck1wgM1Ocud5PgodLSArAiX8IANoKjImdNx6FTNUKjXgmRhD6+FHMJ9SruGdmIntsTbVErZKu/iGdZcM6p/7cS0oolD+mfcInSEA9Tjmi6KqJhn/5rQEAUYDc/Lt/8LBtRjpa0FavD+fNVcA6GaTk0UZARWvwEUVTZ7dNJsR7gx1AFX2CMMf6xtgbxDZK8GFoTYNQ4YWYV36D4JJKQIgu/7XQ6GFxxiWXQINQDOlD2tbHvB5WjLlfDutWsWx8+WGj90V4mxFxPAvEcZK/IVSlEZSqiCdAGpRqYb8p1uObWoFeQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=btUVPc9DhI36+LZgxeth6rJAyr6C35xdc77OyYpCSIEv5wofh5PiQRYKUoWkWQpPaty8rbTb0H52vtm8evwnHAnf24u7pE1GpovQS4yIuyrl22equ+qdPlTXOR83TFV7SCDeOK4XmPJlYVzmN4s1UiNtOf4T3ewyDhc4KfD3WMB4kaJw4YlA7z6ed4eJvTb/i6UJeeQsQVdya+oLu88J8rC6bHZE9A6lbuO47WUiHEbWbUc0k3UQklAcUqJ3II+v//vX2i62Jpa8LKtv+5y5P3w8MU0nOPm8r8A+fOkg2hGc4NRb4f/whW5MHOwChA/wd5dQ4lJGNRUKUQ5mDLCwWA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Paul Durrant <paul@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 19 Apr 2022 10:59:05 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 19.04.2022 12:49, Andrew Cooper wrote:
> On 19/04/2022 10:39, Jan Beulich wrote:
>> Besides the reporter's issue of hitting a NULL deref when !CONFIG_GDBSX,
>> XEN_DOMCTL_test_assign_device can legitimately end up having NULL passed
>> here, when the domctl was passed DOMID_INVALID.
>>
>> Fixes: 71e617a6b8f6 ("use is_iommu_enabled() where appropriate...")
>> Reported-by: Cheyenne Wills <cheyenne.wills@xxxxxxxxx>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> I disagree with the Reported-by tag here.  At best, it's "also noticed
> while investigating".

One can view that way as well, sure. But this change alone would be
sufficient to address the report. (As would be Jürgen's change alone.)

> Furthermore, under what circumstances is test_assign_device legitimate
> when passing DOMID_INVALID ?  This has been broken for 3 years now
> without report, so it's clearly an unused codepath under both xl's and
> xapi's idea of passthrough.

I guess xend had a way to drive the domctl this way. Iirc this was
to find out whether a device is assignable at all, without needing
to know of any particular valid domain.

Jan




 


Rackspace

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