> How do you increase the number of system call parameters, and how many
> can you at most have?
You can have upto 6 argument on i386. Each argument needs an register
to pass and the i386 has only 8 and two are used for the stack pointer
and the syscall number. This leaves you 6.
Other architectures may not have that limitation.
> Would up to 12 parameters be possible, and how?
Yes. Just pass a pointer to an auxillary structure as the first argument
and do a copy_from_user on that structure at the entry point. Put the
arguments in that structure. In user space you can hide the structure in a
stub.
Some system calls (mmap, old_select, socketcall) are in fact implemented
like this because they were designed before the entry point supported
6 arguments.
A note on design: if you have a function call that needs 12 arguments you
probably forgot some[1] (in short it is a strong cue for a broken design,
you should probably split it in smaller calls)
-Andi
[1] unknown author
-
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/