From: "Koenig, Christian" <Christian.Koenig@amd.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>,
Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>,
"Maciej W. Rozycki" <macro@linux-mips.org>,
Eric Biggers <ebiggers@google.com>,
Catalin Marinas <catalin.marinas@arm.com>,
dri-devel <dri-devel@lists.freedesktop.org>,
Masahiro Yamada <yamada.masahiro@socionext.com>,
Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
Will Deacon <will@kernel.org>,
Emil Velikov <emil.velikov@collabora.com>,
Rob Clark <robdclark@chromium.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Paul Burton <paul.burton@mips.com>,
Mike Rapoport <rppt@linux.ibm.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
"moderated list:ARM64 PORT (AARCH64 ARCHITECTURE)"
<linux-arm-kernel@lists.infradead.org>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
"open list:MIPS" <linux-mips@vger.kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
open list:DRM DRIVER FOR MSM ADRENO GPU
Subject: Re: [PATCH 0/6] drm+dma: cache support for arm, etc
Date: Thu, 15 Aug 2019 18:48:39 +0000 [thread overview]
Message-ID: <215e5cb7-0fcf-48db-a656-817054dde420@email.android.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1314 bytes --]
Sorry if the style is messed up, replying from my phone.
Am 15.08.2019 20:27 schrieb Christoph Hellwig <hch@lst.de>:
On Thu, Aug 15, 2019 at 06:21:00PM +0000, Koenig, Christian wrote:
> > (2) Add support for DMA_ATTR_NO_KERNEL_MAPPING to this new API instead
> > of dma_alloc_attrs. The initial difference with that flag is just
> > that we allow highmem, but in the future we could also unmap this
> > memory from the kernel linear mapping entirely on architectures
> > where we can easily do that.
>
> Mhm, why would we want to do this?
To avoid the CPU misspeculating into this memory. For example NVMe SSDs
have a feature called host memory buffer that is a lot like your stolen
main ram for the GPU case. We currently hand the SSD a
DMA_ATTR_NO_KERNEL_MAPPING allocation if it requests such a buffer. If
possible we'd really like to make sure no speculative execution bug
(or intentional attacker with a kernel exploit for that matter) can easily
access that memory.
Well, for the graphics case I absolutely need to keep the linear kernel mapping. Because for certain use cases the memory is accessed by the kernel all the time as well.
Why should accessing uncached memory be more of a security problem than accessing cached?
Regards,
Christian
[-- Attachment #1.2: Type: text/html, Size: 2507 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2019-08-15 18:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-15 18:48 Koenig, Christian [this message]
[not found] ` <215e5cb7-0fcf-48db-a656-817054dde420-2ueSQiBKiTY7tOexoI0I+QC/G2K4zDHf@public.gmane.org>
2019-08-15 18:52 ` [PATCH 0/6] drm+dma: cache support for arm, etc Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2019-08-14 21:59 Rob Clark
[not found] ` <20190814220011.26934-1-robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-08-15 6:51 ` Christoph Hellwig
[not found] ` <20190815065117.GA23761-jcswGhMUV9g@public.gmane.org>
2019-08-15 13:54 ` Rob Clark
[not found] ` <CAJs_Fx4bS64s7+xQqsead3N80ZQpofqegFQu+tT=b3wcGd_2pA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-08-15 17:53 ` Christoph Hellwig
[not found] ` <20190815175346.GA19839-jcswGhMUV9g@public.gmane.org>
2019-08-15 18:21 ` Koenig, Christian
[not found] ` <e3f73b3c-49d5-3c19-dfff-0a24b4617e50-5C7GfCeVMHo@public.gmane.org>
2019-08-15 18:27 ` Christoph Hellwig
2019-08-16 21:04 ` Rob Clark
[not found] ` <CAJs_Fx6am7TeDFSG=CcTT=4KwhqrZX_jnn56NaWcDkGVizuakg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-08-19 5:23 ` Christoph Hellwig
[not found] ` <20190819052337.GA16622-jcswGhMUV9g@public.gmane.org>
2019-08-19 14:39 ` Rob Clark
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=215e5cb7-0fcf-48db-a656-817054dde420@email.android.com \
--to=christian.koenig@amd.com \
--cc=catalin.marinas@arm.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=ebiggers@google.com \
--cc=emil.velikov@collabora.com \
--cc=geert@linux-m68k.org \
--cc=hch@lst.de \
--cc=kstewart@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mips@vger.kernel.org \
--cc=m.mizuma@jp.fujitsu.com \
--cc=macro@linux-mips.org \
--cc=mchehab+samsung@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=paul.burton@mips.com \
--cc=robdclark@chromium.org \
--cc=robin.murphy@arm.com \
--cc=rppt@linux.ibm.com \
--cc=will@kernel.org \
--cc=yamada.masahiro@socionext.com \
/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