On 10/21/26 22:16, Val Packett wrote:
> 
> On 10/21/26 10:43 AM, Christian König wrote:
>> [..]
>>> The buffer lifecycle coordination we need this for applies to KVM as well
>>> and it generally doesn't make sense to have this as a provider-specific
>>> thing since it's not related to the provider in any way, it's just
>>> something we want from dmabufs in general.
>> I wouldn't put that on the DMA-buf file descriptor where basically anybody 
>> can mess with it. That is just an recipe for trouble.
>>
>> The better approach seems to be putting it into the udmabuf_ioctl(), so that 
>> from the very beginning you add the eventfd which signals when the udmabuf 
>> is released.
>>
>> If we need that for more implementations than just udmabuf, we can 
>> potentially add it to dma_buf_export_info so that exporters can provide the 
>> eventfd file descriptor directly on creation.
> 
> Well, we already need it with both udmabuf and gntdev-dmabuf..
> 
> Involving the exporter sounds really annoying when it's not something 
> exporter dependent really.. What if the policy is just "only one eventfd 
> ever" i.e. the first call of the ioctl succeeds but later calls on the same 
> dmabuf return an error?

No, exactly that is what I'm trying to avoid.

Nobody except the original creater should be able to insert an eventfd here.

Regards,
Christian.

> That should remove the concern about one user messing with another's events 
> (and avoid the concurrent replacement issue sashiko-bot warned about)..
> 
> Thanks,
> ~val
> 

Reply via email to