Re: [TECH TOPIC] vfio, iommufd: Enabling user space drivers to vend more granular access to client processes
From: Alex Williamson
Date: Fri Sep 19 2025 - 11:57:51 EST
On Thu, 18 Sep 2025 19:57:39 -0300
Jason Gunthorpe <jgg@xxxxxxxx> wrote:
>
> What I've been thinking is if the vending process could "dup" the FD
> and permanently attach a BPF program to the new FD that sits right
> after ioctl. The BPF program would inspect each ioctl when it is
> issued and enforce whatever policy the vending process wants.
Promising idea.
> What would give me alot of pause is your proposal where we effectively
> have the kernel enforce some arbitary policy, and I know from
> experience there will be endless asks for more and more policy
> options.
Definitely. Also, is this at all considering the work that's gone into
vfio-user? The long running USD sounds a lot like a vfio-user server,
where if we're using vfio-user's socket interface we'd have a lot of
opportunity to implement policy there and dma-bufs might be a means to
expose direct, restricted access. Thanks,
Alex