Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp4686823ybn; Sat, 28 Sep 2019 05:44:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqwHQUNeWtZTyaijlE5VoWota7DgMi1T5ljKRZfWAAJdSQwTimRLz/og0nzVbGf4XomegHpA X-Received: by 2002:a05:6402:3066:: with SMTP id bs6mr9726497edb.127.1569674647137; Sat, 28 Sep 2019 05:44:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569674647; cv=none; d=google.com; s=arc-20160816; b=m3tacj+aeU5jAeWa/4i9/+EzjJmyd+ssSPI9NcJqymr0SKmqBrrWC6PHmgDPWtWbcb TqC7BKF9R+llsYR8jeJh6y8cfI50eHXcJbzHSAE9TNibu2jXOGLG3ZHXAyRW5DgSyP3f jrqkUhwLOr+ZmzFilEEqXNhId/6ad9fU9Cv8ZFJMaUbuUvTDtTvoegdaP3XXSpfxAKF6 YO6YZSC04fOL7LGMh2QTgGfV5nQEJjnaKmDPOBEWPS69jtDL8dOQPvaaHv4f9K6G7D/p M290SFNjKTNFafLB+r8upgdaYYVhKxsUlVq3oB2cs03TG8FmiWHlXCYXcx0GeJ8X9Ufh Y0Eg== 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:from:date:dkim-signature; bh=8hTXgUu85gufNsCTT7x1AC0Il1AhP4KkOpsI4+mqbUQ=; b=li/N+JAn68cH10Wl/vXpxxHwUKDrmbSXTPjZEVBywemvnK8FXt+FwZi9eSb62RPZIc +GZJja1QB0Fsdi9oLxIQi+oZxfK27bLPxQvQbiVW3mrkdbbyYlEQ7OGERwHa1OKc2VTC TetSBZckg49dhcM5gMgDbiPTtow3I40rIGbz9vOfINZoMt/LgECEwmpdpyKejMN69aoh mmnOGJiDiwoQ+dcmlyydETbYTueaL53XhKzF30r7JOHc6sczDe2yWkuWD5/QvFV59Ufr vVv/PicFTxPXUKeYBsqyqZEVZtGxu7OckeKztsxR5Yco0iO92VZoEAMTvYA6srih5YFU OAEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=fb8OA3gC; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id oz25si4037810ejb.175.2019.09.28.05.43.42; Sat, 28 Sep 2019 05:44:07 -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=fb8OA3gC; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726940AbfI1Mle (ORCPT + 99 others); Sat, 28 Sep 2019 08:41:34 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:52211 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725857AbfI1Mld (ORCPT ); Sat, 28 Sep 2019 08:41:33 -0400 Received: by mail-wm1-f66.google.com with SMTP id 7so8605300wme.1 for ; Sat, 28 Sep 2019 05:41:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=8hTXgUu85gufNsCTT7x1AC0Il1AhP4KkOpsI4+mqbUQ=; b=fb8OA3gCcDSUzKmp9DapL1fMi0LXtzEqgDCMUG+IRHD+2arbDIh0vGevAwLaG00DP6 2u0phnXmEcy9J5VcJ0RwMROMkQOCujLk04LEsEX/4yF5sGuIHhUVkVCxsUPQBA32+2DH qPd+rzEoJ0TeRVD//G8N25CRbnhhbBvATtiB5DoVW4pSl3PtCSSL3JZwsKCJTczc2OmM Xw1RApMKUhfamxY1++vzRfh+xtH9BtlnARsWbSnUjnynv1lhUcE01P6+CZtd8QtzRmi2 TMj4KaHQoNNmGld3gynsEys8IzFVd7bfTCTcPVaJBgMQ4WJ4X4TYI8emf5P+KiEei2X5 fQ5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=8hTXgUu85gufNsCTT7x1AC0Il1AhP4KkOpsI4+mqbUQ=; b=pw+c+VdtceYmO6blupuOQ5o4148d0+pBW6i1LqZevPubN1Z4VhuDn9YTr6XN5q5UgW qZJ6kNFjwDtPNAhv8X9K11WOoZeLQ2Qovcw5/FYPnTORdsVDxF2IcLDLr8WLS2kgSK5/ OJ1ed3mJ+IpOagzmIcdcflRJRox6XD2r0RTwcWAZwd5ybgW4jUVxebfs+AaZ3ZnRU1BA y6EPsCdWNLgT75BjXC0+1tdRyvaIvCfaUglKgKzR71YeWKTSsedaL6gcanXecWNJE5ZH iZv5hTdu9R3INxr8oqppYROZh/GyzUdOsqFxcRc19F9mpLrOLhJMv/tjm0bevUV8kF0h yyUQ== X-Gm-Message-State: APjAAAUtu/voz7SED7fZnmWnpU8N/jVb1zUKa73Qd5pF5b5u1/Gxbenl BgHORt8Z4AXyXAvipn8iBSoqirDm X-Received: by 2002:a1c:9dc1:: with SMTP id g184mr10376431wme.77.1569674492093; Sat, 28 Sep 2019 05:41:32 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id p85sm17740577wme.23.2019.09.28.05.41.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Sep 2019 05:41:31 -0700 (PDT) Date: Sat, 28 Sep 2019 14:41:29 +0200 From: Ingo Molnar To: Randy Dunlap Cc: Andreas Smas , linux-kernel@vger.kernel.org, X86 ML Subject: Re: x86/purgatory: undefined symbol __stack_chk_fail Message-ID: <20190928124129.GA97534@gmail.com> References: <6c46ae4d-6837-d1a3-dbe0-03a9efcb862f@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6c46ae4d-6837-d1a3-dbe0-03a9efcb862f@infradead.org> 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 * Randy Dunlap wrote: > On 9/3/19 8:50 AM, Andreas Smas wrote: > > Hi, > > > > For me, kernels built including this commit > > b059f801a937 (x86/purgatory: Use CFLAGS_REMOVE rather than reset KBUILD_CFLAGS) > > > > results in kexec() failing to load the kernel: > > > > kexec: Undefined symbol: __stack_chk_fail > > kexec-bzImage64: Loading purgatory failed > > > > Can be seen: > > > > $ readelf -a arch/x86/purgatory/purgatory.ro | grep UND > > 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND > > 51: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __stack_chk_fail > > > > Using: gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1) > > > > Adding -ffreestanding or -fno-stack-protector to ccflags-y in > > arch/x86/purgatory/Makefile > > fixes the problem. Not sure which would be preferred. > > > > Hi, > Do you have a kernel .config file that causes this? > I can't seem to reproduce it. Does it go away with this fix in x86/urgent: ca14c996afe7: ("x86/purgatory: Disable the stackleak GCC plugin for the purgatory") git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/urgent ? Thanks, Ingo