RE: [PATCH 2/3] iommufd: Add check on user response code

From: Tian, Kevin
Date: Wed Jul 10 2024 - 05:48:04 EST


> From: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
> Sent: Wednesday, July 10, 2024 4:34 PM
>
> The response code from user space is only allowed to be SUCCESS or
> INVALID. All other values are treated by the device as a response
> code of Response Failure according to PCI spec, section 10.4.2.1.
> This response disables the Page Request Interface for the Function.
>
> Add a check in iommufd_fault_fops_write() to avoid invalid response
> code.

"avoid invalid response code" but "RESP_INVALID is allowed" 😊.

I know what it means though...

>
> Fixes: 07838f7fd529 ("iommufd: Add iommufd fault object")
> Signed-off-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>

Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>