diff -r 9b42765ce554 -r ced0fcfbcf8e Tainted_prop.thy --- a/Tainted_prop.thy Tue Jun 04 15:51:02 2013 +0800 +++ b/Tainted_prop.thy Thu Jun 06 08:00:20 2013 +0800 @@ -1,20 +1,46 @@ theory Tainted_prop -imports Main Flask Flask_type Init_prop Current_files_prop Current_sockets_prop Delete_prop Proc_fd_of_file_prop +imports Main Flask Flask_type Init_prop Current_files_prop Current_sockets_prop Delete_prop Proc_fd_of_file_prop Current_prop begin context tainting begin lemma tainted_in_current: - "\obj \ tainted s; valid s\ \ alive s obj" -apply (erule tainted.induct, auto dest:vt_grant_os simp:is_file_simps) + "obj \ tainted s \ alive s obj" +apply (erule tainted.induct, auto dest:vt_grant_os vd_cons simp:is_file_simps) +apply (drule seeds_in_init, simp add:tobj_in_alive) +apply (erule has_same_inode_prop2, simp, simp add:vd_cons) +apply (frule vt_grant_os, simp) +apply (erule has_same_inode_prop1, simp, simp add:vd_cons) +done + +lemma tainted_is_valid: + "obj \ tainted s \ valid s" +by (erule tainted.induct, auto intro:valid.intros) +lemma t_remain_app: + "\obj \ tainted s; \ deleted obj (s' @ s); valid (s' @ s)\ + \ obj \ tainted (s' @ s)" +apply (induct s', simp) +apply (simp (no_asm) only:cons_app_simp_aux, rule t_remain) +apply (simp_all add:not_deleted_cons_D vd_cons) +apply (drule tainted_in_current, simp add:not_deleted_imp_alive_cons) +done +lemma valid_tainted_obj: + "obj \ tainted s \ (\ f. obj \ O_dir f) \ (\ q. obj \ O_msgq q) \ (\ h. obj \ O_shm h)" +apply (erule tainted.induct) +apply (drule seeds_in_init) +by auto +lemma dir_not_tainted: "O_dir f \ tainted s \ False" +by (auto dest:valid_tainted_obj) + +lemma msgq_not_tainted: "O_msgq q \ tainted s \ False" +by (auto dest:valid_tainted_obj) + +lemma shm_not_tainted: "O_shm h \ tainted s \ False" +by (auto dest:valid_tainted_obj) end -end - - - - +end \ No newline at end of file