Subject: Re: #ifdef in syscalls.master considered harmful
To: Matt Thomas <matt@3am-software.com>
From: Steven M. Bellovin <smb@cs.columbia.edu>
List: tech-kern
Date: 08/31/2006 14:36:50
On Thu, 31 Aug 2006 09:11:35 -0700, Matt Thomas <matt@3am-software.com>
wrote:
> The fallout of my making PTRACE conditional has made me realize that
> #ifdefs in syscalls.master are never the right thing. They just overly
> complicate the code. The only downside to no #ifdefs in syscall.master
> is that *sysent.c always has a call to optional syscall. This can
> be resolved by including a include files which will #define the syscall
> to sys_nosys. Or the actual syscall could always return ENOSYS.
>
Agreed, strongly. (I'm more and more inclined to the notion that almost
all #ifdefs are evil, especially in the kernel, but that's a rant for
another time.)
--Steven M. Bellovin, http://www.cs.columbia.edu/~smb