Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2089837ybp; Thu, 10 Oct 2019 02:01:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqzA1XFi4ifRssy3XNGbfZdaeWmb3gI/Rn578CVZ7c5QurhCWYYKf5ztl3IYhsSuBzX6nb6z X-Received: by 2002:a17:906:edb7:: with SMTP id sa23mr7075311ejb.263.1570698078179; Thu, 10 Oct 2019 02:01:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570698078; cv=none; d=google.com; s=arc-20160816; b=hwZrPvOIcB1Qlu13NICHVJyRGkqHfzR8ZoXnLuyFUOiC/uPCoiia5zZJHs0KXZ17rK 6BwrFXipBPQCD8YDMWa80PSbMLMPU/sYBmdJpxZ3IWxAR0op2SY8LY7av7oZaJPNEfvn qnVhHGsdyt7ljQZn814lhXzW2yc0UhzjKbDWs1ESu5mqg8Vh8WCxAs2rGQ1F6GmKGSLa pzds9Vjah9HeNLNaXq6fjy/1v4fcGMErWx1NVdOIW0RhoicLzMkD9pxFuWQrLIUEm3nN +k6rJqWSHRNG8fLq4mqpiy2gowMZ/dNqgnuDe7lrGqtaeKsJbd0xBSr4DnRjmQHXw/t9 PrLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=S0RZ63HChdREaJgfEZnTA0EGJ2v4cU1QG1InNv284HM=; b=L9D0miInUxHAgUeXyJWdGksR7Ga+fKoOqrcQ7Ib6IJnp2oPGy5D6ua8VgF56V45PA5 3TKBMI6MtCqpu6uMiVoyq9DxsNQVb1WeiQlK8OMFwr0QnJkpOHcqQ/yD2G3PcBRlLDVW ynYnz1CbvmeAV3IXCG+ARgESjSPOnxrn+ybj7NovHPKxL3ggZP9fmukiS7aKfbopbXu6 ZO4Yvnk6YV/l5MCpECIE0XR0Sb3TJ4RRiC4UQRG1jD8d35+gBr2MlKckbkSmL9A4ix4c 6azhpGD75mXC2OxDLUss2FVqRdwiJbPYOXfZaP3Au+BcaSTf6Kdkn3yFO5tlXAYtbVnD 2F0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HKafgU4j; 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 a41si3458362edc.180.2019.10.10.02.00.55; Thu, 10 Oct 2019 02:01:18 -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=pass header.i=@kernel.org header.s=default header.b=HKafgU4j; 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 S2389150AbfJJJAq (ORCPT + 99 others); Thu, 10 Oct 2019 05:00:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:47096 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387745AbfJJIma (ORCPT ); Thu, 10 Oct 2019 04:42:30 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 80C7A2054F; Thu, 10 Oct 2019 08:42:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570696950; bh=WIl6W8ebQcojUGSsK88TdAJ9kurCE2C5egXd6emtgqY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HKafgU4jWSkcVJs6EoFNkzj2+Fc8CYuqilGhz+ksiALot9lmg08I5ADQODJHr2C1D MgCSseWUEVHhA3wtzGvMWzjRZ9QswFfCKW3soDI92BwgLoc32ZJWreQmIdt5jJBuiU dtRfUCFmaR7nKJ+jCPZYtI17Pjh/7xaOgxcboGTg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arvind Sankar , Nick Desaulniers , Borislav Petkov , "H. Peter Anvin" , Linus Torvalds , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Sasha Levin Subject: [PATCH 5.3 111/148] x86/purgatory: Disable the stackleak GCC plugin for the purgatory Date: Thu, 10 Oct 2019 10:36:12 +0200 Message-Id: <20191010083617.862786246@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191010083609.660878383@linuxfoundation.org> References: <20191010083609.660878383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arvind Sankar [ Upstream commit ca14c996afe7228ff9b480cf225211cc17212688 ] Since commit: b059f801a937 ("x86/purgatory: Use CFLAGS_REMOVE rather than reset KBUILD_CFLAGS") kexec breaks if GCC_PLUGIN_STACKLEAK=y is enabled, as the purgatory contains undefined references to stackleak_track_stack. Attempting to load a kexec kernel results in this failure: kexec: Undefined symbol: stackleak_track_stack kexec-bzImage64: Loading purgatory failed Fix this by disabling the stackleak plugin for the purgatory. Signed-off-by: Arvind Sankar Reviewed-by: Nick Desaulniers Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: b059f801a937 ("x86/purgatory: Use CFLAGS_REMOVE rather than reset KBUILD_CFLAGS") Link: https://lkml.kernel.org/r/20190923171753.GA2252517@rani.riverdale.lan Signed-off-by: Ingo Molnar Signed-off-by: Sasha Levin --- arch/x86/purgatory/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/purgatory/Makefile b/arch/x86/purgatory/Makefile index 10fb42da0007e..b81b5172cf994 100644 --- a/arch/x86/purgatory/Makefile +++ b/arch/x86/purgatory/Makefile @@ -23,6 +23,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.20.1