Re: The disappearing sys_call_table export.

Yoav Weiss
2003-05-06T17:33:15Z

On Tue, 6 May 2003, Jerry Cooperstein wrote:

> It's much simpler than that: Do either
>
> nm vmlinux | grep sys_call_table
>
> or
>
> grep sys_call_table System.map
>
> extract the address, use the header file to get the syscall number and
> the offset.

You're right but only in case System.map or vmlinux are available. In
some distros you only have the bzImage/vmlinuz, and still want to load
some module, without replacing the kernel.

My proposed script would derive this info from exported symbols in the
running kernel, so its more portable. Another advantage it has is gaining
access to non-globals. As long as they're referred by some exported
struct, even indirectly, they can be re-exported as globals. (Not that
I'd do it or recommend it to anyone :)

>
> Of course this all breaks the GPL, but you can get any non-exported
> symbol address that way.

It violates the GPL only if you distribute the resulting module. As long
as you run the script locally, generate the module locally, and only use
it locally, I don't see how it violates anything. GPL is a license for
distributors, not users.

Yoav Weiss