From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757798AbcK2QDY (ORCPT ); Tue, 29 Nov 2016 11:03:24 -0500 Received: from mx2.suse.de ([195.135.220.15]:48569 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757697AbcK2QDK (ORCPT ); Tue, 29 Nov 2016 11:03:10 -0500 Subject: Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm To: Linus Torvalds , Adam Borowski References: <20161129131922.GA31466@angband.pl> <20161129135118.24696-1-kilobyte@angband.pl> Cc: Greg Kroah-Hartman , Linux Kbuild mailing list , Ben Hutchings , Debian kernel maintainers , "linux-arch@vger.kernel.org" , Arnd Bergmann , Ingo Molnar , Nicholas Piggin , Linux Kernel Mailing List From: Michal Marek X-Enigmail-Draft-Status: N1110 Message-ID: <30bb2db4-47bd-0c35-8328-ef032b551f06@suse.com> Date: Tue, 29 Nov 2016 17:03:01 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dne 29.11.2016 v 16:27 Linus Torvalds napsal(a): > On Nov 29, 2016 5:51 AM, "Adam Borowski" > wrote: >> > >> > >> > (a) tested >> >> By many people. > > No. > > I've tested the build *without* this, and it works fine. > >> > (b) explains it >> >> The actual logic is in 4efca4ed0. It wants C prototypes defined in >> asm/asm-prototypes.h that lists symbols defined in assembly -- genksyms >> knows only how to read C code. > > See above. I'm not taking more random patches that "fix" this when it's > not broken for me. Not without very explicit explanations of why that > patch is still needed for others. The original and easily observable bug is that were are not generating symbol checksums for the asm-exported symbols, so they default to 0. This can be seen e.g. in the Module.symvers file. This seemed like a minor issue, because with the functions written in asm, the type checking is rather weak (this has been the case even before Al's patches). However, there is another bug that with _some_ toolchains / architectures, the checksums do not default to 0, but they are simply missing in the ___kcrctab* sections and the module loader complains. We can of course research into the details of the second bug, but we already know that we are not generating the checksums while we should be. Michal