From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757753AbdJKSVm (ORCPT ); Wed, 11 Oct 2017 14:21:42 -0400 Received: from terminus.zytor.com ([65.50.211.136]:51519 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752434AbdJKSVl (ORCPT ); Wed, 11 Oct 2017 14:21:41 -0400 Date: Wed, 11 Oct 2017 11:15:54 -0700 From: tip-bot for Tom Lendacky Message-ID: Cc: bp@alien8.de, linux-kernel@vger.kernel.org, thomas.lendacky@amd.com, tglx@linutronix.de, lkp@01.org, hpa@zytor.com, torvalds@linux-foundation.org, bp@suse.de, peterz@infradead.org, mingo@kernel.org Reply-To: torvalds@linux-foundation.org, lkp@01.org, hpa@zytor.com, mingo@kernel.org, peterz@infradead.org, bp@suse.de, tglx@linutronix.de, thomas.lendacky@amd.com, linux-kernel@vger.kernel.org, bp@alien8.de In-Reply-To: <20171010194504.18887.38053.stgit@tlendack-t1.amdoffice.net> References: <20171010194504.18887.38053.stgit@tlendack-t1.amdoffice.net> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/urgent] x86/mm: Disable various instrumentations of mm/mem_encrypt.c and mm/tlb.c Git-Commit-ID: 67bb8e999e0aeac285d22f0e53c856b9df5282c6 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 67bb8e999e0aeac285d22f0e53c856b9df5282c6 Gitweb: https://git.kernel.org/tip/67bb8e999e0aeac285d22f0e53c856b9df5282c6 Author: Tom Lendacky AuthorDate: Tue, 10 Oct 2017 14:45:04 -0500 Committer: Ingo Molnar CommitDate: Wed, 11 Oct 2017 17:22:59 +0200 x86/mm: Disable various instrumentations of mm/mem_encrypt.c and mm/tlb.c Some routines in mem_encrypt.c are called very early in the boot process, e.g. sme_enable(). When CONFIG_KCOV=y is defined the resulting code added to sme_enable() (and others) for KCOV instrumentation results in a kernel crash. Disable the KCOV instrumentation for mem_encrypt.c by adding KCOV_INSTRUMENT_mem_encrypt.o := n to arch/x86/mm/Makefile. In order to avoid other possible early boot issues, model mem_encrypt.c after head64.c in regards to tools. In addition to disabling KCOV as stated above and a previous patch that disables branch profiling, also remove the "-pg" CFLAG if CONFIG_FUNCTION_TRACER is enabled and set KASAN_SANITIZE to "n", each of which are done on a file basis. Reported-by: kernel test robot Signed-off-by: Tom Lendacky Reviewed-by: Borislav Petkov Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171010194504.18887.38053.stgit@tlendack-t1.amdoffice.net Signed-off-by: Ingo Molnar --- arch/x86/mm/Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/arch/x86/mm/Makefile b/arch/x86/mm/Makefile index 72bf8c0..e1f0958 100644 --- a/arch/x86/mm/Makefile +++ b/arch/x86/mm/Makefile @@ -1,5 +1,12 @@ -# Kernel does not boot with instrumentation of tlb.c. -KCOV_INSTRUMENT_tlb.o := n +# Kernel does not boot with instrumentation of tlb.c and mem_encrypt.c +KCOV_INSTRUMENT_tlb.o := n +KCOV_INSTRUMENT_mem_encrypt.o := n + +KASAN_SANITIZE_mem_encrypt.o := n + +ifdef CONFIG_FUNCTION_TRACER +CFLAGS_REMOVE_mem_encrypt.o = -pg +endif obj-y := init.o init_$(BITS).o fault.o ioremap.o extable.o pageattr.o mmap.o \ pat.o pgtable.o physaddr.o setup_nx.o tlb.o