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 <[email protected]>
>> Signed-off-by: Jan Beulich <[email protected]>
> 
> 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


Reply via email to