Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp902336ybn; Wed, 25 Sep 2019 09:20:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqxhAIB/nrpUcLVzI7VBdV6Crs0WOAo2FcmN9viEkb05gSC2DFv/tgKr1JdgyM7U/RMLMcqB X-Received: by 2002:a17:906:9381:: with SMTP id l1mr35369ejx.93.1569428459661; Wed, 25 Sep 2019 09:20:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569428459; cv=none; d=google.com; s=arc-20160816; b=hhPfpyLkSp5MAwqxRq9HuB1mbU3fuT+0kutnUEKxiVeT4zJUEOUYt4WWwkOnWOezq3 0rzdp0YiA3OOIc7/Ps5/VjuW8q6KwCKUmj9aRzan5tXyopashhtPC8WHxiWA7MkSzvzv PLVDZOOXqWZg8WQ9gzodXRLy6B8DzypDV/gB+nRwSxGE+XS4qtYy1NzuaAmbHWfUXeX6 MRWhAiY45oMrMJnpGML9QKxjY24G16MN4Mkfk9RFChGw9GhKgMeJmnWvvq5aUn3bk0gO PRH6z+KcwiVe/LdsbeDtk+XPlJIKPwlm96Nrj1YD3q3GHWlSOEf4DmXsfOvLUtzLQkll zYag== 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=Kz4IZ3oYWoBFhxhQ1CwFfvKKIiAwRsecxuF5VRYqIaE=; b=0kXSonhdI0nkxZtjZjIpx6YgmWN+ZVbjSRCMhwMklhEG7uynHZvElJsaQZQeR2XA2P eHAVzSx4NYNYnSBrYN2aRzdGJl/xNCkKYhRfpwpk+SBQAS44mCDzk3n1RILIgvfNQj5V ynGBIorXWmLcS9Fwn/9PP4ED/M7h+pDKNNyP2uyKYJ/qkfANh1hWT+DA+oJy+d2Ox8eK 1SbEib3jYgzL1nI9aydovB3ZnbKQshmoISrIJM7Hl5d5EM+/Lth1GpmMM1t++uhAlPgY ZPkEwec632SMCMXLH6EyR7x5yHoxOii+ew+KPjO9Df5M8mNUOaiPe4ZE8b7e2JvFv62d 3qjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Hc2QTCLz; 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 g18si3550937edq.209.2019.09.25.09.20.35; Wed, 25 Sep 2019 09:20:59 -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=Hc2QTCLz; 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 S2388967AbfIWQP3 (ORCPT + 99 others); Mon, 23 Sep 2019 12:15:29 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:46629 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387827AbfIWQP3 (ORCPT ); Mon, 23 Sep 2019 12:15:29 -0400 Received: by mail-pg1-f193.google.com with SMTP id a3so8234308pgm.13 for ; Mon, 23 Sep 2019 09:15:28 -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=Kz4IZ3oYWoBFhxhQ1CwFfvKKIiAwRsecxuF5VRYqIaE=; b=Hc2QTCLztR11uKBEn4r3OeZlsjRsvjzNu21ne0wmU0VOOTo152UCGybydjOiGNjZlz j7IfsgojsLc4eMoSQwFFn4soOZ24XNfqmhPHMnqnNiqsN2FozknKM4/tVfzD5vDBxJoU q0YQJHX8dqf0Prjk9UUZ6vEFWg6HiqLytwnTF8LmSJEQjEvcs2c7uTBxvz86qZxr+2i0 qCtke6eTkqrVRE8YERskj75XSNDncixv5eJRKSuP8meltK3d1x/N6VqEJDoJLbRjorZT GjQn6+tcxEsiJlyrn8JKgzXHSperhPLnSB82tbpyWV48/QeVyWHku2BIaIh5SMv3zn2T yG+Q== 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=Kz4IZ3oYWoBFhxhQ1CwFfvKKIiAwRsecxuF5VRYqIaE=; b=dqQLlKtkYJk4mJc21BzeNbwbxYEcn7nOMqU/N8101pBAxIKddXUVOr30MBgiswjTwy VMW5lShX+m20/jQDHhqlfBQQhwlVAzsBPKRSLmmm8oVep6VHkRyitCtwGRPf1bww+RWC 0JD2Vpzb9tkrEIbJ/3Y6Bz8EMGVNWd1Or+hqeD2ROG9bwZWdVapGs16OXJcRPlcv4ro2 m5VVEu7LwJaUPVYvZv3G5UmU1eseEa5nL2Wgyrv/istqQmzjU3/BgKgE0v3bYel/miaR rhhsL7x2VIUNfltwk3lkLgCcH0wb+Phn+SKySOOVPV5Fm0iGV2pgS3XX1ql4R8DRi0I/ q4JA== X-Gm-Message-State: APjAAAVe3N23iD33hkD24paNtR+p3rU/A3Y89UJk0+ehaqCjcUWcjdRF +8eEUVKBj3ufV1q1iQR3rNtHdJ30uzxYwjX5iDM3+ot2 X-Received: by 2002:a62:258:: with SMTP id 85mr346108pfc.165.1569255327727; Mon, 23 Sep 2019 09:15:27 -0700 (PDT) MIME-Version: 1.0 References: <20190922173241.GA44503@rani.riverdale.lan> In-Reply-To: <20190922173241.GA44503@rani.riverdale.lan> From: Nick Desaulniers Date: Mon, 23 Sep 2019 09:15:16 -0700 Message-ID: Subject: Re: kexec broken with STACKLEAK enabled To: Arvind Sankar Cc: LKML , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" 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 Sun, Sep 22, 2019 at 10:32 AM Arvind Sankar wrote: > > Hi, since commit b059f801a937 (x86/purgatory: Use CFLAGS_REMOVE rather > than reset KBUILD_CFLAGS) kexec is broken if GCC_PLUGIN_STACKLEAK is > enabled, as the purgatory contains undefined references to > stackleak_track_stack. > > Attempting to load a kexec kernel results in an error: > > kexec: Undefined symbol: stackleak_track_stack > kexec-bzImage64: Loading purgatory failed > > Adding $(DISABLE_STACKLEAK_PLUGIN) to PURGATORY_CFLAGS in > arch/x86/purgatory/Makefile fixes this. Hi Arvind, Thanks for the report. That sounds like a straightforward fix. Would you like to send a patch for that? I'd be happy to help review it. > > Not sure if that's the best fix or if other architectures also require a > similar one. The commit you reference should be x86 only. -- Thanks, ~Nick Desaulniers