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 08:18:50 -0400 [thread overview]
Message-ID: <20240213121850.GH4048826@nvidia.com> (raw)
In-Reply-To: <20240213112015.GB28517@willie-the-truck>
On Tue, Feb 13, 2024 at 11:20:15AM +0000, Will Deacon wrote:
> Damn, all the surrounding rework has really left this poor code in a bit
> of a state.
That's one way to describe it. There is a reason it took me so many
patches to align this to the new core APIs :(
> Could you please respin your fix, but with an additional change
> to arm_smmu_mmu_notifier_get() so that it returns an error if there is
> more than one device in the domain, with some of the above in a comment?
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.
I can summarize some of these details in a comment for this patch.
Jason
WARNING: multiple messages have this Message-ID (diff)
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 08:18:50 -0400 [thread overview]
Message-ID: <20240213121850.GH4048826@nvidia.com> (raw)
In-Reply-To: <20240213112015.GB28517@willie-the-truck>
On Tue, Feb 13, 2024 at 11:20:15AM +0000, Will Deacon wrote:
> Damn, all the surrounding rework has really left this poor code in a bit
> of a state.
That's one way to describe it. There is a reason it took me so many
patches to align this to the new core APIs :(
> Could you please respin your fix, but with an additional change
> to arm_smmu_mmu_notifier_get() so that it returns an error if there is
> more than one device in the domain, with some of the above in a comment?
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.
I can summarize some of these details in a comment for this patch.
Jason
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-02-13 12:19 UTC|newest]
Thread overview: 26+ 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-02 14:28 ` Jason Gunthorpe
2024-02-03 8:02 ` Michael Shavit
2024-02-03 8:02 ` Michael Shavit
2024-02-08 12:58 ` Will Deacon
2024-02-08 12:58 ` Will Deacon
2024-02-08 14:27 ` Jason Gunthorpe
2024-02-08 14:27 ` Jason Gunthorpe
2024-02-13 11:20 ` Will Deacon
2024-02-13 11:20 ` Will Deacon
2024-02-13 12:18 ` Jason Gunthorpe [this message]
2024-02-13 12:18 ` Jason Gunthorpe
2024-02-13 12:54 ` Will Deacon
2024-02-13 12:54 ` Will Deacon
2024-02-13 13:30 ` Jason Gunthorpe
2024-02-13 13:30 ` Jason Gunthorpe
2024-02-13 13:56 ` Will Deacon
2024-02-13 13:56 ` Will Deacon
2024-02-13 14:00 ` Jason Gunthorpe
2024-02-13 14:00 ` Jason Gunthorpe
2024-02-14 17:00 ` Will Deacon
2024-02-14 17:00 ` Will Deacon
2024-02-14 19:09 ` Jason Gunthorpe
2024-02-14 19:09 ` Jason Gunthorpe
2024-02-15 11:38 ` Will Deacon
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=20240213121850.GH4048826@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.