Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp941137ybn; Wed, 25 Sep 2019 09:53:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqzhstw7S+YeLQX/KrHWkjW0F4xPzhMyMnljfzC0Y7OV8QbEAyu5d4tDMPdNBYfIvICbgVVq X-Received: by 2002:a17:906:c282:: with SMTP id r2mr152840ejz.207.1569430418218; Wed, 25 Sep 2019 09:53:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569430418; cv=none; d=google.com; s=arc-20160816; b=ObnsTux7pg1bFcHl866jT3tP9p45OM2kjdhzCcr7IXlXEXiydWZfsCQM17Lg7AkCwN 2IrBYFqeAhF8NPlnwESoutPUmJJe9TIK8zygqznVBJ3Pj6WYJg/LJasEOLwIvAyfCu08 8BnXMZy11IYQ1mQoyJr6wTcaM+oNMpUU4GYeArAAw/FvZWvifzOB8Fn3AZDAV7QcRnOb VPx04rXwiUZ3KKdM7PrTlmJZebOZx8uxYDrZ66jivNcXBSLCP3Jttd6omRbRDfAk8j2G 0XuHIJwddSeVnqBxCzt3MEXN39uYqjPZ+e6y0aQ/KWTf8eqhWkqXMQERAUE9Pr6YD/W3 2eqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=L3+53+4tDqcisH8nEn571hrd9nXBXU/wwqjTnECUQJw=; b=iWD0MSXHGQ44jPsgHyliqZhp/+PIXzB3ILy0FZSJVSZdq4L8wYMC/fpHAPjd3JFMTn PNvgnC6C+Z9wiqn6i7EIRSy/PISRkzrfjg2+v3/W1BhCnwQaVxAHpHmeGmF0lDFGyzFp JtZDNDDtCADIIvY95WFpYyL6d43BF2XUF1YnCk1gXU5yBSSisui6bbxX91i7KntRS9vS eSYncxZ7L9KZMuFcc23qG76zrlVHOOw3Exqz3JP+Zo6uRIpzo8LAnR1SfGpW82Qd0QMz 4NDbB0O8k+cgWO0zg3yaaovAwTVULG0yMf5x1wUjnwrzEuXjR9ktXYKytqZpzZo7H078 cjTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=i8rP3w8H; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i9si50998ejy.106.2019.09.25.09.53.13; Wed, 25 Sep 2019 09:53:38 -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=@google.com header.s=20161025 header.b=i8rP3w8H; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405969AbfIWRZe (ORCPT + 99 others); Mon, 23 Sep 2019 13:25:34 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:39231 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389167AbfIWRZe (ORCPT ); Mon, 23 Sep 2019 13:25:34 -0400 Received: by mail-pf1-f193.google.com with SMTP id v4so4905525pff.6 for ; Mon, 23 Sep 2019 10:25:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=L3+53+4tDqcisH8nEn571hrd9nXBXU/wwqjTnECUQJw=; b=i8rP3w8H7XdRZzQC+vEtNbIOw2PeTLnH4pc4n+PfWkBuD6VjnLKHotKRieESI8WjSm JjZwAvWJhfKceU+qeK6fooGbCYweulh8jCh64Yz5EGZ1jzK8AozeErEi4H3XF4eEXBPh uCGqhTWoQMKGi9U0WOrIXVYcs5bNWMxlrTVs/He24GaBoNyTc9mSMmH/4A175a3IaX27 Ib0jnP4AFA6g/nkI2nu+ZO9C5qjYMZOKSD3G0da4lcjdVTa17aGrH1lzHRqH02mAkVI1 4ghF493+SAr863MhjVdpGXL2IhkO1ycALDeTCLWCb6jUt1cW3S1jINQnz14FGfI3EvZ7 0g+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=L3+53+4tDqcisH8nEn571hrd9nXBXU/wwqjTnECUQJw=; b=Ii/1yiFttzD1HUM8Ry+C2+56qQawOb0dvsmvNaJG99P9m8DzNI2rBYoa07l0f6YqNs HpbHnZPqkHIRWezOwWp6+jErg6hxQ7RIrJa2xRsLrQ2Gr9jzPxzP64TqcRNNGETG21fu ilXwVLxgVFDcpN8xuhg16r9y/kFnPwAIO4JoNgnP8cX41XSVLtPl5EMlfJs9EIFZq4K7 ObcTRK9bzFEEihToxlfxvM2ABcJaMWe0FCwijK/dzXLkIv0v4KM5ZYhwZ+dvnfo+h3LL FMYjVByN6LIZ4CxofTc7idPOxPPu+ct9HGfwkmkIbBvqMLljfWgD2PJUbSkYd6cDcvEq WXtw== X-Gm-Message-State: APjAAAUnDFnyJdSyRbnkJwICbfBJa2ogQlB5O4mV6Fxzl05tHPAC9YfU FLGb/XR/klmWoDK64CPpD3ymGibhdjzS05ZNWWy9sw== X-Received: by 2002:a17:90a:154f:: with SMTP id y15mr597914pja.73.1569259533361; Mon, 23 Sep 2019 10:25:33 -0700 (PDT) MIME-Version: 1.0 References: <20190922173241.GA44503@rani.riverdale.lan> <20190923171753.GA2252517@rani.riverdale.lan> In-Reply-To: <20190923171753.GA2252517@rani.riverdale.lan> From: Nick Desaulniers Date: Mon, 23 Sep 2019 10:25:22 -0700 Message-ID: Subject: Re: [PATCH] x86/purgatory: Add $(DISABLE_STACKLEAK_PLUGIN) To: Arvind Sankar Cc: LKML , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Ard Biesheuvel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 23, 2019 at 10:17 AM Arvind Sankar wrote: > > 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 Reviewed-by: Nick Desaulniers (Sorry for the fallout from b059f801a937, but this is giving us a pretty good idea about what "runtime" requirements certain configs have. It would be cool to eventually have some kind of kexec test case that folks could run in QEMU). > --- > 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 > -- Thanks, ~Nick Desaulniers