[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c6d89f21-b914-a7c1-d34c-dd083185d18b@intel.com>
Date: Wed, 24 Aug 2022 11:53:49 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Borislav Petkov <bp@...en8.de>
Cc: Tom Lendacky <thomas.lendacky@....com>,
linux-kernel@...r.kernel.org, x86@...nel.org,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>,
Asish Kalra <ashish.kalra@....com>,
Michael Roth <michael.roth@....com>,
Joerg Roedel <jroedel@...e.de>,
"Kirill A. Shutemov" <kirill@...temov.name>,
stable@...r.kernel.org, Sean Christopherson <seanjc@...gle.com>
Subject: Re: [PATCH] x86/sev: Don't use cc_platform_has() for early SEV-SNP
calls
On 8/24/22 11:48, Borislav Petkov wrote:
> On Wed, Aug 24, 2022 at 11:43:10AM -0700, Dave Hansen wrote:
>> So, we don't have *ANY* control over where the compiler uses jump
>> tables. The kernel just happened to add some code that uses them, fell
>> over, and this adds a hack to get booting again.
>>
>> Isn't this a bigger problem?
> I had the same question already. Was thinking of maybe disabling
> the compiler from producing jump tables in the ident-mapped code.
> Tom's argument is that that might prevent the compiler from doing
> optimizations but I haven't talked to compiler folks whether those
> optimizations are even worth the effort.
>
> Regardless, the potential problem is limited:
>
> "# (jump-tables are implicitly disabled by RETPOLINE)"
Ahh, I missed the connection with retpoline. The ubiquity of
RETPOLINE=y probably means we'll see more of these issues because people
won't find them unless they're building and running weirdo configurations.
> i.e., only RETPOLINE=n builds for now which should be a minority?
>
> I guess when this explodes somewhere else again, we will have to
> generalize a fix.
Yep. It also reminds me to add RETPOLINE=n build to my tests.
Powered by blists - more mailing lists