Commit Graph

20 Commits

Author SHA1 Message Date
elad
73a4d95bb6 Update comment: device -> mount. No functional change. 2007-01-25 13:57:28 +00:00
elad
d2e4f7167b Remove advertising clause from all of my stuff. 2007-01-09 12:49:36 +00:00
elad
8daca39031 Fix a comment. No functional change. 2006-12-26 08:55:32 +00:00
yamt
e49bb7c765 - remove the fileassoc "tabledata" functionality. use mountspecific instead.
- make pax_segvguard_cb static.

tested and ok'ed by elad.
2006-12-23 08:35:43 +00:00
yamt
4cfe5a1b41 - just associate fileassoc "table" to struct mount.
because the latter is always available during the lifetime of the former,
  there is little point to use another global list to keep track of them.
  it also allows to remove an #ifdef FILEASSOC.

- avoid some operations (memory allocation and VOP) in fileassoc_file_lookup,
  when fileassoc table is not used.

ok'ed by elad.
2006-12-14 09:24:54 +00:00
yamt
e4e829e9d1 make fileassoc_tables static. 2006-12-12 14:22:07 +00:00
yamt
b0a14e5934 - remove a static configuration, FILEASSOC_NHOOKS. do it dynamically instead.
- make fileassoc_t a pointer and remove FILEASSOC_INVAL.
- clean up kern_fileassoc.c.  unify duplicated code.
- unexport fileassoc_init using RUN_ONCE(9).
- plug memory leaks in fileassoc_file_delete and fileassoc_table_delete.
- always call callbacks, regardless of the value of the associated data.

ok'ed by elad.
2006-12-11 15:24:27 +00:00
yamt
4d5f3128d9 don't expose FILEASSOC_NHOOKS. 2006-12-08 13:23:22 +00:00
elad
9a87be9622 compare pointer against null, not zero 2006-11-20 21:50:51 +00:00
elad
145a8382e1 Don't leak handle. 2006-10-27 22:17:09 +00:00
blymn
6395103101 * Correct hashing macro so it uses FHANDLE_SIZE()
* Stop fhandle memory leaks and use the correct fhandle dealloc routine
  (thanks to Elad for these fixes)
* Remove include of kmem.h, it is not required.
2006-09-08 13:57:38 +00:00
blymn
c09e9ac5fb * Remove "hinted" interface
* Modify fileassoc internals to use fhandle_t instead of fileid
2006-09-06 13:37:49 +00:00
blymn
50abf3c730 Add functions to the fileassoc interface to allow a "hint" to be provided
instead of performing an implicit VOP_GETATTR() when adding/looking up
fileassoc entries.
2006-08-20 10:38:23 +00:00
xtraeme
dfa8fac821 Add __KERNEL_RCSID() 2006-08-13 06:21:10 +00:00
christos
ce0ef6cfc4 Pretending to be Elad's keyboard:
fileassoc.diff adds a fileassoc_table_run() routine that allows you to
pass a callback to be called with every entry on a given mount.

veriexec.diff adds some raw device access policies: if raw disk is
opened at strict level 1, all fingerprints on this disk will be
invalidated as a safety measure. level 2 will not allow opening disk
for raw writing if we monitor it, and prevent raw writes to memory.
level 3 will not allow opening any disk for raw writing.

both update all relevant documentation.

veriexec concept is okay blymn@.
2006-08-11 19:17:47 +00:00
ad
f474dceb13 Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
cube
2d03dc4c3e Fix an obvious overlook (struct fileassoc_hook is not defined in
fileassoc.h anymore).  I could say "please compile-test", but then, I'm not
doing it either for that commit.
2006-07-20 09:00:41 +00:00
elad
9be7229906 expose less api; prompted by yamt@. 2006-07-16 19:37:55 +00:00
elad
e3f6ad54bf dont use magic numbers. 2006-07-15 16:42:12 +00:00
elad
b5d09ef065 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.

this also prompted the redesign of the interface, making it work on vnodes
and mounts and not directly on devices and inodes. internally, we still
use file-id but that's gonna change soon... the interface will remain
consistent.

as a result, veriexec went under some heavy changes to conform to the new
interface. since we no longer use device numbers to identify file-systems,
the veriexec sysctl stuff changed too: kern.veriexec.count.dev_N is now
kern.veriexec.tableN.* where 'N' is NOT the device number but rather a
way to distinguish several mounts.

also worth noting is the plugging of unmount/delete operations
wrt/fileassoc and veriexec.

tons of input from yamt@, wrstuden@, martin@, and christos@.
2006-07-14 18:41:40 +00:00