Re: [RFC][3/11][MANUX] Kernel compatibility : syscall numbers

From: Clemens Ladisch
Date: Wed Apr 16 2014 - 03:03:55 EST


Emmanuel Colbus wrote:
> I have a question regarding vector 0x80.
>
> As I mentionned earlier, my OS's internals are very different from
> Linux's, thus I have had a need for a few new syscalls. Since I wanted
> to avoid any collision with Linux

... you could just use another vector, such as 0x81.

> but I also wanted to keep the ability to put the syscall table in
> a single 4096-byte page on 64-bit computers (on which I hope to run
> one day), I chose to start taking syscall number 511, and to progress
> downwards - currently, I'm using numbers 511 through 501 included

These implementation details do not need to show up in the interface:

int syscall_0x81(int nr, ...)
{
if (nr in range)
return table[511 - nr](...);
}


Regards,
Clemens
--
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/