[lttng-dev] [PATCH 07/20] lttng wrappers

Greg KH greg at kroah.com
Wed Nov 30 01:23:28 EST 2011


On Mon, Nov 28, 2011 at 09:22:13PM -0500, Mathieu Desnoyers wrote:
> * Greg KH (greg at kroah.com) wrote:
> > On Mon, Nov 28, 2011 at 07:42:14AM -0500, Mathieu Desnoyers wrote:
> > > Implement wrappers for compatibility with older kernel versions and
> > > kernels with had the libringbuffer (old) patchset applied.
> > > 
> > > Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> > 
> > Are these going to still be needed anymore, now that this code is in the
> > kernel tree?
> 
> Hrm, this patch changelog could have been a bit more explicit. In
> addition to allow compatibility for older kernel versions, some wrappers
> deal with missing EXPORT_SYMBOL_GPL() from the core kernel.
> 
> The TODO file details what should be done to eliminate those wrappers:
> 
>         2) Cleanup wrappers. The drivers/staging/lttng/wrapper directory
>            contains various wrapper headers that use kallsyms lookups to
>            work around some missing EXPORT_SYMBOL_GPL() in the mainline
>            kernel. Ideally, those few symbols should become exported to
>            modules by the kernel.

Ugh, that's crazy, but I understand.

> So hopefully we can look into adding these missing symbols to the core
> kernel. This would be much nicer, but this does not depend only on the
> lttng driver: it's up to the kernel to export those.
> 
> Another option would be to create a CONFIG bool (y/n) object that wraps
> the missing core kernel symbols. However, this would require this
> support option to be selected at kernel build time in order to allow
> loading the lttng modules, and I doubt it's a good practice for a
> driver.

Yes, that's not good, we can just export the symbols as needed now that
we have an in-kernel user.

> As for those wrappers that deal more specifically with compatibility
> with older kernels, those aren't needed anymore, of course.

Great, please send patches to remove them before I get to it :)

thanks,

greg k-h



More information about the lttng-dev mailing list