[OpenAFS-devel] openafs linux-kernelmodule not buildable on sparc

Johan Christiansen johan@jdc-consult.dk
Sun, 06 May 2007 21:48:33 +0200


s=C3=B8n, 25 02 2007 kl. 09:35 -0500, skrev Derrick J Brashear:
> Realistically we should have a configure test that tries harder to gues=
s=20
> how it's exported.
>=20
> Of course here there is no leg to stand on for the "we only make new=20
> symbols GPL only" claim.
>=20
> If anyone claims sys_call_table is "new", well, there goes their=20
> credibility.
>=20
> Untested, might work, apply to your OpenAFS source and let us know.
> Basically "try harder to see if a module with a weak ref to sys_call_ta=
ble=20
> will work before trying it.
>=20
> Index: afs/LINUX/osi_probe.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /cvs/openafs/src/afs/LINUX/osi_probe.c,v
> retrieving revision 1.1.2.20
> diff -u -r1.1.2.20 osi_probe.c
> --- afs/LINUX/osi_probe.c       13 Feb 2007 22:54:20 -0000=20
> 1.1.2.20
> +++ afs/LINUX/osi_probe.c       25 Feb 2007 14:34:09 -0000
> @@ -226,7 +226,9 @@
>                                       ) __attribute__((weak));
>   #endif
>=20
> +#ifdef LINUX_EXPORTS_SYS_CALL_TABLE
>   extern SYSCALLTYPE sys_call_table[] __attribute__((weak));
> +#endif
>   extern SYSCALLTYPE ia32_sys_call_table[] __attribute__((weak));
>   extern SYSCALLTYPE sys_call_table32[] __attribute__((weak));
>   extern SYSCALLTYPE sys_call_table_emu[] __attribute__((weak));
> @@ -499,7 +501,11 @@
>       0,
>   #endif
>=20
> +#ifdef LINUX_EXPORTS_SYS_CALL_TABLE
>       sys_call_table,               /* weak symbol ref */
> +#else
> +    0,
> +#endif
>       0, 0,                         /* module parameter answers */
>   #ifdef AFS_LINUX_sys_call_table
>       AFS_LINUX_sys_call_table,     /* compiled-in answer, if any */
> --- cf/linux-test4.m4   22 Feb 2007 21:49:02 -0000      1.20.2.28
> +++ cf/linux-test4.m4   25 Feb 2007 14:34:09 -0000
> @@ -110,9 +110,9 @@
>     AC_CACHE_VAL([ac_cv_linux_exports_sys_call_table], [
>       AC_TRY_KBUILD(
>   [#include <linux/modversions.h>],
> -[#ifndef __ver_sys_call_table
> -#error sys_call_table not exported
> -#endif],
> +[
> +extern SYSCALLTYPE sys_call_table[] __attribute__((weak));
> +],
>         ac_cv_linux_exports_sys_call_table=3Dyes,
>         ac_cv_linux_exports_sys_call_table=3Dno)])
>     AC_MSG_RESULT($ac_cv_linux_exports_sys_call_table)])
>=20


Following up on an old issue which still remains.

I have created a bugreport here:
https://bugs.launchpad.net/ubuntu/+source/openafs/+bug/111300
The upstream bugtracker on rt.central.org does not look very active??

The patch above does apply, and the module compiles, but the kernel
panics.

I talked to Daniel Priem who was the first to report this issue in
february 2007. He solved the compile time problems by modifying his
linux kernel headers to not fail on the GPL sys_call_table check, just
put a warning instead.

Now i did the same thing (removing the GPL check), knowing that it's
wrong, but now the kernel module works! I can actually browse the afs
directory now :D - But now another problem occured. I'm not sure if it's
related. Whenever i run aklog, i now get this error:

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D SNIP =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
edbdrift@jeep:/afs/s-et.aau.dk/user/johan$ pwd
/afs/s-et.aau.dk/user/johan

edbdrift@jeep:/afs/s-et.aau.dk/user/johan$ kinit johan
Password for johan@S-ET.AAU.DK:=20

edbdrift@jeep:/afs/s-et.aau.dk/user/johan$ klist
Ticket cache: FILE:/tmp/krb5cc_1000
Default principal: johan@S-ET.AAU.DK

Valid starting     Expires            Service principal
05/06/07 21:41:23  05/07/07 07:41:23  krbtgt/S-ET.AAU.DK@S-ET.AAU.DK
        renew until 05/07/07 21:43:54


edbdrift@jeep:/afs/s-et.aau.dk/user/johan$ aklog -d
Authenticating to cell s-et.aau.dk (server afs.s-et.aau.dk).
We've deduced that we need to authenticate to realm S-ET.AAU.DK.
Getting tickets: afs/s-et.aau.dk@S-ET.AAU.DK
Using Kerberos V5 ticket natively
About to resolve name johan to id in cell s-et.aau.dk.
stackcheck =3D 0: stack =3D 0=20
topstack =3D 0xff8edbb4: stackptr =3D 0xf7bfe008: stacksize =3D 0x48000
Sun May  6 21:44:15 2007 LWP: stack overflow in process IO MANAGER!
Aborted
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D

I hope that you have some ideas on how to fix the compile time issue,
and also, what might cause my recent error with aklog??

Btw: i'm running the newest 1.4.4 package distributed with ubuntu, exact
details about my version here:
https://launchpad.net/ubuntu/+source/openafs/1.4.4.dfsg1-2

Best regards,
Johan Christiansen