lkml.org 
[lkml]   [2016]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] x86/kbuild: enable modversions for symbols exported from asm
From
Date
On 2016-11-24 08:53, Nicholas Piggin wrote:
> On Thu, 24 Nov 2016 08:36:39 +0100
> Greg Kroah-Hartman <gregkh@linuxfoundation.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).

Michal

\
 
 \ /
  Last update: 2016-11-24 10:33    [W:0.200 / U:0.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site