lkml.org 
[lkml]   [2007]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[DISCUSS] Making system calls more portable.
Hi,

I wanted to know if there is any inclination towards making system calls more portable. Please let
me know if this discussion has happened before.

Well, system calls today are not portable mainly because they are invoked using a number and it
may happen that a number 'N' may refer to systemcall_1() on one system/kernel and to
systemcall_2() on another system/kernel. This problem may surface if you compile your program
using headers from version_1 of the kernel, and then install another version of the kernel or a
custom kernel that has extended the system call table (on the same system). If we want to improve
the portability then we can avoid this approach or improve this approach. It may or may not be
complex to implement these.

1. Invoke a system call using its name. Pass its name to the kernel as an argument of syscall() or
some other function. Probably may make the invocation of the system call slower. If the name
doesn't match in the kernel then an error can be returned.

2. Create a /proc entry that will return the number of the system call given its name. This number
can then be used to invoke the system call.

These approaches will also remove the dependency from user space header file that contains the
mapping from the system call name to its number. I hope that I made some sense.

Regards,
Amit


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2007-01-07 09:19    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site