On 25.06.2024 09:44, Chen, Jiqian wrote:
> On 2024/6/24 16:17, Jan Beulich wrote:
>> On 21.06.2024 10:20, Chen, Jiqian wrote:
>>> On 2024/6/20 18:42, Jan Beulich wrote:
>>>> Alternatively we could maybe enable XEN_DOMCTL_getdomaininfo to permit
>>>> DOMID_SELF.
>>> It didn't permit DOMID_SELF since below commit. Does it still have the same 
>>> problem if permit DOMID_SELF?
>>
>> To answer this, all respective callers would need auditing. However, ...
>>
>>> commit 10ef7a91b5a8cb8c58903c60e2dd16ed490b3bcf
>>> Author: [email protected] <[email protected]>
>>> Date:   Tue Aug 14 09:56:46 2007 +0100
>>>
>>>     xen: Do not accept DOMID_SELF as input to DOMCTL_getdomaininfo.
>>>     This was screwing up callers that loop on getdomaininfo(), if there
>>>     was a domain with domid DOMID_FIRST_RESERVED-1 (== DOMID_SELF-1).
>>>     They would see DOMID_SELF-1, then look up DOMID_SELF, which has domid
>>>     0 of course, and then start their domain-finding loop all over again!
>>>     Found by Kouya Shimura <[email protected]>. Thanks!
>>>     Signed-off-by: Keir Fraser <[email protected]>
>>
>> ... I view this as a pretty odd justification for the change, when imo the
>> bogus loops should instead have been adjusted.
> Yes, you are right.
> And Anthony suggested to use LIBXL_TOOLSTACK_DOMID to replace 0 domid.
> It seems there is no need to change hypercall DOMCTL_getdomaininfo for now?

With Anthony's suggestion - indeed.

Jan

Reply via email to