============================================================= Files Included ============================================================= context_sensitive_fs/ #The file system (only changed files will be described) acl.c acl.h balloc.c bitmap.c dir.c #Added a couple of lines to implement read directory ext3.h #Added some global data, the structures to contain it, some defines, a couple ioctl calls, as well as some function prototypes ext3_jbd.c file.c #Implemented read, open, and close fsync.c hash.c ialloc.c inode.c #Started trying to implement write ioctl.c #Added the two new ioctl calls as well as a means of killing processes under contex change Kconfig #Modified so you are able to easily build into the kernel (just add a line to the Kconfig in the fs/ directory) Makefile #Commented out code useful if wanting to build into kernel namei.c #Changed create namei.h resize.c super.c #Added some init/cleanup code symlink.c utils.c #Contains some functions that get called across different files xattr.c xattr.h xattr_security.c xattr_trusted.c xattr_user.c load_scripts/ load.sh #calls ismod and mount unload.sh #calls umount and rmmod monitor/ run.py #the entry point to the context monitor ... #many other things that I'm not to sure what they do; probably contains some trash log_scan/ scan0.c #displays the tail 15 items from the syslog every 300 ms scan.out #the executable built from gcc with no extra parameters change_only_diffs/ #runs `diff context_sensitive_fs/foo ext3/foo` with foo being the name of the file ... side_by_side_diffs/ #similarly to change_only_diffs/ except uses the -y parameter to show the contents side by side ... ============================================================= Functionality Provided ============================================================= Supports the following file operations: -Read -Read directory -Open -Close -Create -Ioctl calls: -Change level -Mount point location ============================================================= Setup Instructions ============================================================= Use instal the linux kernel v3.8.5 and run it Run make Within context_sensitive_fs/ Run load_scripts/load.sh Run monitor/run.py Then you can use the file system mounted at /mnt ============================================================= Expected Results (assumes everything is already setup) ============================================================= 1) Issue create (call touch) -See new directory entry with name provided and 0 size -Behind the scenes there will be two other files one with a :0 appended and the other with :1 2) Issue open and read (call cat, open file through program, etc) -See contents of file (empty if nothing there) -Behind the scenes, the process is added to a list of things to send sigkill to 3) Issue change level ioctl (insert/remove usb will do this if the context monitor is running) -Any process that opened a file will be killed -Assuming writes work -If moved to level 1, all previous data and perhaps more data will now be visible -If moved to level 0, anything exclusive to 1 will no longer be visible 3) Issue read directory (call ls) -shows only the dummy files and not the files that describe the levels -shows the correct size and access times 4) Issue write (add something using a program) -Doesn't work yet, but if it did: -Under level 0: -Updates the file (can read it again and see the changes still there) -Updates the metadata (size, times, etc) -Marks the blocks in level 1 -If read from level 1, would show the updates -Under level 1: -Updates the file (can read it again and see the changes still there) -Updates the metadata (size, times, etc) -Doesn't do anything to level 0 unless you are modiffing a shared block, in which case it allocs a new block for the new content -If read from level 0, would not show the updates