linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Gaurav Batra <gbatra@linux.vnet.ibm.com>
Cc: Brian King <brking@linux.vnet.ibm.com>,
	linuxppc-dev@lists.ozlabs.org,
	Greg Joyce <gjoyce@linux.vnet.ibm.com>
Subject: Re: [PATCH v2] powerpc/iommu: DMA address offset is incorrectly calculated with 2MB TCEs
Date: Fri, 05 May 2023 12:21:24 +1000	[thread overview]
Message-ID: <87y1m3bjrv.fsf@mail.lhotse> (raw)
In-Reply-To: <307aae51-1619-79d6-5743-be828e62ccba@linux.vnet.ibm.com>

Gaurav Batra <gbatra@linux.vnet.ibm.com> writes:
> Hello Michael,
>
> I agree with your concerns regarding a device been able to access memory 
> that doesn't belong to it. That exposure we have today with 2MB TCEs. 
> With 2MB TCEs, DMA window size will be big enough, for dedicated 
> adapters, that whole memory is going to be mapped "direct". Which 
> essentially means, that a "rogue" device/driver has the potential to 
> corrupt LPAR wide memory.

Yes that's always been a trade-off between performance and robustness,
and performance is generally the winner.

There have been various command line flags in the past to configure
stricter behaviour, disable bypass etc. Some of those are now generic,
iommu.strict/passthrough, it would be good to get them wired up to work
on powerpc at some point.

> I have sent you v3.

Thanks.

cheers

      reply	other threads:[~2023-05-05  2:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-19 15:26 [PATCH v2] powerpc/iommu: DMA address offset is incorrectly calculated with 2MB TCEs Gaurav Batra
2023-04-20 15:21 ` Michael Ellerman
2023-04-20 19:45   ` Gaurav Batra
2023-05-03  3:25     ` Gaurav Batra
2023-05-22  0:08       ` Alexey Kardashevskiy
2023-05-22 13:11         ` Gaurav Batra
2023-05-04  5:10     ` Michael Ellerman
2023-05-04 18:03       ` Gaurav Batra
2023-05-05  2:21         ` Michael Ellerman [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=87y1m3bjrv.fsf@mail.lhotse \
    --to=mpe@ellerman.id.au \
    --cc=brking@linux.vnet.ibm.com \
    --cc=gbatra@linux.vnet.ibm.com \
    --cc=gjoyce@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.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).