[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <579aec6b-78d1-57af-8e17-59cbe59f168a@amd.com>
Date: Wed, 16 Feb 2022 07:41:59 -0600
From: "Limonciello, Mario" <mario.limonciello@....com>
To: Borislav Petkov <bp@...en8.de>
Cc: "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
Kees Cook <keescook@...omium.org>,
Thomas Lendacky <Thomas.Lendacky@....com>, hughsient@...il.com,
Martin Fernandez <martin.fernandez@...ypsium.com>,
linux-kernel@...r.kernel.org, Brijesh Singh <brijesh.singh@....com>
Subject: Re: [PATCH v4] x86/cpu: clear SME feature flag when not in use
On 2/16/2022 04:33, Borislav Petkov wrote:
> On Tue, Feb 15, 2022 at 09:44:46PM -0600, Mario Limonciello wrote:
>> @@ -607,6 +609,9 @@ static void early_detect_mem_encrypt(struct cpuinfo_x86 *c)
>> if (IS_ENABLED(CONFIG_X86_32))
>> goto clear_all;
>>
>> + if (!sme_me_mask)
>> + setup_clear_cpu_cap(X86_FEATURE_SME);
>
> Why not "goto clear_all;" ?
>
"clear_all" clears SEV and SEV_ES as well which as pointed out in v2 is
incorrect.
Powered by blists - more mailing lists