[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211007121127.53956635@jacob-builder>
Date: Thu, 7 Oct 2021 12:11:27 -0700
From: Jacob Pan <jacob.jun.pan@...ux.intel.com>
To: Barry Song <21cnbao@...il.com>
Cc: Jason Gunthorpe <jgg@...dia.com>, iommu@...ts.linux-foundation.org,
LKML <linux-kernel@...r.kernel.org>,
Joerg Roedel <joro@...tes.org>,
Christoph Hellwig <hch@...radead.org>,
Lu Baolu <baolu.lu@...ux.intel.com>,
Raj Ashok <ashok.raj@...el.com>,
"Kumar, Sanjay K" <sanjay.k.kumar@...el.com>,
Dave Jiang <dave.jiang@...el.com>,
Tony Luck <tony.luck@...el.com>, mike.campin@...el.com,
Yi Liu <yi.l.liu@...el.com>,
"Tian, Kevin" <kevin.tian@...el.com>, jacob.jun.pan@...ux.intel.com
Subject: Re: [RFC 0/7] Support in-kernel DMA with PASID and SVA
Hi Barry,
On Thu, 7 Oct 2021 18:43:33 +1300, Barry Song <21cnbao@...il.com> wrote:
> > > Security-wise, KVA respects kernel mapping. So permissions are better
> > > enforced than pass-through and identity mapping.
> >
> > Is this meaningful? Isn't the entire physical map still in the KVA and
> > isn't it entirely RW ?
>
> Some areas are RX, for example, ARCH64 supports KERNEL_TEXT_RDONLY.
> But the difference is really minor.
That brought up a good point if we were to use DMA API to give out KVA as
dma_addr for trusted devices. We cannot satisfy DMA direction requirements
since we can't change kernel mapping. It will be similar to DMA direct
where dir is ignored AFAICT.
Or we are saying if the device is trusted, using pass-through is allowed.
i.e. physical address.
Thoughts?
Thanks,
Jacob
Powered by blists - more mailing lists