Subject: fileassoc (Re: CVS commit: src)
To: None <elad@netbsd.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 07/16/2006 16:46:59
> Module Name: src
> Committed By: elad
> Date: Fri Jul 14 18:41:41 UTC 2006
>
> Modified Files:
> src/distrib/sets/lists/comp: mi
> src/lib/libc/gen: sysctl.3
> src/sbin/sysctl: sysctl.8
> src/sbin/veriexecctl: veriexecctl.c veriexecctl.h veriexecctl_parse.y
> src/share/man/man4: options.4
> src/share/man/man9: Makefile
> src/sys/conf: files
> src/sys/dev: verified_exec.c
> src/sys/kern: init_main.c kern_exec.c kern_verifiedexec.c
> vfs_syscalls.c vfs_vnops.c
> src/sys/sys: verified_exec.h
> Added Files:
> src/share/man/man9: fileassoc.9
> src/sys/kern: kern_fileassoc.c
> src/sys/sys: fileassoc.h
>
> Log Message:
> okay, since there was no way to divide this to two commits, here it goes..
>
> introduce fileassoc(9), a kernel interface for associating meta-data with
> files using in-kernel memory. this is very similar to what we had in
> veriexec till now, only abstracted so it can be used more easily by more
> consumers.
- as far as you use VOPs in the framework, i guess you need some kind of
locking rules.
- fileassoc_file_delete in sys_unlink:
- is it intended to call it whenever a link to a file is removed?
- i don't think nd.ni_vp is always valid after VOP_REMOVE.
- please make fileassoc.h minimal.
- unexport functions and structures which aren't necessary to be
exported.
eg. fileassoc_init (use static initialization or RUN_ONCE),
fileassoc_file_lookup, fileassoc_hash_entry.
- remove unnecessary includes. eg. hash.h.
YAMAMOTO Takashi