[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <46e6def3-5724-90be-1844-d91b32bd2bcb@suse.com>
Date: Thu, 24 Nov 2016 11:51:23 +0100
From: Michal Marek <mmarek@...e.com>
To: Nicholas Piggin <npiggin@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Ingo Molnar <mingo@...nel.org>,
Al Viro <viro@...iv.linux.org.uk>,
Adam Borowski <kilobyte@...band.pl>,
Philip Muller <philm@...jaro.org>,
linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
linux-arch <linux-arch@...r.kernel.org>,
linux-kbuild <linux-kbuild@...r.kernel.org>
Subject: Re: [PATCH] x86/kbuild: enable modversions for symbols exported from
asm
Dne 24.11.2016 v 11:03 Nicholas Piggin napsal(a):
> On Thu, 24 Nov 2016 10:32:12 +0100
> Michal Marek <mmarek@...e.com> wrote:
>
>> On 2016-11-24 08:53, Nicholas Piggin wrote:
>>> On Thu, 24 Nov 2016 08:36:39 +0100
>>> Greg Kroah-Hartman <gregkh@...uxfoundation.org> wrote:
>>>
>>>> On Thu, Nov 24, 2016 at 06:20:26PM +1100, Nicholas Piggin wrote:
>>>>> But still, modversions is pretty complicated for what it gives us. It sends
>>>>> preprocessed C into a C parser that makes CRCs using type definitions of
>>>>> exported symbols, then turns those CRCs into a linker script which which is
>>>>> used to link the .o file with. What we get in return is a quite limited and
>>>>> symbol "versioning" system.
>>>>>
>>>>> What if we ripped all that out and just attached an explicit version to
>>>>> each export, and incompatible changes require an increment?
>>>>
>>>> How would that work for structures? Would that be required for every
>>>> EXPORT_SYMBOL* somehow?
>>>
>>> Yeah just have EXPORT_SYMBOL take another parameter which attaches a version
>>> number and use that as the value for the __crc_ symbol versions rather than
>>> a calculated CRC.
>>
>> The problem is that with every kernel release, the structures change in
>> a way that you would have to bump the version of virtually every export.
>>
>> At which point, there would be little difference between
>> CONFIG_MODVERSION on and off (without CONFIG_MODVERSION, we compare the
>> kernel version strings when loading modules).
>
>
> I'm not sure about that. If they are truly incompatible changes and
> MODVERSIONS does not pick up a different CRC, then it's even worse if
> incompatible modules are missed so often.
Now I'm confused: Are you suggesting to do this manual symbol versioning
for all exports, or only those defined in asm?
Thanks,
Michal
Powered by blists - more mailing lists