From: Jason Gunthorpe <jgg@ziepe.ca>
To: Keith Busch <kbusch@kernel.org>
Cc: Alex Mastro <amastro@fb.com>,
Alex Williamson <alex.williamson@redhat.com>,
Kevin Tian <kevin.tian@intel.com>,
Bjorn Helgaas <bhelgaas@google.com>,
David Reiss <dreiss@meta.com>, Joerg Roedel <joro@8bytes.org>,
Leon Romanovsky <leon@kernel.org>,
Li Zhe <lizhe.67@bytedance.com>,
Mahmoud Adam <mngyadam@amazon.de>,
Philipp Stanner <pstanner@redhat.com>,
Robin Murphy <robin.murphy@arm.com>,
Vivek Kasireddy <vivek.kasireddy@intel.com>,
Will Deacon <will@kernel.org>, Yunxiang Li <Yunxiang.Li@amd.com>,
linux-kernel@vger.kernel.org, iommu@lists.linux.dev,
kvm@vger.kernel.org
Subject: Re: [TECH TOPIC] vfio, iommufd: Enabling user space drivers to vend more granular access to client processes
Date: Fri, 19 Sep 2025 08:56:50 -0300 [thread overview]
Message-ID: <20250919115650.GT1326709@ziepe.ca> (raw)
In-Reply-To: <aMyUxqSEBHeHAPIn@kbusch-mbp>
On Thu, Sep 18, 2025 at 05:24:54PM -0600, Keith Busch wrote:
> I read this as more about having the granularity to automatically
> release resources associated with a client process when it dies (as
> mentioned below) rather than relying on the bootstrapping process to
> manage it all. Not really about hostile ioctls, but that an ungraceful
> ending of some client workload doesn't even send them.
You could achieve this between co-operating processes by monitoring
the child with a pidfd, or handing it a pipe and watching for the pipe
to close..
> > > - It would be nice if mappings created with the restricted IOMMU fd were
> > > automatically freed when the underlying kernel object was freed (if the client
> > > process were to exit ungracefully without explicitly performing unmap cleanup
> > > after itself).
> >
> > Maybe the BPF could trigger an eventfd or something when the FD closes?
>
> I wouldn't have considered a BPF dependency for this. I'll need to think
> about that one for a moment.
Well, if you are going to be using BPF for policy then may as well use
it for all policy. It would not be hard to also invoke the BPF duing
the file descriptor close and presumably it can somehow to signal the
vendor process in some easy BPF way?
Jason
next prev parent reply other threads:[~2025-09-19 11:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-18 21:44 Alex Mastro
2025-09-18 22:57 ` Jason Gunthorpe
2025-09-18 23:24 ` Keith Busch
2025-09-19 7:00 ` Tian, Kevin
2025-09-19 11:58 ` Jason Gunthorpe
2025-09-22 9:14 ` Mostafa Saleh
2025-09-22 17:46 ` Alex Mastro
2025-09-22 17:51 ` Jason Gunthorpe
2025-09-19 11:56 ` Jason Gunthorpe [this message]
2025-09-19 15:57 ` Alex Williamson
2025-09-19 17:14 ` Alex Mastro
2025-09-19 16:13 ` Alex Mastro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250919115650.GT1326709@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=Yunxiang.Li@amd.com \
--cc=alex.williamson@redhat.com \
--cc=amastro@fb.com \
--cc=bhelgaas@google.com \
--cc=dreiss@meta.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=kbusch@kernel.org \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizhe.67@bytedance.com \
--cc=mngyadam@amazon.de \
--cc=pstanner@redhat.com \
--cc=robin.murphy@arm.com \
--cc=vivek.kasireddy@intel.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®