From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752342AbdI2QwG (ORCPT ); Fri, 29 Sep 2017 12:52:06 -0400 Received: from mail.skyhub.de ([5.9.137.197]:60486 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751828AbdI2QwF (ORCPT ); Fri, 29 Sep 2017 12:52:05 -0400 Date: Fri, 29 Sep 2017 18:51:54 +0200 From: Borislav Petkov To: Tom Lendacky Cc: x86@kernel.org, Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org, "H. Peter Anvin" Subject: Re: [PATCH] x86/mm: Disable branch profiling in mem_encrypt.c Message-ID: <20170929165154.4vj752lk4i7hp3v2@pd.tnic> References: <20170929162419.6016.53390.stgit@tlendack-t1.amdoffice.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170929162419.6016.53390.stgit@tlendack-t1.amdoffice.net> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 29, 2017 at 11:24:19AM -0500, Tom Lendacky wrote: > Some routines in mem_encrypt.c are called very early in the boot process, > e.g. sme_encrypt_kernel(). When CONFIG_TRACE_BRANCH_PROFILING is defined > the resulting branch profiling associated with the check to see if SME is > active results in a kernel crash. Disable branch profiling for > mem_encrypt.c by defining DISABLE_BRANCH_PROFILING before including any > header files. > > Reported-by: kernel test robot > Signed-off-by: Tom Lendacky > --- > arch/x86/mm/mem_encrypt.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/x86/mm/mem_encrypt.c b/arch/x86/mm/mem_encrypt.c > index 3fcc8e0..16c5f37 100644 > --- a/arch/x86/mm/mem_encrypt.c > +++ b/arch/x86/mm/mem_encrypt.c > @@ -10,6 +10,8 @@ > * published by the Free Software Foundation. > */ > > +#define DISABLE_BRANCH_PROFILING > + > #include > #include > #include Acked-by: Borislav Petkov -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.