create_module: Function not implemented

Kevin J. Cummings (cummings@kjc386.framingham.ma.us)
Mon, 09 Jun 1997 00:19:27 -0400


I first asked this question on linux-tape, but I got no helpful answers,
so I thought I would pass it by the kernel gurus hoping to find someone
who understood how the module utilities are supposed to work:

> Arrrrrgh! Help!!!!!
>
> I HAD a working installation of ftape-2.11a on my machine (well,
> mostly working anyways B^). But now I don't. I've upgraded enough
> stuff that I don't know what I did that broke it!
>
> What I'm currently running:
>
> RedHat 3.0.3 (Linux 1.2.13 ELF w/a.out support)
> modules-2.0.0
> Eagle-96 w/2MB controller
> libc-5.4.23 (for Star Office to work)
>
> I have installed and tested modules-2.0.0. I had to modify the
> drv_hello.c file to get it to compile under Linux-1.2.13:
>
> I added the following line:
>
> char kernel_version[] = UTS_RELEASE;
>
> Now, drv_hello.c compiles, insmods, and runs fine.
>
> My Module Utilities work!
>
> ftape.o won't insmod! The error message is:
>
> create_module: Function not implemented
>
> I have debugged insmod with gdb and determined the following:
>
> in insmod.c, there is the following routine:
>
> void * ckrealloc(void *ptr, size_t nbytes)
> {
> void *p;
>
> if ((p = realloc(ptr, nbytes)) == NULL) {
> perror("insmod: realloc failed");
> exit(2);
> }
> return p;
> }
>
> It is called from the following code (also in insmod.c):
>
> /* create the module */
> errno = 0;
> /* make sure we have enough memory malloc'd for copy which
> kernel
> * will perform */
> textseg = ckrealloc(textseg, progsize);
> /* We add "sizeof (int)" to skip over the use count */
> addr = create_module(modname, progsize) + sizeof (int);
>
> Well, errno becomes 38 after the ckrealloc() call, in fact, after the
> realloc() call inside ckrealloc()! Why? After calling create_module,
> insmod prints out the error via a perror(check_module) call! I swear
> this used to work!

> I'm willing to bet that I'm missing something trivial, right?

My next step is to upgrade to a 2.0.xx kernel, but Claus would like
someone to verify that the new ftape stuff will still run on 1.2.13, so
I thought I would be his guinea pig ....

Please email responses directly to me (copy the list if you wish) as I
am not a subscriber of linux-kernel. Thanks!

-- 
Kevin J. Cummings			Peritus Software Services, Inc.
cummings@kjc386.framingham.ma.us	cummings@peritus.com