Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp936408ybn; Wed, 25 Sep 2019 09:49:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqzDMAFY8cpB4LPCxVJbUhtBlAf6wFr4xUWbyBXTARvjXka4nqrbFcOocMynFMIutkCBEe7l X-Received: by 2002:a50:8961:: with SMTP id f30mr3935764edf.144.1569430173710; Wed, 25 Sep 2019 09:49:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569430173; cv=none; d=google.com; s=arc-20160816; b=kkDvuQhnsByTlNREOHcd4xhpuhVU/2VJQzkORzUZRhxyZYYQEg+0en5QJPdYgfizHa /yjWR/S7hidPlOW+9pvcnZHVArP0MdGfWOReC0Xb0+O6W8O7Y+UOpHHp04lnk3/polJn nZQROS0Ntm89G3VRCxu2wbEfO7PWMAObB4SX52nI9WGh24EvSsnYbYRIx+WhxV9N641f 3u85dmw6tN7iq1krFH9DfSQiolkg9eY+XyjoUoqTR/1R+qLTi6+WihtEp+MWIGqetgLp NBQlcnxyi9TxG4W6FI1NnmNd9x+baxKJ+mTtt/aB5ri0+AVS/qSq2LAmKvSRoQ/bDoAa ocLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature; bh=NqsehSBKMKDO8NnwgZk11cPX0Pb+XtQ+3DVSQLpGbJo=; b=OzKpN9QBGaBF0B8+06tZQRANdf3UgsGwcqs8oLJ8jwzdxmGDPBfMZiOw7zryww7k5H UzPum+G7GUGb2ayNCXZuA4ZdVYndsyRfploAbAeI7ry5RGDok5aQslTvD3rfx3hLbdFO NOrGBca8WJ7Z4eX9rfrOQlaJrm5JwrGL7nFEmdCt8aqZ8VEFeogxMGjEtqtthQSKE4Cl c8pdwiIISnFCJ/m3uAf+c5p71LTdko2MZaptch1t83HDzbhP71VSufo2SyCuEipwg62i /ikyQewZZpeGWul6DIQ0XL/fPYfNcetWY/FtPv5KmPOVCN0whjg/KLhehLaY3GL/ESuN bGEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=LGTXvmj+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x25si3676635edd.350.2019.09.25.09.49.09; Wed, 25 Sep 2019 09:49:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=LGTXvmj+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407387AbfIWRR6 (ORCPT + 99 others); Mon, 23 Sep 2019 13:17:58 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:35235 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726200AbfIWRR5 (ORCPT ); Mon, 23 Sep 2019 13:17:57 -0400 Received: by mail-qk1-f196.google.com with SMTP id w2so16257142qkf.2 for ; Mon, 23 Sep 2019 10:17:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=NqsehSBKMKDO8NnwgZk11cPX0Pb+XtQ+3DVSQLpGbJo=; b=LGTXvmj+7/EJH4QYdmB05CZVGcHxpOXXQSP85/rWtT5nOtbNoaGGKivN4EXG1GMX4m T+TpllFX4nO3p4uD0NHIewInxNN0kzdFPpsK3i6qP2G8mwhGmQxurRSkH2gpL7qk/JAt ZxhSz50Vhqbt3cFmvvFp6iv+J9aBUgUrSuJdQAJ+4bPLv4PUTPqV56Gp6S+fxFAdBkWj sV10kJ2tLNVSv3/srOpqH4iUiE+i/O0yWH+dXLJksa1yJEdxcQ0oExSJMSJ1XQPvK8q/ ER9/VOB8a3Dwv8oPW/nmMJ7j3wNgm/uaLRRjimemqIXNlU0r+xfZfMgqQ0tJ1+Q2gUzo pTrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:date:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=NqsehSBKMKDO8NnwgZk11cPX0Pb+XtQ+3DVSQLpGbJo=; b=rQuhyBBf0r1jS2DmXotE9ucY31D8gVMUJK8WoR7Zq+q1/QVMcCnX7yT/N26QgZKXbq YtTW24xhhjnoWRC5cZFy3wqYExYdgaUqTj2F3qIQFnlqQXA2Gk9RczDLR9mKws6hbIaS FAV3fsLVMV61v/Jb62Jju8MRar2wUxnmsOpzF4jA7eiMpYrTZrNRTSJBe5LSFVtCQQ/4 19b6ePgWZGFtdiQ/oqZ1pvcvaMHUQeirLRBt08FytN4ApPdvCABWuDf+dCt7w4C81SoA pExBLNSj31KPF7I/BaQbMmWMXV2c9IiDl2O6hF/dGBRaHiTe4g66E3TQ7vYm9vb3s7Ny mNiw== X-Gm-Message-State: APjAAAWEh2S2cZD/3nX+8Sw4jj1TGV+2SxBdtjLPG2LCZkLmalqWwzg6 +fg74dY0R25eaFhteFIkkm8= X-Received: by 2002:a37:a68e:: with SMTP id p136mr919474qke.49.1569259076654; Mon, 23 Sep 2019 10:17:56 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id k54sm6917600qtf.28.2019.09.23.10.17.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Sep 2019 10:17:56 -0700 (PDT) From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Mon, 23 Sep 2019 13:17:54 -0400 To: Nick Desaulniers Cc: Arvind Sankar , LKML , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" Subject: [PATCH] x86/purgatory: Add $(DISABLE_STACKLEAK_PLUGIN) Message-ID: <20190923171753.GA2252517@rani.riverdale.lan> References: <20190922173241.GA44503@rani.riverdale.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit b059f801a937 ("x86/purgatory: Use CFLAGS_REMOVE rather than reset KBUILD_CFLAGS") kexec breaks is GCC_PLUGIN_STACKLEAK is enabled, as the purgatory contains undefined references to stackleak_track_stack. Attempting to load a kexec kernel results in: kexec: Undefined symbol: stackleak_track_stack kexec-bzImage64: Loading purgatory failed Fix this by disabling the stackleak plugin for purgatory. Fixes: b059f801a937 ("x86/purgatory: Use CFLAGS_REMOVE rather than reset KBUILD_CFLAGS") Signed-off-by: Arvind Sankar --- arch/x86/purgatory/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/purgatory/Makefile b/arch/x86/purgatory/Makefile index 527749066d31..fb4ee5444379 100644 --- a/arch/x86/purgatory/Makefile +++ b/arch/x86/purgatory/Makefile @@ -25,6 +25,7 @@ KCOV_INSTRUMENT := n PURGATORY_CFLAGS_REMOVE := -mcmodel=kernel PURGATORY_CFLAGS := -mcmodel=large -ffreestanding -fno-zero-initialized-in-bss +PURGATORY_CFLAGS += $(DISABLE_STACKLEAK_PLUGIN) # Default KBUILD_CFLAGS can have -pg option set when FTRACE is enabled. That # in turn leaves some undefined symbols like __fentry__ in purgatory and not -- 2.21.0