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.wi...@gmail.com> > Signed-off-by: Jan Beulich <jbeul...@suse.com>
I disagree with the Reported-by tag here. At best, it's "also noticed while investigating". 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. Finally, as I said in Juergen's email. The root cause of the bug reported is that non-IOMMMU subops are ending up here. That needs fixing at the caller to iommu_do_domctl(), not inside it. ~Andrew