Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755630AbcLAQVI (ORCPT ); Thu, 1 Dec 2016 11:21:08 -0500 Received: from mx2.suse.de ([195.135.220.15]:50772 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753815AbcLAQVG (ORCPT ); Thu, 1 Dec 2016 11:21:06 -0500 Subject: Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm To: Arnd Bergmann References: <20161129131922.GA31466@angband.pl> <2899250.iZaPagXLk8@wuerfel> Cc: Linus Torvalds , Adam Borowski , Greg Kroah-Hartman , Linux Kbuild mailing list , Ben Hutchings , Debian kernel maintainers , "linux-arch@vger.kernel.org" , Ingo Molnar , Nicholas Piggin , Linux Kernel Mailing List From: Michal Marek Message-ID: <91d0141e-07af-b8bb-c360-49d64598aa58@suse.com> Date: Thu, 1 Dec 2016 17:21:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <2899250.iZaPagXLk8@wuerfel> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2171 Lines: 39 On 2016-12-01 14:58, Arnd Bergmann wrote: > On Tuesday, November 29, 2016 9:14:46 AM CET Linus Torvalds wrote: >> On Tue, Nov 29, 2016 at 9:10 AM, Linus Torvalds >> wrote: >>> >>> So quite frankly, I don't want to make our kernel sources worse due to >>> broken shit tools getting something wrong that we shouldn't even care >>> about. >> >> And yes, I'm on binutils 2.26 (with no issues), so it could be that >> it's 2.27 that triggers this. >> >> We could make the pr_warn_once() mention "broken binutils?" so that >> people know why the warning happens. > > I've tried to get to the bottom of this, but couldn't find anything > related to the toolchain version. I've tried binutils 2.23, 2.24, 2.26 > and 2.27, and also gcc-7.0, gcc-5.4.1 and gcc-4.9.3, but with today's > linux-next, I always get > > WARNING: EXPORT symbol "mcount" [arch/x86/entry/built-in.ko] version generation failed, symbol will not be versioned. > WARNING: EXPORT symbol "mcount" [arch/x86/built-in.ko] version generation failed, symbol will not be versioned. > WARNING: EXPORT symbol "cmpxchg8b_emu" [vmlinux] version generation failed, symbol will not be versioned. > WARNING: EXPORT symbol "empty_zero_page" [vmlinux] version generation failed, symbol will not be versioned. > WARNING: EXPORT symbol "mcount" [vmlinux] version generation failed, symbol will not be versioned. > WARNING: EXPORT symbol "cmpxchg8b_emu" [vmlinux] version generation failed, symbol will not be versioned. > WARNING: EXPORT symbol "empty_zero_page" [vmlinux] version generation failed, symbol will not be versioned. > WARNING: EXPORT symbol "mcount" [vmlinux] version generation failed, symbol will not be versioned. > > Out of 12 randconfig builds that had CONFIG_MODVERSIONS enabled, all 12 > had this problem, though not always with all the symbols. That we are not generating modversions for the asm exports is a known problem, independent of the toolchain. The problem with some toolchains (presumably, because that's the next thing to blame if the source and the .config is identical) is that the CRCs do not appear as 0 in the ___kcrctab/___kcrctab_gpl section. Michal