On 19.04.2022 16:56, Juergen Gross wrote: > On 19.04.22 16:51, Andrew Cooper wrote: >> On 19/04/2022 14:52, Juergen Gross wrote: >>> Today iommu_do_domctl() is being called from arch_do_domctl() in the >>> "default:" case of a switch statement. This has led already to crashes >>> due to unvalidated parameters. >>> >>> Fix that by moving the call of iommu_do_domctl() to the main switch >>> statement of do_domctl(). >>> >>> Signed-off-by: Juergen Gross <[email protected]> >>> --- >>> Another possibility would even be to merge iommu_do_domctl() completely >>> into do_domctl(), but I wanted to start with a less intrusive variant. >>> V3: >>> - new patch >> >> I definitely prefer this approach, thanks. In addition to being >> clearer, it's also faster because there isn't a long line of "do you >> understand this subop?" calls when we know exactly what it is. >> >> However, I think we need stub for the !HAS_PASSTHROUGH case now that it >> is being called from common code. > > Okay, I'll add it. Jan, are you fine with a stub?
Sure. Jan
