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

Re: [PATCH v2 3/4] xen/arm: Reserve domid 0 for Dom0


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Luca Fancellu <luca.fancellu@xxxxxxx>
  • Date: Thu, 8 Apr 2021 14:12:12 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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-SenderADCheck; bh=8Rxb2bddurB77XcSBWAtEMAsJo42fUcRhMctdUBE7Xk=; b=HZCia4ftvjyt0tIt0zgsT/spteL09iLsXi/4soc6NVo/7cboEYRlzkrqgmPHrlm9NqjLRY3vVHXO0L6KdqtFkdSi46XiRBmihWMwgrPU7qSWBgjIlcKK3iXD7Y3ZcBNUO3ZpaVojGS35GLZrCOz+rVCheLzGkUGZKphBAT0uWJO0X/zhBj+xTYtS8oJhzaqwOU/A8/hK/XW9RFpdvJPqMzWjdjQzZEJAwc3oZuLlffZHgX8JkyCEW4A1FJ4FPQJCOg+/tCguh0A77NEItcyXkmXrRTxJJbuItNHzrQwkGdrQG5e9YC7BPMoiCWYE+PuSEh5ugHcaiiyk2wiWxYRjVQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hdbjc484CsDpHzwdm6+6FQ7grYxCRwlQ5XmhP8VqUkCrbOFelfRuHtKaVGe1IOPrOK/1ui3bm3/WGqOwnKHNtfjOHxOwmR0n/dAWMwGgY+gP4DWQ9ArLHAWP15S4FvWIlHr96Sh684fyYUoVs8F8nFnZkJ974mP/dsIdWFgzpKju+I2kkAg8L6geXK5CHth4vjfYhqVw6+AZZ5sUixQy+tZqaIrWnNXuRyv19UZoRwjkemoEcq4yHksuDDtisRIVKPjjAIRSvegqvPY6wZZashYqAHSN/jx+sPMXu35ZZFE2Qu//KxWEWnKMmYx7q2TR7J1Cyr3albaoN4zyCaHN5Q==
  • Authentication-results-original: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Cc: Bertrand Marquis <bertrand.marquis@xxxxxxx>, wei.chen@xxxxxxx, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 08 Apr 2021 13:12:36 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;


> On 8 Apr 2021, at 11:46, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> 
> On 08.04.2021 11:48, Luca Fancellu wrote:
>> --- a/xen/common/domctl.c
>> +++ b/xen/common/domctl.c
>> @@ -419,7 +419,7 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) 
>> u_domctl)
>>             {
>>                 if ( dom == DOMID_FIRST_RESERVED )
>>                     dom = 1;
>> -                if ( is_free_domid(dom) )
>> +                if ( (dom != 0) && is_free_domid(dom) )
>>                     break;
>>             }
>> 
> 
> I don't think this change is needed - I don't see how dom could
> ever end up being zero. The code is already intended to be safe
> wrt accidentally creating a domain with ID zero. (Granted "rover"
> would benefit from being moved into the yet more narrow scope,
> which would make this even more obvious.)

Yes I agree, I will remove the check in the next version patch.

Cheers,
Luca

> 
> Jan




 


Rackspace

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