From: Jason Gunthorpe <jgg@nvidia.com>
To: Will Deacon <will@kernel.org>
Cc: iommu@lists.linux.dev, Joerg Roedel <joro@8bytes.org>,
linux-arm-kernel@lists.infradead.org,
Robin Murphy <robin.murphy@arm.com>,
Dan Carpenter <dan.carpenter@linaro.org>,
Michael Shavit <mshavit@google.com>,
Nicolin Chen <nicolinc@nvidia.com>,
patches@lists.linux.dev
Subject: Re: [PATCH rc] iommu/arm-smmu-v3: Do not use GFP_KERNEL under as spinlock
Date: Tue, 13 Feb 2024 09:30:45 -0400 [thread overview]
Message-ID: <20240213133045.GA989297@nvidia.com> (raw)
In-Reply-To: <20240213125456.GA28844@willie-the-truck>
On Tue, Feb 13, 2024 at 12:54:56PM +0000, Will Deacon wrote:
> > Adding a check is not a comprehensive solution, there are still ways
> > userspace can attack this code with iommufd's coming PASID support. It
> > certainly doesn't belong in this patch which should be backported.
>
> Ok, then how about avoiding the allocation entirely once the lock is
> held?
We need to allocate because we can't assume anything already made the
CD leaf present. Do you mean to do this additionally to this patch?
There are several places where a noalloc CD behavior would be useful,
I'd be fine to add that as part of this patch to protect the loop.
> > I can summarize some of these details in a comment for this patch.
>
> Alternatively, we can just revert the offending commits if we're not able
> to agree on a simple fix for now. I'd prefer to avoid that though.
I feel we are not aligned here. We are trying to get the driver to
work properly with iommufd and expose all the HW features. This has
been fixed comprehensively and well-reviewed patches have been on the
list for 7 months now. We want to move forward, not revert things.
Jason
next prev parent reply other threads:[~2024-02-13 13:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-02 14:28 [PATCH rc] iommu/arm-smmu-v3: Do not use GFP_KERNEL under as spinlock Jason Gunthorpe
2024-02-03 8:02 ` Michael Shavit
2024-02-08 12:58 ` Will Deacon
2024-02-08 14:27 ` Jason Gunthorpe
2024-02-13 11:20 ` Will Deacon
2024-02-13 12:18 ` Jason Gunthorpe
2024-02-13 12:54 ` Will Deacon
2024-02-13 13:30 ` Jason Gunthorpe [this message]
2024-02-13 13:56 ` Will Deacon
2024-02-13 14:00 ` Jason Gunthorpe
2024-02-14 17:00 ` Will Deacon
2024-02-14 19:09 ` Jason Gunthorpe
2024-02-15 11:38 ` Will Deacon
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=20240213133045.GA989297@nvidia.com \
--to=jgg@nvidia.com \
--cc=dan.carpenter@linaro.org \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mshavit@google.com \
--cc=nicolinc@nvidia.com \
--cc=patches@lists.linux.dev \
--cc=robin.murphy@arm.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;
as well as URLs for NNTP newsgroup(s).