LFS/syscalls -> Kernel interface incompatibility

Thorsten Kukuk kukuk@suse.de
Thu May 25 08:33:00 GMT 2000


Hi,

I found a big problem with the LFS interface between kernel and
glibc.

In glibc, we call (f)truncate64 as following:

int result = INLINE_SYSCALL (truncate64, 3, path, low, high);

In kernel, we have the following:

long sys_truncate64(const char * path, loff_t length);
or
sys32_truncate64(const char * path, unsigned long high, unsigned long low);

As everybody can see, our syscall only works with sys_truncate64 on
little endian machines, and never with sys32_truncate64.

I think we have some more functions like this (pread ?).
What should we do ? If the kernel would always use something like
sys32_truncate64, we had no problems. But with the current situation,
I think we need to duplicate this files for every big endian
architecture and change the syscall.

Any other ideas ?

  Thorsten
-- 
Thorsten Kukuk       http://www.suse.de/~kukuk/       kukuk@suse.de
SuSE GmbH            Schanzaeckerstr. 10            90443 Nuernberg
Linux is like a Vorlon.  It is incredibly powerful, gives terse,
cryptic answers and has a lot of things going on in the background.


More information about the Libc-hacker mailing list