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: Mon, 12 Dec 2016 10:48:47 +0100 Message-ID: <6c3ba78e-a858-2529-5428-e7750f2d2d97@redhat.com> References: <20161201051852.28dc335f@roar.ozlabs.ibm.com> <20161201041325.GX35881@redhat.com> <20161201153215.43b6cec7@roar.ozlabs.ibm.com> <20161201152039.GB35881@redhat.com> <20161209135041.5ff12770@roar.ozlabs.ibm.com> <0937c184-1946-c494-56b6-c38fd0b632c2@redhat.com> <20161209181459.1f0a4fed@roar.ozlabs.ibm.com> <249321c0-bcb1-f9d8-50f4-c083b656d02e@redhat.com> <20161210015653.5b0dc872@roar.ozlabs.ibm.com> <20161209160337.GA3061@kroah.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20161209160337.GA3061@kroah.com> Sender: linux-kernel-owner@vger.kernel.org To: Greg Kroah-Hartman , Nicholas Piggin Cc: Don Zickus , Linus Torvalds , Ben Hutchings , Michal Marek , Adam Borowski , 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 >>>> A runtime check is still done, with per-module vermagic which distros >>>> can change when they bump the ABI version. Is it really necessary to >>>> have more than that (i.e., per-symbol versioning)? >>> From my point of view, it is. We need to allow changing ABI for some >>> modules while maintaining it for others. >>> In fact I think that there should be version not only for every exported >>> symbol (in the EXPORT_SYMBOL() sense), but also for every public type >>> (in the sense of eg. structure defined in the public header file). >> Well the distro can just append _v2, _v3 to the name of the function >> or type if it has to break compat for some reason. Would that be enough? > There are other ways that distros can work around when upstream "breaks" > the ABI, sometimes they can rename functions, and others they can > "preload" structures with padding in anticipation for when/if fields get > added to them. But that's all up to the distros, no need for us to > worry about that at all :) Currently, the ABI version (checksum) is stored outside of the actual code in the __ksymtab section. That means that the distributions can still apply upstream patches cleanly and only update the version checksum if these break ABI. With the _v2, _v3 suffixes (or similar solutions) we'd be effectively storing the ABI versions directly in the code and that would cause conflicts when pulling further patches from upstream. My view is that it would be than easier to maintain out-of-tree modversions (or similar tool) rather than to solve all these conflicts. Warm Regards, -Stanislav From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:34878 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932313AbcLLJsy (ORCPT ); Mon, 12 Dec 2016 04:48:54 -0500 Subject: Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm References: <20161201051852.28dc335f@roar.ozlabs.ibm.com> <20161201041325.GX35881@redhat.com> <20161201153215.43b6cec7@roar.ozlabs.ibm.com> <20161201152039.GB35881@redhat.com> <20161209135041.5ff12770@roar.ozlabs.ibm.com> <0937c184-1946-c494-56b6-c38fd0b632c2@redhat.com> <20161209181459.1f0a4fed@roar.ozlabs.ibm.com> <249321c0-bcb1-f9d8-50f4-c083b656d02e@redhat.com> <20161210015653.5b0dc872@roar.ozlabs.ibm.com> <20161209160337.GA3061@kroah.com> From: Stanislav Kozina Message-ID: <6c3ba78e-a858-2529-5428-e7750f2d2d97@redhat.com> Date: Mon, 12 Dec 2016 10:48:47 +0100 MIME-Version: 1.0 In-Reply-To: <20161209160337.GA3061@kroah.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Greg Kroah-Hartman , Nicholas Piggin Cc: Don Zickus , Linus Torvalds , Ben Hutchings , Michal Marek , Adam Borowski , Linux Kbuild mailing list , Debian kernel maintainers , "linux-arch@vger.kernel.org" , Arnd Bergmann , Ingo Molnar , Linux Kernel Mailing List Message-ID: <20161212094847.St73g1PxVEA4HJlJn2oYONITILebcBBdRfrTxDLCXnM@z> >>>> A runtime check is still done, with per-module vermagic which distros >>>> can change when they bump the ABI version. Is it really necessary to >>>> have more than that (i.e., per-symbol versioning)? >>> From my point of view, it is. We need to allow changing ABI for some >>> modules while maintaining it for others. >>> In fact I think that there should be version not only for every exported >>> symbol (in the EXPORT_SYMBOL() sense), but also for every public type >>> (in the sense of eg. structure defined in the public header file). >> Well the distro can just append _v2, _v3 to the name of the function >> or type if it has to break compat for some reason. Would that be enough? > There are other ways that distros can work around when upstream "breaks" > the ABI, sometimes they can rename functions, and others they can > "preload" structures with padding in anticipation for when/if fields get > added to them. But that's all up to the distros, no need for us to > worry about that at all :) Currently, the ABI version (checksum) is stored outside of the actual code in the __ksymtab section. That means that the distributions can still apply upstream patches cleanly and only update the version checksum if these break ABI. With the _v2, _v3 suffixes (or similar solutions) we'd be effectively storing the ABI versions directly in the code and that would cause conflicts when pulling further patches from upstream. My view is that it would be than easier to maintain out-of-tree modversions (or similar tool) rather than to solve all these conflicts. Warm Regards, -Stanislav