Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2729639ybt; Tue, 16 Jun 2020 13:36:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3NvKaHvVGZ/uzuw7N5tZZWd3Czel8C8CiWDl2Ah9BvJS3eBkx8MSYgaAo6mW+AU69EzPL X-Received: by 2002:a17:906:fc06:: with SMTP id ov6mr4664997ejb.184.1592339768534; Tue, 16 Jun 2020 13:36:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592339768; cv=none; d=google.com; s=arc-20160816; b=yvChoDoOmldICjT+P5ZT3zoiCwV/FEFp69LszIkJCUuUqjrQl1NbkRE4MEAMuyEiq6 roeeNKaFXA+4ButjS8m/0gVNGPxws7iMQFktekhOVXFNyNhtyd38XWWZnoS1QStLqlsT mEDPAlBvyg+1hvpdpI/7O6qReidB7tnIqiNJAZrsLwLMyq8dQeKUZTbHDuONMiJu8Uhg 1mxAnl4dQe9ZL5hDGaa/stGm/LFOn5D68wC1YF5+m+uSVPlfQxF5p5u01vRNiPmueDt9 fkK9mfy8dyzJwMECo40O3l/xwAvbv21j8X7zPTp8Z40XMkz0XIwsdcrjDwmG1dtybpgw QtLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:date:from :dkim-signature; bh=AfiZlqjHsZkjAu5fvsg6fR8prjnrKc4GQvwb6nf23ac=; b=e3SmIdAdjmbl5LACXW/0mpBnDBSHEpX6MnZyGGuhAK7Yag/CdWbyPcFgQ2ReTnxiGf NcU4+94z8ebeRc5n+uAT2EuNKKi8dIhoyCjY1jBiy4WQQhIaVD6VWId6Y5b0UiIacTKx ewiSYIpWBhpA/S5Zyzi6+N/apeCpG8tJ2RWwTOazzG5krLFFvO/tzS8Omlgedr6NrBjo ZyQshCp0FhODF8DCLYIOBE9sdxAT8Z8U6e6zDEUiMxiJZWJY/ZSwjQUA+Bfaqql/FHka EuNHp9pG3XNTZDBh6NCHH2vNFaf4P4y3oLNrxoEhfc/2okBpjN3KS8nNJjxaCn4FKrDz ygKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ggxB+wKv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp6si13416856ejc.472.2020.06.16.13.35.44; Tue, 16 Jun 2020 13:36:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ggxB+wKv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731479AbgFPUd4 (ORCPT + 99 others); Tue, 16 Jun 2020 16:33:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726428AbgFPUd4 (ORCPT ); Tue, 16 Jun 2020 16:33:56 -0400 Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1256CC061573 for ; Tue, 16 Jun 2020 13:33:56 -0700 (PDT) Received: by mail-qt1-x843.google.com with SMTP id j32so16620693qte.10 for ; Tue, 16 Jun 2020 13:33:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=AfiZlqjHsZkjAu5fvsg6fR8prjnrKc4GQvwb6nf23ac=; b=ggxB+wKvfbpbc7+0S9cO2GzWftu4wdCC+ifypfCRSdq+hOcg5t9ByanyZAGVsbJMXG 3V4wpwT3ILuw4S8NPLW/1hl2xSzccumZJnb8W71hii99cWtgtQ7P0Qw/oXP9YzE2yF4u GV7y11CkqFRJxd1W697jS66bSL3Cxhvx/Pad1GGzHJxWoY/ard6xlfrswgjWagTgzpAC FTK2t1WkDQim4QLrJXAmCd2o/QL7B7b5oojZmd27NFGvZkBnxrYA6YQl4Kuko5Wf4rUq +kb3ITxcppTBQBZhNPxna4zrWJBIn0YNLRQnoPHYBv5uXGMRhnKDPk6IIx+R+tRmpDUq o0ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:date:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=AfiZlqjHsZkjAu5fvsg6fR8prjnrKc4GQvwb6nf23ac=; b=E/1Xq6dlfRxOd1SVUdnunsIQiTQfVgm8HgO/iq0Oo7J/UgRUmeZtRgISsE/pmsu5X8 vsFgV6y4hK3CSBE4ZkSUS1HnGpRU1X3cTYb92QBmI+PPi9aC5hmtrjpO4UeABYYeDWuR 1JlJP1OHfkjHL5kS95JHz1k3n5aSUYN7sViEE8DMeRQQWbeYMog7rHYVMcjy+Ibdc4rZ 2IJilnS746vSEg+e1Tq2qGoXtrQOFLJW1QSj8Uhn+4EkYPxyW+/Jiem0j+5lEBsR3LKq 4xOmIICDt734+G4zM9/ILSh7eJTaohSHW5b55AzAG0VwXQAjk43I7FbCmFv3jW7rAqQV VTgQ== X-Gm-Message-State: AOAM530nR0e5ZWhM96J1qqcd6hkvMWwTZsOIHoM2VZS0p+ZYyYnRB7VY q32FNJDm23sm/k+ii1xSe90= X-Received: by 2002:ac8:3066:: with SMTP id g35mr22663700qte.193.1592339634780; Tue, 16 Jun 2020 13:33:54 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id k188sm14318783qkb.23.2020.06.16.13.33.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2020 13:33:54 -0700 (PDT) From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Tue, 16 Jun 2020 16:33:52 -0400 To: Gabriel C Cc: Linus Torvalds , Linux Kernel Mailing List , Hans de Goede Subject: Re: Linux 5.8-rc1 Message-ID: <20200616203352.GA1815527@rani.riverdale.lan> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 16, 2020 at 10:11:46PM +0200, Gabriel C wrote: > * Am So., 14. Juni 2020 um 22:44 Uhr schrieb Linus Torvalds > : > > Hello, > > > So I didn't really expect this, but 5.8 looks to be one of our biggest > > releases of all time. > > > > I hit a compiler error caused by e4160b2e4b02377c67f8ecd05786811598f39acd. > > x86/purgatory: Fail the build if purgatory.ro has missing symbols > > Having CONFIG_STACKPROTECTOR* & CONFIG_KEXEC_FILE enabled always > results in a linking error like this: > > LD arch/x86/purgatory/purgatory.chk > ld: arch/x86/purgatory/purgatory.ro: in function `verify_sha256_digest': > purgatory.c:(.text+0x108): undefined reference to `__stack_chk_fail' > ld: arch/x86/purgatory/purgatory.ro: in function `sha256_transform': > sha256.c:(.text+0x1c74): undefined reference to `__stack_chk_fail' > ld: arch/x86/purgatory/purgatory.ro: in function `__sha256_final': > sha256.c:(.text+0x1e65): undefined reference to `__stack_chk_fail' > ld: arch/x86/purgatory/purgatory.ro: in function `_kstrtoull': > string.c:(.text+0x2107): undefined reference to `__stack_chk_fail' > > I didn't look closer at that but from the error, it seems to be, > some missing -fstack-protector* vs -fno-stack-protector* checks > somewhere. > > > Best Regards, > > Gabriel C Can you attach the output of gcc -dumpspecs and gcc -v? I suspect your compiler enables stack protector by default. My distro compiler does that too, but not if -ffreestanding is enabled (which it is for the purgatory). Does this patch help? diff --git a/arch/x86/purgatory/Makefile b/arch/x86/purgatory/Makefile index b04e6e72a592..088bd764e0b7 100644 --- a/arch/x86/purgatory/Makefile +++ b/arch/x86/purgatory/Makefile @@ -34,6 +34,7 @@ KCOV_INSTRUMENT := n PURGATORY_CFLAGS_REMOVE := -mcmodel=kernel PURGATORY_CFLAGS := -mcmodel=large -ffreestanding -fno-zero-initialized-in-bss PURGATORY_CFLAGS += $(DISABLE_STACKLEAK_PLUGIN) -DDISABLE_BRANCH_PROFILING +PURGATORY_CFLAGS += $(call cc-option,-fno-stack-protector) # 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