Linux IOMMU Development
 help / color / mirror / Atom feed
From: Baolu Lu <baolu.lu@linux.intel.com>
To: Aditya Garg <gargaditya08@live.com>
Cc: "iommu@lists.linux.dev" <iommu@lists.linux.dev>,
	"joro@8bytes.org" <joro@8bytes.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/5] iommu/vt-d: Restore WO permissions on second-level paging entries
Date: Wed, 14 May 2025 14:39:21 +0800	[thread overview]
Message-ID: <18db51b6-5685-40bf-bf8b-1e787834fdf5@linux.intel.com> (raw)
In-Reply-To: <PN3PR01MB9597D59895582119A2F56928B891A@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM>

On 5/14/25 13:52, Aditya Garg wrote:
> Hi
> 
> Since the original patch which this patch aims to revert fixed CVE-2021-47035, I'd
> like to know how is that managed now.

Modern IOMMU hardware supports multiple formats of page tables. Some of
them support write-only permission, but others do not due to
compatibility with the CPU page table. That's the reason why the
previous commit removed write-only permission to make it consistent.

Nowadays, we have renewed iommu domain allocation interface which takes
a device pointer and allocation flags. So, if the upper layers, for
example, VFIO or IOMMUFD, want the iommu driver to enforce write-only
protection, they should add an allocation flag for this explicitly.
Otherwise, the IOMMU driver will treat DMA_FROM_DEVICE as a hint, not an
enforcement.

Thanks,
baolu

  reply	other threads:[~2025-05-14  6:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-14  5:52 [PATCH 1/5] iommu/vt-d: Restore WO permissions on second-level paging entries Aditya Garg
2025-05-14  6:39 ` Baolu Lu [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-05-13  3:07 [PATCH 0/5] [PULL REQUEST] Intel IOMMU updates for v6.16 Lu Baolu
2025-05-13  3:07 ` [PATCH 1/5] iommu/vt-d: Restore WO permissions on second-level paging entries Lu Baolu

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=18db51b6-5685-40bf-bf8b-1e787834fdf5@linux.intel.com \
    --to=baolu.lu@linux.intel.com \
    --cc=gargaditya08@live.com \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.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