[OpenAFS-devel] Solaris afs.rc file damage

Derrick J Brashear shadow@dementia.org
Wed, 9 May 2007 19:58:19 -0400 (EDT)


On Wed, 9 May 2007, Dean Anderson wrote:

> I think I understand your confusion. When I say 'static linking', I
> don't mean adding -static to the linker. I mean the procedure of adding
> an object file to the kernel by: 1) patching source code to add symbols
> to the system call table source code, and 2) adding a Makefile that will
> 2a) compile the object files during the kernel build, and that will 2b)
> cause the object file to be added to the link step of vmlinux.

Once you patch the kernel to add symbols to the syscall table source, why 
bother? You can just patch dynamic syscall support back in.

> If you mean to patch the system call table so that there is an unused
> entry, this also won't work, because, as you said, the system call table
> is in read only memory and can't be modified while running.

Again, if you opened the door to patching the kernel, the syscall table is 
wherever you want it to be.

> A possibility is to add an staticly loaded (as above) AFS trampoline
> that can be modified to jump to the address of the dynamically loaded
> entry. This could be useful because the guts of AFS is still dynamically
> loaded. But you have to make sure that it doesn't crash when AFS isn't
> loaded.

We offered such a patch to the linux kernel list long ago and it was 
rejected, but such a thing could be done again, of course, if you're 
patching.