From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933503AbcLGXND (ORCPT ); Wed, 7 Dec 2016 18:13:03 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:59718 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932339AbcLGXNA (ORCPT ); Wed, 7 Dec 2016 18:13:00 -0500 From: Arnd Bergmann To: Linus Torvalds Cc: Adam Borowski , Jan Stancek , Linux Kernel Mailing List Subject: Re: unable to load modules with CONFIG_MODVERSIONS=y after commit 8ab2ae655b Date: Thu, 08 Dec 2016 00:12:51 +0100 Message-ID: <14460438.cj3XhAx045@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: References: <2124400518.2319293.1481030523351.JavaMail.zimbra@redhat.com> <20161206134454.GA13814@angband.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:dSe1mR76VuJOQWd/xxu9SWh5ZG2GYzRWur5MdE7N7xWdzoY5W32 xUfTYXC3dTAj32EqmEBrYyrLcOMHgQXXaxa3Il2E+3rYPlwHyockCZ8N5tggMSx8Px5bwr8 ARbYOje5zNOw9gk1ZnH1iayN8F5kO96MnKB5wlH0vRn+ihm+xSrOnd3LYxzLopYUVM9AH0F mJ5b3K3LJPzlBY7Qk9SJw== X-UI-Out-Filterresults: notjunk:1;V01:K0:FhYuGfKYGjY=:7LnfambA8g0VAcYxWkBKyM W8UbxUTSifb5joX5jxJoQ32j+nKH0LMAWQUCBNcdVtcTgzeZ52s1GTjhQHr2exrdeyo5y0fin W+JEaRQYj27g74lYdRFDarPiQQbJZ0K5O8Zs3GYdUG0L7Q1J/zY49hGIG2PnMxcFGnMyHfVls IqcL/IHXgmuZGXjqpLzEXtRiDOIxnkA+l19Rc4tZtvgzkvp9unng+97Lf8Zdz/LRGubyc0smH npHBKEFig2izDsCEyvO7Jub5cRtQ3PJoTmcqwnqE0S30zy6QxlJcZCjzm9GWf5gYr10hM9xxB 9LGJywAbNXFnYSHajCUQ3rV+bt8BHxU4SBb9KJwXzInoQrCAe1Y2nXo3+8igZTQV8SYd/9qcM tGm6onK3BLvWjQ6o2L0PxxgAzaYXEeFFr6WAiA9rKreE8tVq0KzM81pJGnb24idCdYQAOAldv Oarv5M5KwofApibbT1w8gOUjH2AgEKVYBhcc8Fr84mL9sOKoltBL0mUWX4fvRI0xnPZgthnDS D/205PliHqaEfkHgEXO2bBWd+n0k6GyV4dc7V+tJ2YMowGYq9i2MF/JfzUSplbGLYLT8cKZ4L 97Mr3RAIp9ACHjw0cwLSlKH1jiljl+Q6jmdrE6ZtobK0dCmAk2/6Czt2zvK6vbqwljXXxEvBZ CTBGmP8BvsCdQ6hGHNJoyP0VYeiEITpKVmw+tGMKHsFPHtC5BMZtN0gyQsyMd7CXcAMRHjSKJ H8/pdiwuTwPXylyi Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday, December 6, 2016 8:39:53 AM CET Linus Torvalds wrote: > On Tue, Dec 6, 2016 at 5:44 AM, Adam Borowski wrote: > > On Tue, Dec 06, 2016 at 08:31:01AM -0500, Jan Stancek wrote: > >> Starting with 4.9-rc8 / commit 8ab2ae655b ("default exported asm symbols to zero") > >> I'm running into issue with kernel built with CONFIG_MODVERSIONS=y > >> and (older) binutils (binutils-2.25.1-20.base.el7.ppc64le). > >> > >> Modules fail to load, for example: > >> > >> [ 3.163646] Found checksum 0 vs module 4829A47E > >> [ 3.163787] dm_mod: disagrees about version of symbol memcpy > >> [ 3.163862] dm_mod: Unknown symbol memcpy (err -22) > >> > >> Bisect led me to 8ab2ae655b, reverting it allows boot to > >> progress as before. > > > > powerpc happens to be the only arch that actually followed the plan and > > implemented asm-prototypes.h (not including Debian which applied my patch to > > do so on x86, that patch is not in mainline). > > > > Could you try reverting commits that add exports to that file? > > Let's not do this. Let's just assume that "checksum=0" matches anything. > > Because it's too late to play games with this any more, and it's too > damn fragile. > > In fact, I think I'll just revert Arnd's patch, and just rely on > commit faaae2a58143 ("Re-enable CONFIG_MODVERSIONS in a slightly > weaker form") for 4.9. > > Because Arnd's patch did explain what was going on, but it also broke > alpha, due to ".set" apparently meaning something else than "set > value" there. So I like Arnd's patch even if it gets reverted, just > because of the "explain things" part. > > Or would people prefer just an explicit "zero in the crc tables means > that it never got filled in correctly, so let's match it"? > > Arnd, comments? I'm not overly attached to my patch, and I intentionally marked it RFC as I had done very little testing on it and I'm not surprised it causes problems. Reverting it for v4.9 seems best if that gets us a working kernel with modversions again on all architectures. In the long run, I'd still hope to to resolve those issues: - without my patch, Nick's patch d8c1eb86e952 ("kbuild: modpost warn if export version crc is missing") in linux-next produces warnings for most architectures with CONFIG_MODVERSIONS=y and binutils-2.27+, and that means we don't get a clean allmodconfig build any more. - I have been sick the past few days and haven't had a chance to investigate exactly what happens that prevents the modules from getting loaded. I assume the problem that Jan sees is the same that Ben Hutchings already reported on Saturday. This might be just another trivial fix, or something more fundamental, but finding this out would be helpful in case we want to bring it back. - If we decide to keep the warning about broken toolchains in the long run and not also make sure that all symbols have a nonzero crc, then we should ask Alan Modra to revert the linker change. Arnd