PRFW To-do: Evan Sarmiento ----------------> | STYLE 9 STYLE 9 | STYLE 9 | STYLE 9 9 9 9 9 9 9 | REMEMBER STYLE 9 <----------------- Cleanup-stage: ADD prfw.debug sysctl: 1. Add macro PRFW_DEBUG, which is a wrapped printf, only to be called if sysctl prfw.debug = 1. ADD prfw.active sysctl ADD comments STYLE: 1. Retrofit code to meet style (9) 2. Clean-up nested IF statements, espically in trap.c 3. Get rid of prfw_default_handler, if &mem_addr == 0x00, do not preform function. This should alieviate the 13% overhead when forking MUTEX locks: 1. Add mutex locks in prfw_syscall_r 2. Make MACRO for LOCK LIST: 1. when procress restricted, add PID to list. For easy FREE. 2. Including forked children! 3. Modify exit() to remove PID from LIST 4. MACROs PRFW_ADDPID, PRFW_DELPID. 5. In FREE, foreach pfind, FREE for PRFW_PLIST, then PRFW_DELPID RENAMES: 1. Rename prfw_inject_fp to prfw_add_hook() 2. Rename prfw_setflags to prfw_init_hook() 3. Keep prfw_free. Implement new-features: 1. Ability to hook by PGRP and SESSION. 2. Redesign prfw_allproc structure. struct prfw_r_table { struct prfw_kernf_r *kernf; struct prfw_syscall_r *syscalls[SYS_MAXSYSCALL]; }; struct prfw_kernf_r { struct prfw_kernf_fs *fs_calls; struct prfw_kernf_net *net_calls; ... }; 3. Then add option to hook kernel functions. 4. Go into each kernel function, write MACRO that calls PRFW, checks, returns, etc. In a future far far away: 1. Make PRFW a kernel_option 2. Make a sysctl for EITHER DAC or MAC hooks (maybe.. this may cause bloat)