Thread (82 messages) 82 messages, 5 authors, 2016-09-16

Re: [RFC PATCH v2 19/20] x86: Access the setup data through debugfs un-encrypted

flat view

From: Borislav Petkov <bp@alien8.de>
Date: 2016-09-14 14:51:08
Also in: kvm, linux-efi, linux-iommu, linux-mm, lkml

On Wed, Sep 14, 2016 at 09:29:41AM -0500, Tom Lendacky wrote:
This is still required because just using the __va() would still cause
the mapping created to have the encryption bit set. The ioremap call
will result in the mapping not having the encryption bit set.
I meant this: https://lkml.kernel.org/r/20160902181447.GA25328@nazgul.tnic

Wouldn't simply clearing the SME mask work?

#define __va(x)			((void *)(((unsigned long)(x)+PAGE_OFFSET) & ~sme_me_mask))

Or are you saying, one needs the whole noodling through ioremap_cache()
because the data is already encrypted and accessing it with sme_me_mask
cleared would simply give you the encrypted garbage?

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help