lkml.org 
[lkml]   [2022]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v6 1/5] iommu: Return -EMEDIUMTYPE for incompatible domain and device/group
Date
> From: Jason Gunthorpe <jgg@nvidia.com>
> Sent: Friday, September 9, 2022 8:08 PM
>
>
> > As discussed in a side thread a note might be added to exempt calling
> > kAPI outside of the iommu driver.
>
> Sadly, not really.. The driver is responsible to santize this if it is
> relevant. It is the main downside of this approach.
>

Better provide a clarification on what sanitization means.

e.g. I don't think we should change errno in those kAPIs to match the
definition in iommu subsystem since e.g. -EINVAL really means different
things in different context.

So the sanitization in iommu driver is probably that:

- If an external kAPI returns -EINVAL, convert it to -ENODEV given iommu
domain is iommu internal object hence unlikely for external kAPIs to
capture incompatibility issue between domain/device;
- Otherwise just pass whatever returned to the caller, following the definition
of "Same behavior as -ENODEV" above

Thanks
Kevin

\
 
 \ /
  Last update: 2022-09-13 04:23    [W:0.073 / U:2.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site