Subject: Re: Syscall number space
To: Jason Thorpe <thorpej@shagadelic.org>
From: Darren Reed <darrenr@netbsd.org>
List: tech-kern
Date: 08/26/2007 23:12:27
Jason Thorpe wrote:
> ...
> As you can see, all it does is pad the table out with entries that 
> call sys_nosys().  It also defines a constant SYS_NSYSENT, which is 
> when used like so in machine-dependent code:
>
>         code &= (SYS_NSYSENT - 1);
>         callp += code;
>
> (I.e. no test-and-branch for whether or not the system call number is 
> beyond the end of the table.)

And so defining SYS_NSYSENT to be (say) 32k results in a huge empty table.

But there is a system call table per emulation...
The problem being discussed impacts vendors who are modifying the netbsd 
kernel,
they could benefit with always being able to use the same system call #.

How hard would it be to support a secondary system call table (or tree) that
was for system calls above a certain number...and "not normally used"?

But is there any reason that these vendors shouldn't use the system call 
slots
that have been allocated for LKMs?  This would seem to fit their needs 
almost
perfectly unless said vendors are also loading system calls via 
LKMs...although
there are only 10 such slots.

Darren