[ofa-general] Re: [PATCH] installer: update kernel symbol versions

Michael S. Tsirkin mst at dev.mellanox.co.il
Thu Apr 19 05:15:37 PDT 2007


> Quoting Yosef Etigin <yosefe at voltaire.com>:
> Subject: Re: [PATCH] installer: update kernel symbol versions
> 
> Michael S. Tsirkin wrote:
> >>Quoting Yosef Etigin <yosefe at voltaire.com>:
> >>Subject: Re: [PATCH] installer: update kernel symbol versions
> >>
> >>>Because, these are part of another package, touching them is wrong.
> >>>External modules will have to solve it in some other way.  It should be possible
> >>>- it's all just scripts, for the most part.  For example, for all I care, build
> >>>script for external module can catenate ofed and kernel symvers, build and then
> >>>split them back. Already better than OFED doing permanent changes.
> >>>
> >>
> >>The problem is that this is not applicable for old kernels.
> > 
> > 
> > Why not?
> > This should be applicable to all kernels with a bit of work.
> > 
> > 
> >>Anyone using rhas4 must change his version anyway.
> > 
> > 
> > version of what?
> > 
> Sorry, i meant 'versions'

Are you speaking about Module.symvers here?
That's not true I think - OFED currently seems to work fine without
the user touching the kernel's Module.symvers.

> > 
> >>Another method:
> >>The kernel-ib-devel will provide a patch that a user can apply to his
> >>Module.symvers, to update it with the new versions.
> > 
> > 
> > No, I don't think we can call that a solution.
> > Anyway, I just looked at kernel 2.6.9, and I see there:
> > scripts/Makefile.modpost:symverfile := $(objtree)/Module.symvers
> > So it seems that just by setting
> > symverfile=mysymverfile
> > on makefile command line you should be able to force it to pick
> > a symbol version file from an alternate location.
> > 
> > In any case, this is something that *the external module*
> > should do, not OFED itself.
> > 
> 
> The method you suggest overrides the default symvers location. This does
> not enable using a file that is effectively appended to the original one,
> as in new kernels.

Sorry I could not parse this. You are building an out of kernel module.
Would not something like

cat $(objtree)/Module.symvers $OFED/Module.symvers > Module.symvers.$$
make symverfile=Module.symvers.$$ SUBDIRS=... 

do the trick for you?

> The user will have to do the work anyway.

The *user* should not need to do anything besides run the installation script.
The job should be done by *developer* that wants to write an external module
using OFED APIs. He has to write the script that does the job for the user.

> Why shouldn't this step be a part of OFED?

Because of the comment above. This is not the *user*'s problem.
This is external module developer's problem, and developers should
adapt their scripts to do the right thing.

And my point is, I'm sure it can be done without corrupting the kernel sources,
but if you *want* to corrupt kernel's sources, be my guest but OFED shouldn't do
it I think.

-- 
MST



More information about the general mailing list