From: Jason Gunthorpe <jgg@ziepe.ca>
To: Jiahao Xu <xujiahao@cmss.chinamobile.com>
Cc: Kevin Tian <kevin.tian@intel.com>,
"Joerg Roedel (AMD)" <joro@8bytes.org>,
Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
iommu@lists.linux.dev, linux-kernel@vger.kernel.org,
Christian Brauner <brauner@kernel.org>,
syzbot+7666ed2c3d42196bf7e3@syzkaller.appspotmail.com
Subject: Re: [PATCH] iommufd: reject mapping an iommufd file into an IOAS
Date: Fri, 13 Nov 2026 20:41:01 -0400 [thread overview]
Message-ID: <20261114004101.GE2532299@ziepe.ca> (raw)
In-Reply-To: <20261112105945.285526-1-xujiahao@cmss.chinamobile.com>
On Thu, Nov 12, 2026 at 10:59:45AM +0800, Jiahao Xu wrote:
> iopt_map_file_pages() takes the fd passed to IOMMU_IOAS_MAP_FILE and, for
> every file that is not a dma-buf, stores a reference to it in the pages
> of the new mapping:
>
> iopt_map_file_pages()
> iopt_alloc_file_pages()
> pages->file = get_file(file)
I've know about this for a bit but haven't got to figuring out a
solution.
This patch is not quite good enough as any fd that can hold an
iommufd, like vfio is also a problem.
Really it needs to be reversed so only a memfd or dmabuf is held, but
I don't know how to do that..
Jason
prev parent reply other threads:[~2026-11-14 0:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 2:59 Jiahao Xu
2026-11-14 0:41 ` Jason Gunthorpe [this message]
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=20261114004101.GE2532299@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=brauner@kernel.org \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=syzbot+7666ed2c3d42196bf7e3@syzkaller.appspotmail.com \
--cc=will@kernel.org \
--cc=xujiahao@cmss.chinamobile.com \
/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®