[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wiWReaH-khCA_uiKC5xJSQkDudEfybdepSZXKvdXZkZsg@mail.gmail.com>
Date: Tue, 19 Sep 2023 11:49:48 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Matteo Rizzo <matteorizzo@...gle.com>
Cc: Ingo Molnar <mingo@...nel.org>,
"Lameter, Christopher" <cl@...amperecomputing.com>,
Dave Hansen <dave.hansen@...el.com>, penberg@...nel.org,
rientjes@...gle.com, iamjoonsoo.kim@....com,
akpm@...ux-foundation.org, vbabka@...e.cz,
roman.gushchin@...ux.dev, 42.hyeyoo@...il.com,
keescook@...omium.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, linux-mm@...ck.org,
linux-hardening@...r.kernel.org, tglx@...utronix.de,
mingo@...hat.com, bp@...en8.de, dave.hansen@...ux.intel.com,
x86@...nel.org, hpa@...or.com, corbet@....net, luto@...nel.org,
peterz@...radead.org, jannh@...gle.com, evn@...gle.com,
poprdi@...gle.com, jordyzomer@...gle.com
Subject: Re: [RFC PATCH 00/14] Prevent cross-cache attacks in the SLUB allocator
On Tue, 19 Sept 2023 at 08:48, Matteo Rizzo <matteorizzo@...gle.com> wrote:
>
> On Mon, 18 Sept 2023 at 20:05, Linus Torvalds
> <torvalds@...ux-foundation.org> wrote:
> >
> > ... and equally importantly, what about DMA?
>
> I'm not exactly sure what you mean by this, I don't think this should
> affect the performance of DMA.
I was more worried about just basic correctness.
We've traditionally had a lot of issues with using virtual addresses
for dma, simply because we've got random drivers, and I'm not entirely
convinced that your "virt_to_phys()" update will catch it all.
IOW, even on x86-64 - which is hopefully better than most
architectures because it already has that double mapping issue - we
have things like
unsigned long paddr = (unsigned long)vaddr - __PAGE_OFFSET;
in other places than just the __phys_addr() code.
The one place I grepped for looks to be just boot-time AMD memory
encryption, so wouldn't be any slab allocation, but ...
Linus
Powered by blists - more mailing lists