Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp4164284ybn; Fri, 27 Sep 2019 17:52:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqx2gGCv9mawBOxMq+u4v4B7A0vo5xjyMF7CfBp6fpu+umWDAoP4LsqOV4f1ZC39zFtLGput X-Received: by 2002:a17:906:1248:: with SMTP id u8mr10141103eja.172.1569631929116; Fri, 27 Sep 2019 17:52:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569631929; cv=none; d=google.com; s=arc-20160816; b=ZjsWJ9XbnpTm7q5IfFZUorMtOl8lP5dM0LrrKIY4ZAyGFcKIUnCQIbGSeWeToPBAeI b+WAHilcBGPblU4BI+Q0+8fcYZk4ZNtJih10tM9UIglPq6VOsqGGC2VnJXWkHVWDylnV zh3+5LnizNBaPV4HA5+54vr1vSeIuAFOn7BT4UqgM25AtIstjJQyx86xwoaZx4GUfSAP 8bB0BhW2JzhyTyp2QfOQKCR/jyYj3gJXvTleaNGKlNqFNdwsYVFMcYAi+JAfCeE6lDPq G/ULpudm8EO/cNyegE3C+kXTE7vRcQ0/S1ygSgxE0hJFHWmAhLbdYs60saBzBAhAZpfV +T5Q== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:cc:references:to:subject:dkim-signature; bh=kTYZ3z+xc2tDSZhwDjvXx1dXpdH2rNEG/lGjHo+wCdQ=; b=gD4vdiF/RvwmkBwWxwCyiyh0YhDs4vc2CNT9xawuOmOltNCaeLUPvZ1YWje3mFwCxa sCyx6MfaYga9DdaV9oCx7JbaxK4NnrbkiV2VGnlnTffyrbTdzwExA68uP8RBD+Fu0pFS I6X6gRBJfTzVHqP5TUH8hJFsjRaJVNCTXVncGdDMdvQl/Sz3/FrShzI2Qk7nNARyGAN+ g5ilNPhNAOQYolATivsT/zL7fTt8/pmc/AGtwlDA1s7PIw1EkwMEX607ki6TEacvEHTS mn/KolcTq/s6XpUhqoWwszUJN7jyhcSWxGikazMmEjOmnEUFioJp2DfPzGDfw0cdeINJ aEdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Aq3xguF+; 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 r2si3605682ejj.90.2019.09.27.17.51.43; Fri, 27 Sep 2019 17:52:09 -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=@infradead.org header.s=bombadil.20170209 header.b=Aq3xguF+; 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 S1726673AbfI1Asb (ORCPT + 99 others); Fri, 27 Sep 2019 20:48:31 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:34838 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725815AbfI1Asb (ORCPT ); Fri, 27 Sep 2019 20:48:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:Cc:References:To: Subject:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=kTYZ3z+xc2tDSZhwDjvXx1dXpdH2rNEG/lGjHo+wCdQ=; b=Aq3xguF+enqAVnlPAZo1eGFGw 728UYXw/ow5TQwRHiXB4xDP9yS2NJNp+3ayZXiAm4lHItKLDnjiBs+B4v8b3PG4AVv79LFZdt7Jty Gvw8FhpKZweF7AkhmDOO3CknKjh+txwI9r6AMlRsoYPio5pCs8a5qCZNvr17gr+eFGLM/s4208Xfi fhvNDiEZ1zTvk0f70dAu7nE90/5Zjj4tsfYndHdnMUfHIy3J8TfBZDe0kJ589b1ECWnMKjQQDhsW8 GWUxlhuGe9U74AzxtsLdhm2wgrDvuahGw4yXGEFmixme1U6NC7iiJSywLTe9OmobnI35CChXHr9zB Ija4Kdxsw==; Received: from [2601:1c0:6280:3f0::9a1f] by bombadil.infradead.org with esmtpsa (Exim 4.92.2 #3 (Red Hat Linux)) id 1iE0uU-0003bu-R6; Sat, 28 Sep 2019 00:48:30 +0000 Subject: Re: x86/purgatory: undefined symbol __stack_chk_fail To: Andreas Smas , linux-kernel@vger.kernel.org References: Cc: X86 ML From: Randy Dunlap Message-ID: <6c46ae4d-6837-d1a3-dbe0-03a9efcb862f@infradead.org> Date: Fri, 27 Sep 2019 17:48:29 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thanks. -- ~Randy