tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Modules and syscalls



Hi,

I'm cleaning up/out some diffs that I have and thought it would be
worthwhile posting this as something to be integrated after 5.0 is branched.

        http://www.netbsd.org/~ad/syscallmod.diff

It allows for registering system calls at runtime. Insertion and removal of
a set of calls is atomic. That's good because if unloading a module fails
for some reason, we can roll back the unload and make it appear to any apps
using the module that nothing untoward has happend. It also gates access so
that the system calls stop while a module is figuring out whether it's OK
or not to unload.

There is a basic auto-load facility for system calls, using a small table
that maps system call numbers to module names. Notes:

- I'm tempted to put the syscall->module table into a module of its own
  instead of kern_stub.c.

- The autoload table should be tied to struct emul.

- It doesn't handle sysctl very well. Consider either of these taking place
  before the corresponding module is loaded: an application using sysconf to
  check for POSIX semaphores, sysctl.conf tweaking sysv IPC parameters.

Comments?

Thanks,
Andrew


Home | Main Index | Thread Index | Old Index