From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stanislav Kozina Subject: Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm Date: Thu, 1 Dec 2016 12:33:02 +0100 Message-ID: References: <20161129131922.GA31466@angband.pl> <20161129135118.24696-1-kilobyte@angband.pl> <30bb2db4-47bd-0c35-8328-ef032b551f06@suse.com> <20161129195721.GI2697@decadent.org.uk> <20161201051852.28dc335f@roar.ozlabs.ibm.com> <20161201041325.GX35881@redhat.com> <830d2864-ab52-27c8-8178-ec86f3267079@redhat.com> <20161201220907.60375b4f@roar.ozlabs.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20161201220907.60375b4f@roar.ozlabs.ibm.com> Sender: linux-kbuild-owner@vger.kernel.org To: Nicholas Piggin Cc: Don Zickus , Linus Torvalds , Ben Hutchings , Michal Marek , Adam Borowski , Greg Kroah-Hartman , Linux Kbuild mailing list , Debian kernel maintainers , "linux-arch@vger.kernel.org" , Arnd Bergmann , Ingo Molnar , Linux Kernel Mailing List List-Id: linux-arch.vger.kernel.org On 12/01/2016 12:09 PM, Nicholas Piggin wrote: > On Thu, 1 Dec 2016 11:48:09 +0100 > Stanislav Kozina wrote: > >> On 12/01/2016 05:13 AM, Don Zickus wrote: >> >> ... >> >>> I think GregKH pointed to one such tool, libabigail? We are working on >>> others too. >> I should mention one of the others here: >> https://github.com/skozina/kabi-dw >> >> It's quite comparable to libabigail in the way it works, the main >> differences are: >> - written in pure C >> - depends only on elf-utils and flex/yacc >> - it's much simpler (4k LOC) >> - stores the type information in the text files and compares those >> instead of directly comparing two sets of DWARF data > Now this seems much better for distro ABI checking. > > The next question is, do they need any kernel support for rare cases > where they do have to break the ABI of an export? Simple rename of the > function with a _v2 postfix might be enough. We could retain some per > symbol versioning in the kernel if needed, but how much would it > actually help? The biggest pain point AFAICT is to identify what types (functions, structs, enums, ...) should be considered a part of the stable ABI. And the problem with modversions is that it pulls in just everything which gets (accidentally?) #included in the source file. The actual ABI maintenance is a different problem, but there are many possible approaches, the _v2 suffix being one of them. Regards, -Stanislav From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:54994 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750831AbcLALdr (ORCPT ); Thu, 1 Dec 2016 06:33:47 -0500 Subject: Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm References: <20161129131922.GA31466@angband.pl> <20161129135118.24696-1-kilobyte@angband.pl> <30bb2db4-47bd-0c35-8328-ef032b551f06@suse.com> <20161129195721.GI2697@decadent.org.uk> <20161201051852.28dc335f@roar.ozlabs.ibm.com> <20161201041325.GX35881@redhat.com> <830d2864-ab52-27c8-8178-ec86f3267079@redhat.com> <20161201220907.60375b4f@roar.ozlabs.ibm.com> From: Stanislav Kozina Message-ID: Date: Thu, 1 Dec 2016 12:33:02 +0100 MIME-Version: 1.0 In-Reply-To: <20161201220907.60375b4f@roar.ozlabs.ibm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Nicholas Piggin Cc: Don Zickus , Linus Torvalds , Ben Hutchings , Michal Marek , Adam Borowski , Greg Kroah-Hartman , Linux Kbuild mailing list , Debian kernel maintainers , "linux-arch@vger.kernel.org" , Arnd Bergmann , Ingo Molnar , Linux Kernel Mailing List Message-ID: <20161201113302._PYAambyVjT4cA6w7Dij6j1jJu4GLfDurpJcsdUX2fQ@z> On 12/01/2016 12:09 PM, Nicholas Piggin wrote: > On Thu, 1 Dec 2016 11:48:09 +0100 > Stanislav Kozina wrote: > >> On 12/01/2016 05:13 AM, Don Zickus wrote: >> >> ... >> >>> I think GregKH pointed to one such tool, libabigail? We are working on >>> others too. >> I should mention one of the others here: >> https://github.com/skozina/kabi-dw >> >> It's quite comparable to libabigail in the way it works, the main >> differences are: >> - written in pure C >> - depends only on elf-utils and flex/yacc >> - it's much simpler (4k LOC) >> - stores the type information in the text files and compares those >> instead of directly comparing two sets of DWARF data > Now this seems much better for distro ABI checking. > > The next question is, do they need any kernel support for rare cases > where they do have to break the ABI of an export? Simple rename of the > function with a _v2 postfix might be enough. We could retain some per > symbol versioning in the kernel if needed, but how much would it > actually help? The biggest pain point AFAICT is to identify what types (functions, structs, enums, ...) should be considered a part of the stable ABI. And the problem with modversions is that it pulls in just everything which gets (accidentally?) #included in the source file. The actual ABI maintenance is a different problem, but there are many possible approaches, the _v2 suffix being one of them. Regards, -Stanislav