Re: OT: calling kernel syscall manually

From: Phillip Susi
Date: Tue Sep 12 2006 - 16:25:35 EST


What do you mean you have removed the ability to make system calls directly? That makes no sense. Glibc has to be able to make system calls so you can write your own code that does the same thing if you want.

For the OP: you might want to study the glibc sources to see how it implements syscall, and mimic that. IIRC it involves making an int 80 call on i386.

David Woodhouse wrote:
The third one has always been broken on i386 for PIC code and was
pointless anyway, since glibc provides this functionality. The kernel
method has been removed from userspace visibility all architectures, and
we plan to remove it entirely in 2.6.19 since it's not at all useful.

However, there was a patch which was sneaked to Linus in private which
reverted that cleanup on i386 and x86_64 and made them visible again --
but they'll be going away again on those two architectures shortly;
hopefully before 2.6.18.

Don't bother with it -- just use glibc's syscall().


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/