Subject: Re: tricky macro (Re: CVS commit: src/sys)
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Christos Zoulas <christos@zoulas.com>
List: tech-kern
Date: 05/20/2007 12:11:46
On May 20,  4:51pm, yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi) wrote:
-- Subject: tricky macro (Re: CVS commit: src/sys)

| > Module Name:	src
| > Committed By:	christos
| > Date:		Sat May 19 22:11:25 UTC 2007
| > 
| > Modified Files:
| > 	src/sys/kern: kern_verifiedexec.c vfs_lookup.c vfs_syscalls.c
| > 	    vfs_vnops.c
| > 	src/sys/sys: namei.h verified_exec.h
| > 
| > Log Message:
| > - remove pathname_ interface.
| > - use macros to deal with pathnames in userspace, when veriexec is used.
| > - reorder the veriexec_ call arguments for consistency.
| > With help from elad@ finding the last bug.
| > 
| > 
| > To generate a diff of this commit:
| > cvs rdiff -r1.99 -r1.100 src/sys/kern/kern_verifiedexec.c
| > cvs rdiff -r1.91 -r1.92 src/sys/kern/vfs_lookup.c
| > cvs rdiff -r1.314 -r1.315 src/sys/kern/vfs_syscalls.c
| > cvs rdiff -r1.138 -r1.139 src/sys/kern/vfs_vnops.c
| > cvs rdiff -r1.49 -r1.50 src/sys/sys/namei.h
| > cvs rdiff -r1.56 -r1.57 src/sys/sys/verified_exec.h
| > 
| > Please note that diffs are not public domain; they are subject to the
| > copyright notices on the relevant files.
| 
| IMO, this kind of usage of macros should go away.  (cf. nfs)
| we should not introduce new ones like this.

The NFS macros came to mind when I wrote those. But the alternative is
worse (the ifdefs we had before). Of the two evils I chose the macro
one.

christos