FreeBSD Kernel buffer overflow

Mike Meyer mwm at mired.org
Thu Sep 16 19:04:47 PDT 2004


> Nobody can write a syscall with more than 8 arguments and this is conceptually
> wrong. In my opinion this is a mistake, no assumptions might be done on

I'd argue that a syscall with 9 or more arguments is conceptually
wrong in the first place. Anything with that many knobs needs to be an
object, not a simple list of parameters. In other words, you should
bundle the parameters up into a struct, and pass a pointer to the
struct.

Take a look at namei (which used to have a very long argument list)
for an example of what I mean.

	<mike
-- 
Mike Meyer <mwm at mired.org>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.


More information about the freebsd-hackers mailing list