[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMj1kXGh9pw0U=+-Pg8Uh4xzNhyDZBDvGC7jcnCYvmTQxaUZTQ@mail.gmail.com>
Date: Sat, 3 Feb 2024 11:27:19 +0100
From: Ard Biesheuvel <ardb@...nel.org>
To: Borislav Petkov <bp@...en8.de>
Cc: Kevin Loughlin <kevinloughlin@...gle.com>, Jacob Xu <jacobhxu@...gle.com>,
Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
Nick Desaulniers <ndesaulniers@...gle.com>, Justin Stitt <justinstitt@...gle.com>,
Tom Lendacky <thomas.lendacky@....com>, Pankaj Gupta <pankaj.gupta@....com>,
Hou Wenlong <houwenlong.hwl@...group.com>, Dionna Glaze <dionnaglaze@...gle.com>,
Brijesh Singh <brijesh.singh@....com>, Michael Roth <michael.roth@....com>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>, linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev, linux-coco@...ts.linux.dev,
Ashish Kalra <ashish.kalra@....com>, Andi Kleen <ak@...ux.intel.com>,
Adam Dunlap <acdunlap@...gle.com>, Peter Gonda <pgonda@...gle.com>,
Sidharth Telang <sidtelang@...gle.com>
Subject: Re: [PATCH v3 0/2] x86: enforce and cleanup RIP-relative accesses in
early boot code
On Sat, 3 Feb 2024 at 11:20, Borislav Petkov <bp@...en8.de> wrote:
>
> On Fri, Feb 02, 2024 at 04:22:02PM -0800, Kevin Loughlin wrote:
> > True. I just think it would be better to have an upstream fix for
> > clang builds of SEV-SNP guests; I believe the first such SEV-SNP code
> > was merged in 5.19 if I'm not mistaken.
>
> SNP host support is not upstream yet. So we'd be supporting something
> which is out-of-tree. Lemme see how ugly it'll get...
>
The minimal fix doesn't look that bad IMHO. Note that this version is
based on your patch that removes
CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT, and we'd need to see whether
or not to backport that as well.
arch/x86/include/asm/asm.h | 13 +++++++++++++
arch/x86/include/asm/mem_encrypt.h | 13 ++++++++-----
arch/x86/kernel/sev-shared.c | 12 ++++++------
arch/x86/kernel/sev.c | 9 +++++++--
arch/x86/mm/mem_encrypt_identity.c | 27 ++++++++++++---------------
5 files changed, 46 insertions(+), 28 deletions(-)
https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/commit/?h=x86-pie-for-sev-v4a&id=65d0e5f4ed6ca807cdf28a1c5c0389af2c9f9bda
Powered by blists - more mailing lists