simple_selinux/S2ss_prop.thy
author chunhan
Thu, 09 Jan 2014 22:53:45 +0800
changeset 94 042e1e7fd505
parent 75 99af1986e1e0
permissions -rw-r--r--
new childf new-version
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
     1
(*<*)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
     2
theory S2ss_prop
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
     3
imports Main Flask Flask_type Static Static_type Init_prop Tainted_prop Valid_prop Alive_prop Co2sobj_prop
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
     4
begin
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
     5
(*>*)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
     6
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
     7
context tainting_s begin
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
     8
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
     9
(* simpset for s2ss*)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    10
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    11
lemma co2sobj_some_case:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    12
  "\<lbrakk>co2sobj s obj = Some sobj; \<And> p. obj = O_proc p \<Longrightarrow> P (O_proc p);
75
chunhan
parents: 74
diff changeset
    13
    \<And> f. obj = O_file f \<Longrightarrow> P (O_file f); 
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    14
    \<And> f. obj = O_dir f \<Longrightarrow> P (O_dir f); \<And> q. obj = O_msgq q \<Longrightarrow> P (O_msgq q)\<rbrakk>
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    15
   \<Longrightarrow> P obj"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    16
by (case_tac obj, auto)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    17
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    18
lemma co2sobj_execve_alive:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    19
  "\<lbrakk>alive s obj; co2sobj s obj = Some x; valid (Execve p f fds # s)\<rbrakk>
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    20
   \<Longrightarrow> alive (Execve p f fds # s) obj"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    21
apply (erule co2sobj_some_case)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    22
by (auto simp:alive_simps simp del:alive.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    23
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    24
lemma s2ss_execve:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    25
  "valid (Execve p f fds # s) \<Longrightarrow> s2ss (Execve p f fds # s) = (
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    26
     if (\<exists> p'. p' \<noteq> p \<and> p' \<in> current_procs s \<and> co2sobj s (O_proc p') = co2sobj s (O_proc p))
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    27
     then (case (cp2sproc (Execve p f fds # s) p) of
75
chunhan
parents: 74
diff changeset
    28
             Some sp \<Rightarrow> s2ss s \<union> {S_proc sp (O_proc p \<in> tainted s \<or> O_file f \<in> tainted s)}
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    29
           | _ \<Rightarrow> {} )
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    30
     else (case (cp2sproc (Execve p f fds # s) p, cp2sproc s p) of
75
chunhan
parents: 74
diff changeset
    31
             (Some sp, Some sp') \<Rightarrow> s2ss s - {S_proc sp' (O_proc p \<in> tainted s)}
chunhan
parents: 74
diff changeset
    32
                                    \<union> {S_proc sp (O_proc p \<in> tainted s \<or> O_file f \<in> tainted s)}
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    33
           | _ \<Rightarrow> {} ) )"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    34
apply (frule vd_cons, frule vt_grant_os, simp split:if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    35
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    36
apply (rule conjI, rule impI, (erule exE|erule conjE)+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    37
apply (frule_tac p = p in current_proc_has_sp, simp, erule exE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    38
apply (frule_tac p = p' in current_proc_has_sp, simp, erule exE, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    39
apply (subgoal_tac "p \<in> current_procs (Execve p f fds # s)")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    40
apply (drule_tac p = p and s = "Execve p f fds # s" in current_proc_has_sp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    41
apply (erule exE, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    42
apply (simp add:s2ss_def, rule set_eqI, rule iffI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    43
apply (drule CollectD, (erule exE|erule conjE)+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    44
apply (case_tac "obj = O_proc p")
75
chunhan
parents: 74
diff changeset
    45
apply (simp add:co2sobj_execve split:if_splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    46
apply (simp add:co2sobj_execve, rule disjI2)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    47
apply (rule_tac x = obj in exI, case_tac obj, (simp add:alive_simps)+)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    48
apply (simp, erule disjE)
75
chunhan
parents: 74
diff changeset
    49
apply (rule_tac x = "O_proc p" in exI, simp)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    50
apply (erule exE| erule conjE)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    51
apply (case_tac "x = S_proc sp (O_proc p \<in> tainted s)")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    52
apply (rule_tac x = "O_proc p'" in exI)
75
chunhan
parents: 74
diff changeset
    53
apply (simp add:alive_execve co2sobj_execve cp2sproc_execve)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    54
apply (case_tac "obj = O_proc p", simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    55
apply (frule co2sobj_execve_alive, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    56
apply (frule_tac obj = obj in co2sobj_execve, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    57
apply (rule_tac x = obj in exI, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    58
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    59
apply (erule conjE, frule current_proc_has_sp, simp, erule exE, rule impI, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    60
apply (subgoal_tac "p \<in> current_procs (Execve p f fds # s)") 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    61
apply (drule_tac p = p and s = "Execve p f fds # s" in current_proc_has_sp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    62
apply (erule exE, erule conjE, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    63
apply (simp add:s2ss_def, rule set_eqI, rule iffI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    64
apply (drule CollectD, (erule exE|erule conjE)+)
75
chunhan
parents: 74
diff changeset
    65
apply (case_tac "obj = O_proc p", simp)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    66
apply (rule disjI1, simp split:if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    67
apply (simp add:co2sobj_execve, rule disjI2)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    68
apply (rule conjI,rule_tac x = obj in exI, simp add:alive_simps split:t_object.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    69
apply (rule notI, simp, case_tac obj)
75
chunhan
parents: 74
diff changeset
    70
apply (erule_tac x = nat in allE, simp, (simp split:option.splits)+)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    71
apply (erule disjE, simp)
75
chunhan
parents: 74
diff changeset
    72
apply (rule_tac x = "O_proc p" in exI, simp)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    73
apply (erule exE|erule conjE)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    74
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    75
apply (drule_tac obj = obj in co2sobj_execve_alive, simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    76
apply (frule_tac obj = obj in co2sobj_execve, simp, simp)
75
chunhan
parents: 74
diff changeset
    77
apply (rule impI, simp, simp)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    78
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    79
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    80
lemma s2ss_clone_alive:
75
chunhan
parents: 74
diff changeset
    81
  "\<lbrakk>co2sobj s obj = Some x; alive s obj; obj \<noteq> O_proc p'; valid (Clone p p' fds # s)\<rbrakk>
chunhan
parents: 74
diff changeset
    82
   \<Longrightarrow> alive (Clone p p' fds # s) obj"
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    83
by (erule co2sobj_some_case, auto simp:alive_clone)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    84
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    85
lemma s2ss_clone:
75
chunhan
parents: 74
diff changeset
    86
  "valid (Clone p p' fds # s) \<Longrightarrow> s2ss (Clone p p' fds # s) = (
chunhan
parents: 74
diff changeset
    87
     case (cp2sproc (Clone p p' fds # s) p') of
chunhan
parents: 74
diff changeset
    88
       Some sp \<Rightarrow> s2ss s \<union> {S_proc sp (O_proc p \<in> tainted s)}
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    89
     | _       \<Rightarrow> {})"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    90
apply (frule vd_cons, frule vt_grant_os, split option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    91
apply (rule conjI, rule impI, drule current_proc_has_sp', simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    92
apply (rule allI, rule impI, simp add:s2ss_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    93
apply (rule set_eqI, rule iffI, drule CollectD, (erule exE|erule conjE)+)
75
chunhan
parents: 74
diff changeset
    94
apply (case_tac "obj = O_proc p'", simp)
chunhan
parents: 74
diff changeset
    95
apply (case_tac "O_proc p' \<in> tainted s", drule tainted_in_current, simp+)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    96
apply (rule disjI1, simp split:if_splits)
75
chunhan
parents: 74
diff changeset
    97
apply (simp, rule disjI2)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    98
apply (frule co2sobj_clone, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
    99
apply (rule_tac x = obj in exI, simp add:alive_simps split:t_object.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   100
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   101
apply (simp, erule disjE, simp)
75
chunhan
parents: 74
diff changeset
   102
apply (rule_tac x = "O_proc p'" in exI, simp)
chunhan
parents: 74
diff changeset
   103
apply (rule impI, rule notI, drule tainted_in_current, simp+)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   104
apply (erule exE| erule conjE)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   105
apply (case_tac "obj = O_proc p'", simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   106
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   107
apply (frule s2ss_clone_alive, simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   108
apply (auto simp:co2sobj_clone alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   109
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   110
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   111
lemma s2ss_shm_no_bk_intro4:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   112
  "\<lbrakk>co2sobj s (O_proc p) = Some x; info_flow_shm s pfrom p; 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   113
    \<not> info_flow_shm s pfrom p'; p' \<in> current_procs s; co2sobj s (O_proc p') = Some x\<rbrakk>
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   114
   \<Longrightarrow> x \<notin> s2ss_shm_no_backup s pfrom"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   115
apply (rule notI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   116
apply (auto simp add:s2ss_shm_no_backup_def co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   117
done  
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   118
75
chunhan
parents: 74
diff changeset
   119
lemma tainted_ptrace':
chunhan
parents: 74
diff changeset
   120
  "valid s \<Longrightarrow> tainted (Ptrace p p' # s) = 
chunhan
parents: 74
diff changeset
   121
     (if (O_proc p \<in> tainted s \<and> O_proc p' \<notin> tainted s)
chunhan
parents: 74
diff changeset
   122
      then tainted s \<union> {O_proc p'' | p''. info_flow_shm s p' p''}
chunhan
parents: 74
diff changeset
   123
      else if (O_proc p' \<in> tainted s \<and> O_proc p \<notin> tainted s)
chunhan
parents: 74
diff changeset
   124
           then tainted s \<union> {O_proc p'' | p''. info_flow_shm s p p''}
chunhan
parents: 74
diff changeset
   125
                else tainted s)"
chunhan
parents: 74
diff changeset
   126
using info_flow_shm_tainted by auto
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   127
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   128
lemma co2sobj_some_caseD:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   129
  "\<lbrakk>co2sobj s obj = Some sobj; \<And> p. \<lbrakk>co2sobj s obj = Some sobj; obj = O_proc p\<rbrakk> \<Longrightarrow> P (O_proc p);
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   130
    \<And> f. \<lbrakk>co2sobj s obj = Some sobj; obj = O_file f\<rbrakk> \<Longrightarrow> P (O_file f); 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   131
    \<And> h. \<lbrakk>co2sobj s obj = Some sobj; obj = O_shm h\<rbrakk> \<Longrightarrow> P (O_shm h);
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   132
    \<And> f. \<lbrakk>co2sobj s obj = Some sobj; obj = O_dir f\<rbrakk> \<Longrightarrow> P (O_dir f); 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   133
    \<And> q. \<lbrakk>co2sobj s obj = Some sobj; obj = O_msgq q\<rbrakk> \<Longrightarrow> P (O_msgq q)\<rbrakk>
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   134
   \<Longrightarrow> P obj"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   135
by (case_tac obj, auto)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   136
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   137
lemma s2ss_ptrace1_aux: "x \<notin> {x. P x} \<Longrightarrow> \<not> P x" by simp
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   138
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   139
lemma s2ss_ptrace1:
75
chunhan
parents: 74
diff changeset
   140
  "\<lbrakk>valid (Ptrace p p' # s); O_proc p \<in> tainted s; O_proc p' \<notin> tainted s\<rbrakk>
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   141
   \<Longrightarrow> s2ss (Ptrace p p' # s) = update_s2ss_shm s p'"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   142
unfolding update_s2ss_shm_def s2ss_def s2ss_shm_no_backup_def 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   143
apply (frule vd_cons, rule set_eqI, rule iffI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   144
apply (drule CollectD, (erule exE|erule conjE)+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   145
apply (erule co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   146
apply (rule DiffI)
75
chunhan
parents: 74
diff changeset
   147
apply (case_tac "O_proc pa \<in> tainted s")
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   148
apply (rule UnI1, simp, rule_tac x = "O_proc pa" in exI)
75
chunhan
parents: 74
diff changeset
   149
apply (clarsimp simp:tainted_ptrace' cp2sproc_other split:option.splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   150
apply (case_tac "info_flow_shm s p' pa")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   151
apply (rule UnI2, rule CollectI, simp only:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   152
apply (drule current_proc_has_sp', simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   153
apply (rule_tac x = a in exI, rule_tac x = pa in exI)
75
chunhan
parents: 74
diff changeset
   154
apply (clarsimp simp:tainted_ptrace' cp2sproc_other split:option.splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   155
apply (rule UnI1, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   156
apply (rule_tac x = "O_proc pa" in exI)
75
chunhan
parents: 74
diff changeset
   157
apply (clarsimp simp:tainted_ptrace' cp2sproc_other split:option.splits)
chunhan
parents: 74
diff changeset
   158
apply (rule notI, clarsimp simp:cp2sproc_other split:option.splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   159
apply (erule_tac x = pa in allE, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   160
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   161
apply (rule DiffI, rule UnI1, rule CollectI, rule_tac x = obj in exI,
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   162
       auto split:option.splits simp:co2sobj_ptrace alive_simps simp del:co2sobj.simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   163
apply (simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   164
apply (rule DiffI, rule UnI1, rule CollectI, rule_tac x = obj in exI,
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   165
       auto split:option.splits simp:co2sobj_ptrace alive_simps simp del:co2sobj.simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   166
apply (simp split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   167
apply (rule DiffI, rule UnI1, rule CollectI, rule_tac x = obj in exI,
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   168
       auto split:option.splits simp:co2sobj_ptrace alive_simps simp del:co2sobj.simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   169
apply (simp split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   170
apply (rule DiffI, rule UnI1, rule CollectI, rule_tac x = obj in exI,
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   171
       auto split:option.splits simp:co2sobj_ptrace alive_simps simp del:co2sobj.simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   172
apply (simp split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   173
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   174
apply (erule DiffE, drule s2ss_ptrace1_aux, erule UnE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   175
apply (erule CollectE, (erule exE|erule conjE)+, rule CollectI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   176
apply (erule co2sobj_some_caseD)
75
chunhan
parents: 74
diff changeset
   177
apply (case_tac "O_proc pa \<in> tainted s")
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   178
apply (rule_tac x = "O_proc pa" in exI)
75
chunhan
parents: 74
diff changeset
   179
apply (clarsimp simp cp2sproc_other split:option.splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   180
apply (case_tac "info_flow_shm s p' pa", simp only:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   181
apply (drule current_proc_has_sp', simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   182
apply (drule Meson.not_exD, erule_tac x = a in allE, drule Meson.not_exD, erule_tac x = pa in allE)
75
chunhan
parents: 74
diff changeset
   183
apply (simp, (erule exE|erule conjE)+)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   184
apply (rule_tac x = "O_proc p'a" in exI)
75
chunhan
parents: 74
diff changeset
   185
apply (clarsimp simp:tainted_ptrace' cp2sproc_other split:option.splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   186
apply (rule_tac x = "O_proc pa" in exI)
75
chunhan
parents: 74
diff changeset
   187
apply (clarsimp simp:tainted_ptrace' cp2sproc_other split:option.splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   188
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   189
apply (rule_tac x = obj in exI,
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   190
       auto split:option.splits simp:co2sobj_ptrace alive_simps simp del:co2sobj.simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   191
apply (rule_tac x = obj in exI,
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   192
       auto split:option.splits simp:co2sobj_ptrace alive_simps simp del:co2sobj.simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   193
apply (rule_tac x = obj in exI,
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   194
       auto split:option.splits simp:co2sobj_ptrace alive_simps simp del:co2sobj.simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   195
apply (rule_tac x = obj in exI,
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   196
       auto split:option.splits simp:co2sobj_ptrace alive_simps simp del:co2sobj.simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   197
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   198
apply (erule CollectE, (erule exE|erule conjE)+, rule CollectI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   199
apply (rule_tac x = "O_proc pa" in exI)
75
chunhan
parents: 74
diff changeset
   200
apply (clarsimp simp:tainted_ptrace' cp2sproc_other info_shm_flow_in_procs)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   201
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   202
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   203
lemma s2ss_ptrace2:
75
chunhan
parents: 74
diff changeset
   204
  "\<lbrakk>valid (Ptrace p p' # s); O_proc p' \<in> tainted s; O_proc p \<notin> tainted s\<rbrakk>
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   205
   \<Longrightarrow> s2ss (Ptrace p p' # s) = update_s2ss_shm s p"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   206
unfolding update_s2ss_shm_def s2ss_def s2ss_shm_no_backup_def
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   207
apply (frule vd_cons, rule set_eqI, rule iffI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   208
apply (drule CollectD, (erule exE|erule conjE)+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   209
apply (erule co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   210
apply (rule DiffI)
75
chunhan
parents: 74
diff changeset
   211
apply (case_tac "O_proc pa \<in> tainted s")
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   212
apply (rule UnI1, simp, rule_tac x = "O_proc pa" in exI)
75
chunhan
parents: 74
diff changeset
   213
apply (clarsimp simp:tainted_ptrace' cp2sproc_other split:option.splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   214
apply (case_tac "info_flow_shm s p pa")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   215
apply (rule UnI2, rule CollectI, simp only:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   216
apply (drule current_proc_has_sp', simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   217
apply (rule_tac x = a in exI, rule_tac x = pa in exI)
75
chunhan
parents: 74
diff changeset
   218
apply (clarsimp simp:tainted_ptrace' cp2sproc_other split:option.splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   219
apply (rule UnI1, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   220
apply (rule_tac x = "O_proc pa" in exI)
75
chunhan
parents: 74
diff changeset
   221
apply (clarsimp simp:tainted_ptrace' cp2sproc_other split:option.splits)
chunhan
parents: 74
diff changeset
   222
apply (rule notI, clarsimp simp:cp2sproc_other split:option.splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   223
apply (erule_tac x = pa in allE, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   224
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   225
apply (rule DiffI, rule UnI1, rule CollectI, rule_tac x = obj in exI,
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   226
       auto split:option.splits simp:co2sobj_ptrace alive_simps simp del:co2sobj.simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   227
apply (simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   228
apply (rule DiffI, rule UnI1, rule CollectI, rule_tac x = obj in exI,
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   229
       auto split:option.splits simp:co2sobj_ptrace alive_simps simp del:co2sobj.simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   230
apply (simp split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   231
apply (rule DiffI, rule UnI1, rule CollectI, rule_tac x = obj in exI,
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   232
       auto split:option.splits simp:co2sobj_ptrace alive_simps simp del:co2sobj.simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   233
apply (simp split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   234
apply (rule DiffI, rule UnI1, rule CollectI, rule_tac x = obj in exI,
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   235
       auto split:option.splits simp:co2sobj_ptrace alive_simps simp del:co2sobj.simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   236
apply (simp split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   237
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   238
apply (erule DiffE, drule s2ss_ptrace1_aux, erule UnE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   239
apply (erule CollectE, (erule exE|erule conjE)+, rule CollectI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   240
apply (erule co2sobj_some_caseD)
75
chunhan
parents: 74
diff changeset
   241
apply (case_tac "O_proc pa \<in> tainted s")
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   242
apply (rule_tac x = "O_proc pa" in exI)
75
chunhan
parents: 74
diff changeset
   243
apply (clarsimp simp cp2sproc_other split:option.splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   244
apply (case_tac "info_flow_shm s p pa", simp only:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   245
apply (drule current_proc_has_sp', simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   246
apply (drule Meson.not_exD, erule_tac x = a in allE, drule Meson.not_exD, erule_tac x = pa in allE)
75
chunhan
parents: 74
diff changeset
   247
apply (simp, (erule exE|erule conjE)+)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   248
apply (rule_tac x = "O_proc p'a" in exI)
75
chunhan
parents: 74
diff changeset
   249
apply (clarsimp simp:tainted_ptrace' cp2sproc_other split:option.splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   250
apply (rule_tac x = "O_proc pa" in exI)
75
chunhan
parents: 74
diff changeset
   251
apply (clarsimp simp:tainted_ptrace' cp2sproc_other split:option.splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   252
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   253
apply (rule_tac x = obj in exI,
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   254
       auto split:option.splits simp:co2sobj_ptrace alive_simps simp del:co2sobj.simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   255
apply (rule_tac x = obj in exI,
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   256
       auto split:option.splits simp:co2sobj_ptrace alive_simps simp del:co2sobj.simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   257
apply (rule_tac x = obj in exI,
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   258
       auto split:option.splits simp:co2sobj_ptrace alive_simps simp del:co2sobj.simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   259
apply (rule_tac x = obj in exI,
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   260
       auto split:option.splits simp:co2sobj_ptrace alive_simps simp del:co2sobj.simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   261
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   262
apply (erule CollectE, (erule exE|erule conjE)+, rule CollectI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   263
apply (rule_tac x = "O_proc pa" in exI)
75
chunhan
parents: 74
diff changeset
   264
apply (clarsimp simp:tainted_ptrace' cp2sproc_other info_shm_flow_in_procs)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   265
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   266
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   267
lemma s2ss_ptrace3:
75
chunhan
parents: 74
diff changeset
   268
  "\<lbrakk>valid (Ptrace p p' # s); (O_proc p' \<in> tainted s) = (O_proc p \<in> tainted s)\<rbrakk>
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   269
   \<Longrightarrow> s2ss (Ptrace p p' # s) = s2ss s"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   270
unfolding s2ss_def
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   271
apply (frule vd_cons, rule set_eqI, rule iffI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   272
apply (erule CollectE, (erule exE|erule conjE)+, rule CollectI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   273
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   274
apply (frule alive_other, simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   275
apply (frule_tac obj = obj in co2sobj_ptrace, simp)
75
chunhan
parents: 74
diff changeset
   276
apply (auto simp split:t_object.splits option.splits if_splits
chunhan
parents: 74
diff changeset
   277
  intro:info_flow_shm_tainted)[1]
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   278
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   279
apply (erule CollectE, (erule exE|erule conjE)+, rule CollectI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   280
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   281
apply (frule alive_other, simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   282
apply (frule_tac obj = obj in co2sobj_ptrace, simp)
75
chunhan
parents: 74
diff changeset
   283
apply (auto simp split:t_object.splits option.splits if_splits 
chunhan
parents: 74
diff changeset
   284
  intro:info_flow_shm_tainted)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   285
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   286
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   287
lemma s2ss_ptrace:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   288
  "valid (Ptrace p p' # s) \<Longrightarrow> s2ss (Ptrace p p' # s) = (
75
chunhan
parents: 74
diff changeset
   289
     if (O_proc p \<in> tainted s \<and> O_proc p' \<notin> tainted s) 
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   290
     then update_s2ss_shm s p'
75
chunhan
parents: 74
diff changeset
   291
     else if (O_proc p' \<in> tainted s \<and> O_proc p \<notin> tainted s)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   292
          then update_s2ss_shm s p
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   293
          else s2ss s                                   )"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   294
apply (frule vt_grant_os, frule vd_cons)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   295
apply (simp add:s2ss_ptrace2 s2ss_ptrace1 split:if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   296
by (auto dest:s2ss_ptrace3)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   297
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   298
lemma s2ss_kill:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   299
  "valid (Kill p p' # s) \<Longrightarrow> s2ss (Kill p p' # s) = (
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   300
     if (\<exists> p''. p'' \<in> current_procs s \<and> p'' \<noteq> p' \<and> co2sobj s (O_proc p'') = co2sobj s (O_proc p'))
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   301
     then s2ss s 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   302
     else (case (co2sobj s (O_proc p')) of
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   303
             Some sp \<Rightarrow> s2ss s - {sp}
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   304
           | _       \<Rightarrow> {}))"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   305
apply (frule vt_grant_os, frule vd_cons)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   306
unfolding s2ss_def
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   307
apply (simp split:if_splits, rule conjI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   308
apply (rule impI, (erule exE|erule conjE)+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   309
apply (split option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   310
apply (drule current_proc_has_sp', simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   311
apply (simp split: option.splits, (erule conjE)+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   312
apply (rule set_eqI, rule iffI, erule CollectE, (erule exE|erule conjE)+, rule CollectI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   313
apply (rule_tac x = obj in exI)
75
chunhan
parents: 74
diff changeset
   314
apply (simp add:co2sobj_kill alive_kill split:t_object.splits if_splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   315
apply (erule CollectE, erule exE, erule conjE, rule CollectI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   316
apply (erule co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   317
apply (case_tac "pa = p'")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   318
apply (rule_tac x = "O_proc p''" in exI)
75
chunhan
parents: 74
diff changeset
   319
apply (simp add:cp2sproc_kill alive_kill
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   320
  split:t_object.splits if_splits option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   321
apply (rule_tac x = "O_proc pa" in exI)
75
chunhan
parents: 74
diff changeset
   322
apply (clarsimp simp add:cp2sproc_kill alive_kill
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   323
  split:t_object.splits if_splits option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   324
apply (rule_tac x = obj in exI, frule alive_kill, simp add:co2sobj_kill del:co2sobj.simps)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   325
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   326
apply (rule impI, erule conjE, frule current_proc_has_sp, simp, erule exE, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   327
apply (rule set_eqI, rule iffI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   328
apply (erule CollectE, erule exE, erule conjE, rule DiffI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   329
apply (rule CollectI, rule_tac x = obj in exI)
75
chunhan
parents: 74
diff changeset
   330
apply (simp add:co2sobj_kill alive_kill split:t_object.splits if_splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   331
apply (rule notI, simp, case_tac obj)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   332
apply (erule_tac x = nat in allE)
75
chunhan
parents: 74
diff changeset
   333
apply (simp add:co2sobj_kill cp2sproc_kill split:option.splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   334
apply (simp split:option.splits)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   335
apply (erule co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   336
apply (case_tac "pa = p'")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   337
apply (rule_tac x = "O_proc p''" in exI)
75
chunhan
parents: 74
diff changeset
   338
apply (simp add:cp2sproc_kill alive_kill
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   339
  split:t_object.splits if_splits option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   340
apply (rule_tac x = "O_proc pa" in exI)
75
chunhan
parents: 74
diff changeset
   341
apply (clarsimp simp add:cp2sproc_kill alive_kill
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   342
  split:t_object.splits if_splits option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   343
apply (rule_tac x = obj in exI, frule alive_kill, simp add:co2sobj_kill del:co2sobj.simps)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   344
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   345
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   346
lemma s2ss_exit:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   347
  "valid (Exit p # s) \<Longrightarrow> s2ss (Exit p # s) = (
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   348
     if (\<exists> p'. p' \<in> current_procs s \<and> p' \<noteq> p \<and> co2sobj s (O_proc p') = co2sobj s (O_proc p))
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   349
     then s2ss s 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   350
     else (case (co2sobj s (O_proc p)) of
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   351
             Some sp \<Rightarrow> s2ss s - {sp}
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   352
           | _       \<Rightarrow> {}))"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   353
apply (frule vt_grant_os, frule vd_cons)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   354
unfolding s2ss_def
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   355
apply (simp split:if_splits, rule conjI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   356
apply (rule impI, (erule exE|erule conjE)+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   357
apply (split option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   358
apply (drule current_proc_has_sp', simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   359
apply (simp split: option.splits, (erule conjE)+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   360
apply (rule set_eqI, rule iffI, erule CollectE, (erule exE|erule conjE)+, rule CollectI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   361
apply (rule_tac x = obj in exI)
75
chunhan
parents: 74
diff changeset
   362
apply (simp add:co2sobj_exit alive_exit split:t_object.splits if_splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   363
apply (erule CollectE, erule exE, erule conjE, rule CollectI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   364
apply (erule co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   365
apply (case_tac "pa = p")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   366
apply (rule_tac x = "O_proc p'" in exI)
75
chunhan
parents: 74
diff changeset
   367
apply (simp add:cp2sproc_exit alive_exit
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   368
  split:t_object.splits if_splits option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   369
apply (rule_tac x = "O_proc pa" in exI)
75
chunhan
parents: 74
diff changeset
   370
apply (clarsimp simp add:cp2sproc_exit alive_exit
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   371
  split:t_object.splits if_splits option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   372
apply (rule_tac x = obj in exI, frule alive_exit, simp add:co2sobj_exit del:co2sobj.simps)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   373
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   374
apply (rule impI, frule current_proc_has_sp, simp, erule exE, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   375
apply (rule set_eqI, rule iffI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   376
apply (erule CollectE, erule exE, erule conjE, rule DiffI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   377
apply (rule CollectI, rule_tac x = obj in exI)
75
chunhan
parents: 74
diff changeset
   378
apply (simp add:co2sobj_exit alive_exit split:t_object.splits if_splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   379
apply (rule notI, simp, case_tac obj)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   380
apply (erule_tac x = nat in allE)
75
chunhan
parents: 74
diff changeset
   381
apply (simp add:co2sobj_exit cp2sproc_exit split:option.splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   382
apply (simp split:option.splits)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   383
apply (erule co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   384
apply (case_tac "pa = p")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   385
apply (rule_tac x = "O_proc p'" in exI)
75
chunhan
parents: 74
diff changeset
   386
apply (simp add:cp2sproc_exit alive_exit
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   387
  split:t_object.splits if_splits option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   388
apply (rule_tac x = "O_proc pa" in exI)
75
chunhan
parents: 74
diff changeset
   389
apply (clarsimp simp add:cp2sproc_exit alive_exit
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   390
  split:t_object.splits if_splits option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   391
apply (rule_tac x = obj in exI, frule alive_exit, simp add:co2sobj_exit del:co2sobj.simps)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   392
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   393
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   394
lemma alive_has_sobj':
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   395
  "\<lbrakk>co2sobj s obj = None; valid s\<rbrakk> \<Longrightarrow> \<not> alive s obj"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   396
apply (case_tac obj)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   397
apply (auto split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   398
oops
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   399
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   400
declare co2sobj.simps [simp del]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   401
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   402
lemma co2sobj_open_none:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   403
  "\<lbrakk>valid (Open p f flag fd None # s); alive s obj\<rbrakk> \<Longrightarrow> co2sobj (Open p f flag fd None # s) obj = (
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   404
      if (obj = O_proc p) 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   405
      then (case (cp2sproc (Open p f flag fd None # s) p) of
75
chunhan
parents: 74
diff changeset
   406
              Some sp \<Rightarrow> Some (S_proc sp (O_proc p \<in> tainted s))
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   407
           | _       \<Rightarrow> None)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   408
      else co2sobj s obj)"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   409
apply (frule vt_grant_os, frule vd_cons)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   410
apply (frule_tac obj = obj in co2sobj_open, simp add:alive_open)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   411
apply (auto split:t_object.splits option.splits dest!:current_proc_has_sp')
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   412
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   413
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   414
lemma co2sobj_open_some:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   415
  "\<lbrakk>valid (Open p f flag fd (Some i) # s); alive s obj\<rbrakk> \<Longrightarrow> co2sobj (Open p f flag fd (Some i) # s) obj = (
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   416
      if (obj = O_proc p) 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   417
      then (case (cp2sproc (Open p f flag fd (Some i) # s) p) of
75
chunhan
parents: 74
diff changeset
   418
              Some sp \<Rightarrow> Some (S_proc sp (O_proc p \<in> tainted s))
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   419
           | _       \<Rightarrow> None)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   420
      else if (obj = O_file f) 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   421
           then (case (cf2sfile (Open p f flag fd (Some i) # s) f) of
75
chunhan
parents: 74
diff changeset
   422
                   Some sf \<Rightarrow> Some (S_file {sf} (O_proc p \<in> tainted s))
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   423
                 | _       \<Rightarrow> None)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   424
           else co2sobj s obj)"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   425
apply (frule vt_grant_os, frule vd_cons)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   426
apply (frule_tac obj = obj in co2sobj_open, simp add:alive_open)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   427
apply (auto split:t_object.splits option.splits dest!:current_proc_has_sp')
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   428
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   429
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   430
lemma alive_co2sobj_some_open_none:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   431
  "\<lbrakk>co2sobj s obj = Some sobj; alive s obj; valid (Open p f flag fd None # s)\<rbrakk>
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   432
   \<Longrightarrow> alive (Open p f flag fd None # s) obj"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   433
by (erule co2sobj_some_caseD, auto simp:alive_simps is_file_simps is_dir_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   434
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   435
lemma alive_co2sobj_some_open_none':
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   436
  "\<lbrakk>co2sobj (Open p f flag fd None # s) obj = Some sobj; alive (Open p f flag fd None # s) obj; 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   437
    valid (Open p f flag fd None # s)\<rbrakk> \<Longrightarrow> alive s obj"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   438
by (erule co2sobj_some_caseD, auto simp:alive_simps is_file_simps is_dir_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   439
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   440
lemma co2sobj_proc_obj:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   441
  "\<lbrakk>co2sobj s obj = Some x; co2sobj s (O_proc p) = Some x\<rbrakk>
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   442
   \<Longrightarrow> \<exists> p'. obj = O_proc p'"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   443
by (case_tac obj, auto simp:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   444
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   445
lemma s2ss_open_none:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   446
  "valid (Open p f flag fd None # s) \<Longrightarrow> s2ss (Open p f flag fd None # s) = (
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   447
      case (co2sobj s (O_proc p), co2sobj (Open p f flag fd None # s) (O_proc p)) of
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   448
        (Some sp, Some sp') \<Rightarrow> 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   449
           if (\<exists> p'. p' \<in> current_procs s \<and> p' \<noteq> p \<and> co2sobj s (O_proc p') = Some sp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   450
           then s2ss s \<union> {sp'}
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   451
           else s2ss s - {sp} \<union> {sp'} 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   452
      | _                   \<Rightarrow> {} )"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   453
unfolding s2ss_def
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   454
apply (frule vt_grant_os, frule vd_cons)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   455
apply (case_tac "co2sobj s (O_proc p)", simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   456
apply (drule current_proc_has_sp', simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   457
apply (case_tac "co2sobj (Open p f flag fd None # s) (O_proc p)")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   458
apply (simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   459
apply (drule current_proc_has_sp', simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   460
apply (rule set_eqI, rule iffI, erule CollectE, erule exE, erule conjE, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   461
apply (frule_tac obj = obj in alive_co2sobj_some_open_none', simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   462
apply (rule conjI, rule impI, erule exE, (erule conjE)+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   463
apply (rule Meson.disj_comm, rule disjCI, case_tac "obj = O_proc p", simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   464
apply (rule_tac x = obj in exI, simp add:co2sobj_open_none)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   465
apply (rule impI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   466
apply (case_tac "obj = O_proc p", simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   467
apply (rule Meson.disj_comm, rule disjCI, rule conjI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   468
apply (rule_tac x = obj in exI, simp add:co2sobj_open_none)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   469
apply (simp add:co2sobj_open_none split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   470
apply (rule notI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   471
apply (frule co2sobj_proc_obj, simp, erule exE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   472
apply (erule_tac x = p' in allE, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   473
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   474
apply (simp split:if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   475
apply (erule disjE, rule_tac x = "O_proc p" in exI, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   476
apply (erule exE, erule conjE, case_tac "obj = O_proc p")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   477
apply (rule_tac x = "O_proc p'" in exI, simp add:co2sobj_open_none)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   478
apply (rule_tac x = obj in exI, simp add:co2sobj_open_none alive_co2sobj_some_open_none)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   479
apply (erule disjE, rule_tac x = "O_proc p" in exI, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   480
apply (erule conjE, erule exE, erule conjE, case_tac "obj = O_proc p")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   481
apply (rule_tac x = "O_proc p'" in exI, simp add:co2sobj_open_none)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   482
apply (rule_tac x = obj in exI, simp add:co2sobj_open_none alive_co2sobj_some_open_none)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   483
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   484
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   485
lemma alive_co2sobj_some_open_some:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   486
  "\<lbrakk>alive s obj; valid (Open p f flag fd (Some i) # s)\<rbrakk>
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   487
   \<Longrightarrow> alive (Open p f flag fd (Some i) # s) obj"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   488
by (case_tac obj, auto simp:alive_simps is_file_simps is_dir_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   489
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   490
lemma alive_co2sobj_some_open_some':
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   491
  "\<lbrakk>co2sobj (Open p f flag fd (Some i) # s) obj = Some sobj; alive (Open p f flag fd (Some i) # s) obj; 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   492
    valid (Open p f flag fd (Some i) # s); obj \<noteq> O_file f\<rbrakk> \<Longrightarrow> alive s obj"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   493
by (erule co2sobj_some_caseD, auto simp:alive_simps is_file_simps is_dir_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   494
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   495
lemma s2ss_open_some:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   496
  "valid (Open p f flag fd (Some i) # s) \<Longrightarrow> s2ss (Open p f flag fd (Some i) # s) = (
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   497
      case (co2sobj s (O_proc p), co2sobj (Open p f flag fd (Some i) # s) (O_proc p),
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   498
            co2sobj (Open p f flag fd (Some i) # s) (O_file f)) of
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   499
        (Some sp, Some sp', Some sf) \<Rightarrow> 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   500
           if (\<exists> p'. p' \<in> current_procs s \<and> p' \<noteq> p \<and> co2sobj s (O_proc p') = Some sp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   501
           then s2ss s \<union> {sp', sf} 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   502
           else s2ss s - {sp} \<union> {sp', sf} 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   503
      | _                   \<Rightarrow> {} )"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   504
unfolding s2ss_def
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   505
apply (frule vt_grant_os, frule vd_cons)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   506
apply (case_tac "co2sobj s (O_proc p)", simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   507
apply (drule current_proc_has_sp', simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   508
apply (case_tac "co2sobj (Open p f flag fd (Some i) # s) (O_proc p)")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   509
apply (simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   510
apply (drule current_proc_has_sp', simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   511
apply (case_tac "co2sobj (Open p f flag fd (Some i) # s) (O_file f)")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   512
apply (simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   513
apply (clarsimp split del:if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   514
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   515
apply (rule set_eqI, rule iffI, erule CollectE, erule exE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   516
apply (split if_splits, rule conjI, rule impI, erule exE, erule conjE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   517
apply (case_tac "obj = O_proc p", simp, case_tac "obj = O_file f", simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   518
apply (rule UnI1, rule CollectI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   519
apply (frule_tac obj = obj in alive_co2sobj_some_open_some', simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   520
apply (simp add:co2sobj_open split:t_object.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   521
apply (rule impI, case_tac "obj = O_proc p", simp, case_tac "obj = O_file f", simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   522
apply (rule UnI1, rule DiffI, rule CollectI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   523
apply (frule_tac obj = obj in alive_co2sobj_some_open_some', simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   524
apply (simp add:co2sobj_open split:t_object.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   525
apply (frule_tac obj = obj in co2sobj_open_some, simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   526
apply (simp add:alive_co2sobj_some_open_some', simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   527
apply (rule notI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   528
apply (frule_tac obj = obj and p = p in co2sobj_proc_obj, simp+, erule exE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   529
apply (erule_tac x = p' in allE, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   530
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   531
apply (simp split:if_splits, erule disjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   532
apply (rule_tac x = "O_proc p" in exI, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   533
apply (erule disjE, rule_tac x = "O_file f" in exI, simp add:is_file_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   534
apply (erule exE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   535
apply (case_tac "obj = O_proc p", simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   536
apply (rule_tac x = "O_proc p'" in exI, simp add:co2sobj_open_some)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   537
apply (case_tac "obj = O_file f", simp add:is_file_in_current)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   538
apply (rule_tac x = obj in exI, simp add:co2sobj_open_some alive_co2sobj_some_open_some)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   539
apply (erule disjE, rule_tac x = "O_proc p" in exI, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   540
apply (erule disjE, rule_tac x = "O_file f" in exI, simp add:is_file_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   541
apply (erule conjE, erule exE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   542
apply (case_tac "obj = O_proc p", simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   543
apply (case_tac "obj = O_file f", simp add:is_file_in_current)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   544
apply (rule_tac x = obj in exI, simp add:co2sobj_open_some alive_co2sobj_some_open_some)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   545
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   546
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   547
lemma s2ss_open:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   548
  "valid (Open p f flag fd opt # s) \<Longrightarrow> s2ss (Open p f flag fd opt # s) = (
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   549
     if opt = None
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   550
     then (case (co2sobj s (O_proc p), co2sobj (Open p f flag fd opt # s) (O_proc p)) of
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   551
        (Some sp, Some sp') \<Rightarrow> 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   552
           if (\<exists> p'. p' \<in> current_procs s \<and> p' \<noteq> p \<and> co2sobj s (O_proc p') = Some sp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   553
           then s2ss s \<union> {sp'}
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   554
           else s2ss s - {sp} \<union> {sp'} 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   555
      | _                   \<Rightarrow> {} )
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   556
     else (case (co2sobj s (O_proc p), co2sobj (Open p f flag fd opt # s) (O_proc p),
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   557
            co2sobj (Open p f flag fd opt # s) (O_file f)) of
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   558
        (Some sp, Some sp', Some sf) \<Rightarrow> 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   559
           if (\<exists> p'. p' \<in> current_procs s \<and> p' \<noteq> p \<and> co2sobj s (O_proc p') = Some sp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   560
           then s2ss s \<union> {sp', sf} 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   561
           else s2ss s - {sp} \<union> {sp', sf} 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   562
      | _                   \<Rightarrow> {} ) )"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   563
apply (case_tac opt)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   564
apply (simp add:s2ss_open_some s2ss_open_none)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   565
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   566
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   567
lemma s2ss_readfile:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   568
  "valid (ReadFile p fd # s) \<Longrightarrow> s2ss (ReadFile p fd # s) = (
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   569
     case (file_of_proc_fd s p fd) of 
75
chunhan
parents: 74
diff changeset
   570
       Some f \<Rightarrow> if (O_file f \<in> tainted s)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   571
                 then update_s2ss_shm s p
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   572
                 else s2ss s
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   573
     | _      \<Rightarrow> {})"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   574
apply (frule vt_grant_os, frule vd_cons, clarsimp split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   575
apply (rule conjI, rule impI, rule impI, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   576
unfolding update_s2ss_shm_def s2ss_def s2ss_shm_no_backup_def
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   577
apply (rule set_eqI, rule iffI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   578
apply (drule CollectD, (erule exE|erule conjE)+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   579
apply (erule co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   580
apply (rule DiffI)
75
chunhan
parents: 74
diff changeset
   581
apply (case_tac "O_proc pa \<in> tainted s")
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   582
apply (rule UnI1, simp, rule_tac x = "O_proc pa" in exI)
75
chunhan
parents: 74
diff changeset
   583
apply (clarsimp simp:cp2sproc_other co2sobj.simps split:option.splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   584
apply (case_tac "info_flow_shm s p pa")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   585
apply (rule UnI2, rule CollectI, simp only:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   586
apply (drule current_proc_has_sp', simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   587
apply (rule_tac x = ab in exI, rule_tac x = pa in exI)
75
chunhan
parents: 74
diff changeset
   588
apply (clarsimp simp:cp2sproc_other split:option.splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   589
apply (rule UnI1, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   590
apply (rule_tac x = "O_proc pa" in exI)
75
chunhan
parents: 74
diff changeset
   591
apply (clarsimp simp:cp2sproc_other co2sobj.simps split:option.splits)
chunhan
parents: 74
diff changeset
   592
apply (rule notI, clarsimp simp:cp2sproc_other co2sobj.simps split:option.splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   593
apply (erule_tac x = pa in allE, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   594
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   595
apply (rule DiffI, rule UnI1, rule CollectI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   596
apply (simp add:alive_simps co2sobj_readfile, rule notI, clarsimp simp:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   597
apply (rule DiffI, rule UnI1, rule CollectI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   598
apply (simp add:alive_simps co2sobj_readfile, rule notI, clarsimp simp:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   599
apply (rule DiffI, rule UnI1, rule CollectI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   600
apply (simp add:alive_simps co2sobj_readfile, rule notI, clarsimp simp:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   601
apply (rule DiffI, rule UnI1, rule CollectI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   602
apply (simp add:alive_simps co2sobj_readfile, rule notI, clarsimp simp:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   603
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   604
apply (erule DiffE, drule s2ss_ptrace1_aux, erule UnE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   605
apply (erule CollectE, (erule exE|erule conjE)+, rule CollectI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   606
apply (erule co2sobj_some_caseD)
75
chunhan
parents: 74
diff changeset
   607
apply (case_tac "O_proc pa \<in> tainted s")
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   608
apply (rule_tac x = "O_proc pa" in exI)
75
chunhan
parents: 74
diff changeset
   609
apply (clarsimp simp:tainted_eq_tainted cp2sproc_other co2sobj.simps split:option.splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   610
apply (case_tac "info_flow_shm s p pa", simp only:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   611
apply (drule current_proc_has_sp', simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   612
apply (drule Meson.not_exD, erule_tac x = ab in allE, drule Meson.not_exD, erule_tac x = pa in allE)
75
chunhan
parents: 74
diff changeset
   613
apply (simp, (erule exE|erule conjE)+)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   614
apply (rule_tac x = "O_proc p'" in exI)
75
chunhan
parents: 74
diff changeset
   615
apply (clarsimp simp:tainted_ptrace' cp2sproc_other co2sobj.simps split:option.splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   616
apply (rule_tac x = "O_proc pa" in exI)
75
chunhan
parents: 74
diff changeset
   617
apply (clarsimp simp:tainted_ptrace' cp2sproc_other co2sobj.simps split:option.splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   618
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   619
apply (rule_tac x = obj in exI,
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   620
       auto split:option.splits simp:co2sobj_readfile alive_simps simp del:co2sobj.simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   621
apply (rule_tac x = obj in exI,
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   622
       auto split:option.splits simp:co2sobj_readfile alive_simps simp del:co2sobj.simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   623
apply (rule_tac x = obj in exI,
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   624
       auto split:option.splits simp:co2sobj_readfile alive_simps simp del:co2sobj.simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   625
apply (rule_tac x = obj in exI,
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   626
       auto split:option.splits simp:co2sobj_readfile alive_simps simp del:co2sobj.simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   627
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   628
apply (erule CollectE, (erule exE|erule conjE)+, rule CollectI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   629
apply (rule_tac x = "O_proc pa" in exI)
75
chunhan
parents: 74
diff changeset
   630
apply (clarsimp simp:tainted_ptrace' cp2sproc_other info_shm_flow_in_procs co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   631
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   632
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   633
apply (rule impI, rule impI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   634
apply (rule set_eqI, rule iffI, erule CollectE, erule exE, erule conjE, rule CollectI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   635
apply (rule_tac x = obj in exI, simp add:alive_simps co2sobj_readfile split:t_object.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   636
apply (erule CollectE, erule exE, erule conjE, rule CollectI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   637
apply (rule_tac x = obj in exI, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   638
apply (drule_tac obj = obj in co2sobj_readfile, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   639
apply (simp split:t_object.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   640
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   641
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   642
lemma same_inode_files_prop9:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   643
  "is_file s f \<Longrightarrow> f \<in> same_inode_files s f"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   644
by (simp add:same_inode_files_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   645
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   646
lemma cf2sfiles_prop:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   647
  "\<lbrakk>f \<in> same_inode_files s f'; valid s\<rbrakk> \<Longrightarrow> cf2sfiles s f = cf2sfiles s f'"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   648
apply (auto simp:cf2sfiles_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   649
apply (rule_tac x = f'a in bexI, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   650
apply (erule same_inode_files_prop4, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   651
apply (rule_tac x = f'a in bexI, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   652
apply (drule same_inode_files_prop5)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   653
apply (erule same_inode_files_prop4, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   654
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   655
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   656
lemma co2sobj_writefile_unchange:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   657
  "\<lbrakk>valid (WriteFile p fd # s); alive s obj; file_of_proc_fd s p fd = Some f;
75
chunhan
parents: 74
diff changeset
   658
    O_proc p \<in> tainted s \<longrightarrow> O_file f \<in> tainted s\<rbrakk> 
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   659
   \<Longrightarrow> co2sobj (WriteFile p fd # s) obj = co2sobj s obj"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   660
apply (frule vd_cons, frule co2sobj_writefile, simp, simp split:t_object.splits if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   661
apply (simp add:co2sobj.simps)
75
chunhan
parents: 74
diff changeset
   662
apply (case_tac "O_proc p \<in> tainted s")
chunhan
parents: 74
diff changeset
   663
apply (simp same_inodes_tainted)+
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   664
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   665
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   666
lemma s2ss_writefile:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   667
  "valid (WriteFile p fd # s) \<Longrightarrow> s2ss (WriteFile p fd # s) = (
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   668
     case (file_of_proc_fd s p fd) of
75
chunhan
parents: 74
diff changeset
   669
       Some f \<Rightarrow> if (O_proc p \<in> tainted s \<and> O_file f \<notin> tainted s)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   670
                 then (if (\<exists> f'. f' \<notin> same_inode_files s f \<and> is_file s f' \<and>
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   671
                                 co2sobj s (O_file f') = co2sobj s (O_file f))
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   672
                       then s2ss s \<union> {S_file (cf2sfiles s f) True}
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   673
                       else s2ss s - {S_file (cf2sfiles s f) False} 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   674
                                   \<union> {S_file (cf2sfiles s f) True})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   675
                 else s2ss s
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   676
     | _      \<Rightarrow> {})"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   677
apply (frule vd_cons, frule vt_grant_os)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   678
apply (clarsimp split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   679
unfolding s2ss_def
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   680
apply (rule conjI|rule impI|erule exE|erule conjE)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   681
apply (rule set_eqI, rule iffI, erule CollectE, erule exE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   682
apply (frule_tac obj =  obj in co2sobj_writefile, simp add:alive_other)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   683
apply (simp split:t_object.splits if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   684
apply (rule disjI2, rule_tac x= "O_proc nat" in exI, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   685
apply (rule disjI1, simp add:cf2sfiles_prop)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   686
apply (rule disjI2, rule_tac x = obj in exI, simp add:is_file_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   687
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   688
apply (rule disjI2, rule_tac x = obj in exI, simp add:is_dir_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   689
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   690
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   691
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   692
apply (rule disjI2, rule_tac x = obj in exI, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   693
apply (rule disjI2, rule_tac x = obj in exI, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   694
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   695
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   696
apply (simp, erule disjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   697
apply (rule_tac x = "O_file aa" in exI, simp add:is_file_simps file_of_pfd_is_file)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   698
apply (frule_tac obj = "O_file aa" in co2sobj_writefile, simp add:file_of_pfd_is_file)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   699
apply (simp split:if_splits add:same_inode_files_def file_of_pfd_is_file)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   700
apply (erule exE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   701
apply (erule_tac obj = obj in co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   702
apply (rule_tac x = obj in exI, simp add:co2sobj_writefile)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   703
apply (case_tac "fa \<in> same_inode_files s aa")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   704
apply (frule_tac f = fa and f' = aa in cf2sfiles_prop, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   705
apply (rule_tac x = "O_file f'" in exI, simp add:co2sobj_writefile is_file_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   706
apply (rule conjI, rule impI, simp add:same_inode_files_prop5)
75
chunhan
parents: 74
diff changeset
   707
apply (rule impI, simp add:co2sobj.simps same_inodes_tainted)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   708
apply (rule_tac x = "O_file fa" in exI, simp add:co2sobj_writefile is_file_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   709
apply (rule impI, simp add:same_inode_files_prop5)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   710
apply (rule_tac x = obj in exI, simp add:co2sobj_writefile)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   711
apply (rule_tac x = obj in exI, simp add:co2sobj_writefile is_dir_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   712
apply (rule_tac x = obj in exI, simp add:co2sobj_writefile)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   713
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   714
apply (rule impI, rule impI, simp, rule set_eqI, rule iffI, erule CollectE, (erule conjE|erule exE)+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   715
apply (rule CollectI, rule_tac x = obj in exI, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   716
apply (simp add:co2sobj_writefile split:t_object.splits if_splits)
75
chunhan
parents: 74
diff changeset
   717
apply (simp add:co2sobj.simps same_inodes_tainted)
chunhan
parents: 74
diff changeset
   718
apply (case_tac "O_proc p \<in> tainted s", simp, simp)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   719
apply (erule CollectE, (erule conjE|erule exE)+, rule CollectI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   720
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   721
apply (simp add:co2sobj_writefile_unchange alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   722
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   723
apply (rule impI| rule conjI|erule conjE)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   724
apply (rule set_eqI, rule iffI, erule CollectE, erule exE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   725
apply (simp add:alive_simps co2sobj_writefile split:t_object.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   726
apply (rule disjI2, rule conjI, rule_tac x = obj in exI, simp,
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   727
  rule notI, simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   728
apply (simp split:if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   729
apply (rule disjI1, simp add:cf2sfiles_prop)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   730
apply (rule disjI2, rule conjI, rule_tac x = obj in exI, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   731
apply (rule notI, simp add:co2sobj.simps split:option.splits)
75
chunhan
parents: 74
diff changeset
   732
apply (erule_tac x = list in allE, simp same_inode_files_prop5)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   733
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   734
apply (rule disjI2, rule conjI, rule_tac x = obj in exI, simp,
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   735
  rule notI, simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   736
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   737
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   738
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   739
apply (rule disjI2, rule conjI, rule_tac x = obj in exI, simp,
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   740
  rule notI, simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   741
apply (rule disjI2, rule conjI, rule_tac x = obj in exI, simp,
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   742
  rule notI, simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   743
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   744
apply (simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   745
apply (erule disjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   746
apply (rule_tac x= "O_file aa" in exI, simp add:co2sobj_writefile alive_simps file_of_pfd_is_file)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   747
apply (rule impI, simp add:same_inode_files_def file_of_pfd_is_file)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   748
apply (erule exE|erule conjE)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   749
apply (erule co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   750
apply (rule_tac x = obj in exI, simp add:co2sobj_writefile)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   751
apply (case_tac "fa \<in> same_inode_files s aa")
75
chunhan
parents: 74
diff changeset
   752
apply (frule cf2sfiles_prop, simp, simp add:co2sobj.simps same_inodes_tainted)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   753
apply (rule_tac x = obj in exI, simp add:co2sobj_writefile is_file_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   754
apply (rule impI, simp add:same_inode_files_prop5)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   755
apply (rule_tac x = obj in exI, simp add:co2sobj_writefile)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   756
apply (rule_tac x = obj in exI, simp add:co2sobj_writefile is_dir_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   757
apply (rule_tac x = obj in exI, simp add:co2sobj_writefile)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   758
apply (rule impI, rule impI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   759
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   760
apply (rule set_eqI, rule iffI, erule CollectE,erule exE,erule conjE,rule CollectI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   761
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   762
apply (simp add:co2sobj_writefile_unchange alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   763
apply (erule CollectE, erule exE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   764
apply (rule CollectI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   765
apply (simp add:co2sobj_writefile_unchange alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   766
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   767
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   768
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   769
definition update_s2ss_obj :: "t_state \<Rightarrow> t_static_state \<Rightarrow> t_object \<Rightarrow> t_sobject \<Rightarrow> t_sobject \<Rightarrow> t_static_state"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   770
where
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   771
  "update_s2ss_obj s ss obj sobj sobj' = 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   772
     (if (\<exists> obj'. alive s obj' \<and> obj' \<noteq> obj \<and> co2sobj s obj' = Some sobj)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   773
      then ss \<union> {sobj'}
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   774
      else ss - {sobj} \<union> {sobj'})"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   775
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   776
definition update_s2ss_sfile_del :: "t_state \<Rightarrow> t_static_state \<Rightarrow> t_file \<Rightarrow> t_sfile \<Rightarrow> t_static_state"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   777
where 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   778
  "update_s2ss_sfile_del s ss f sf \<equiv> 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   779
     if (same_inode_files s f = {f})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   780
     then ss
75
chunhan
parents: 74
diff changeset
   781
     else ss \<union> {S_file (cf2sfiles s f - {sf}) (O_file f \<in> tainted s)}"
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   782
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   783
definition del_s2ss_file:: "t_state \<Rightarrow> t_static_state \<Rightarrow> t_file \<Rightarrow> t_sfile \<Rightarrow> t_static_state"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   784
where
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   785
  "del_s2ss_file s ss f sf = 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   786
     (if (\<exists> f' \<in> same_inode_files s f. f' \<noteq> f \<and> cf2sfile s f' = Some sf)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   787
      then ss
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   788
      else if (\<exists> f'. is_file s f' \<and> f' \<notin> same_inode_files s f \<and> co2sobj s (O_file f') = co2sobj s (O_file f))
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   789
           then update_s2ss_sfile_del s ss f sf
75
chunhan
parents: 74
diff changeset
   790
           else update_s2ss_sfile_del s (ss - {S_file (cf2sfiles s f) (O_file f \<in> tainted s)}) f sf)"
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   791
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   792
lemma alive_co2sobj_closefd1:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   793
  "\<lbrakk>alive s obj; valid (CloseFd p fd # s); co2sobj s obj = Some sobj; 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   794
    file_of_proc_fd s p fd = Some f; \<not> (f \<in> files_hung_by_del s \<and> proc_fd_of_file s f = {(p, fd)})\<rbrakk>
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   795
   \<Longrightarrow> alive (CloseFd p fd # s) obj"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   796
apply (erule co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   797
by (auto simp:alive_simps is_file_simps is_dir_simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   798
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   799
lemma alive_co2sobj_closefd3:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   800
  "\<lbrakk>alive s obj; valid (CloseFd p fd # s); co2sobj s obj = Some sobj; obj \<noteq> O_file f;
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   801
    file_of_proc_fd s p fd = Some f; f \<in> files_hung_by_del s; proc_fd_of_file s f = {(p, fd)}\<rbrakk>
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   802
   \<Longrightarrow> alive (CloseFd p fd # s) obj"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   803
apply (erule co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   804
by (auto simp:alive_simps is_file_simps is_dir_simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   805
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   806
lemma alive_co2sobj_closefd2:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   807
  "\<lbrakk>alive s obj; valid (CloseFd p fd # s); co2sobj s obj = Some sobj; file_of_proc_fd s p fd = None\<rbrakk>
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   808
   \<Longrightarrow> alive (CloseFd p fd # s) obj"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   809
apply (erule co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   810
by (auto simp:alive_simps is_file_simps is_dir_simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   811
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   812
lemma alive_co2sobj_closefd':
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   813
  "\<lbrakk>co2sobj (CloseFd p fd # s) obj = Some sobj; alive (CloseFd p fd # s) obj; 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   814
    valid (CloseFd p fd # s)\<rbrakk> \<Longrightarrow> alive s obj"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   815
apply (erule co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   816
by (auto simp:alive_simps is_file_simps is_dir_simps split:option.splits if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   817
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   818
ML {*asm_full_simp_tac*}
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   819
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   820
ML {*
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   821
fun my_setiff_tac i = 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   822
     (etac @{thm CollectE} i 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   823
      ORELSE (     asm_full_simp_tac (HOL_ss addsimps @{thms Set.insert_iff}) i
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   824
              THEN etac @{thm disjE} i)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   825
      ORELSE (     asm_full_simp_tac (HOL_ss addsimps @{thms Set.Diff_iff}) i
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   826
              THEN etac @{thm conjE} i 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   827
              THEN (REPEAT (etac @{thm CollectE} i))))
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   828
THEN (REPEAT ((        etac @{thm exE} 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   829
               ORELSE' etac @{thm conjE}
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   830
               ORELSE' etac @{thm bexE}) i))
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   831
THEN (rtac @{thm CollectI} i
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   832
      ORELSE (     asm_full_simp_tac (HOL_ss addsimps @{thms Set.insert_iff}) i))
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   833
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   834
*}
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   835
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   836
ML {*
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   837
fun my_seteq_tac i = 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   838
     (simp_tac (HOL_ss addsimps @{thms s2ss_def}) 1)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   839
THEN (rtac @{thm set_eqI} i)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   840
THEN (rtac @{thm iffI} i)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   841
THEN my_setiff_tac i
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   842
*}
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   843
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   844
lemma co2sobj_sproc_imp:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   845
  "co2sobj s obj = Some (S_proc sp tag) \<Longrightarrow> \<exists> p. obj = O_proc p"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   846
by (case_tac obj, auto simp:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   847
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   848
lemma co2sobj_sfile_imp:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   849
  "co2sobj s obj = Some (S_file sfs tag) \<Longrightarrow> \<exists> f. obj = O_file f"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   850
by (case_tac obj, auto simp:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   851
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   852
lemma co2sobj_sdir_imp:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   853
  "co2sobj s obj = Some (S_dir sf) \<Longrightarrow> \<exists> f. obj = O_dir f"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   854
by (case_tac obj, auto simp:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   855
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   856
lemma co2sobj_sshm_imp:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   857
  "co2sobj s obj = Some (S_shm sh) \<Longrightarrow> \<exists> h. obj = O_shm h"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   858
by (case_tac obj, auto simp:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   859
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   860
lemma co2sobj_smsgq_imp:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   861
  "co2sobj s obj = Some (S_msgq sq) \<Longrightarrow> \<exists> q. obj = O_msgq q"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   862
by (case_tac obj, auto simp:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   863
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   864
lemma same_inode_files_prop10:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   865
  "\<lbrakk>same_inode_files s f \<noteq> {f}; is_file s f\<rbrakk> \<Longrightarrow> \<exists> f'. f' \<in> same_inode_files s f \<and> f' \<noteq> f"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   866
by (auto simp:same_inode_files_def split:if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   867
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   868
lemma same_inode_files_prop11:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   869
  "f \<in> same_inode_files s f' \<Longrightarrow> is_file s f"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   870
by (auto simp:same_inode_files_def is_file_def split:if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   871
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   872
lemma same_inode_files_prop11':
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   873
  "f \<in> same_inode_files s f' \<Longrightarrow> is_file s f'"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   874
by (auto simp:same_inode_files_def is_file_def split:if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   875
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   876
lemma s2ss_closefd:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   877
  "valid (CloseFd p fd # s) \<Longrightarrow> s2ss (CloseFd p fd # s) = (
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   878
     case (file_of_proc_fd s p fd) of
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   879
       Some f \<Rightarrow> if (f \<in> files_hung_by_del s \<and> proc_fd_of_file s f = {(p, fd)})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   880
                 then (case (cf2sfile s f, cp2sproc s p, cp2sproc (CloseFd p fd # s) p) of
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   881
                         (Some sf, Some sp, Some sp') \<Rightarrow> 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   882
                            (del_s2ss_file s (
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   883
                               update_s2ss_obj s (s2ss s) (O_proc p) 
75
chunhan
parents: 74
diff changeset
   884
                                 (S_proc sp (O_proc p \<in> tainted s))
chunhan
parents: 74
diff changeset
   885
                                 (S_proc sp' (O_proc p \<in> tainted s))) f sf)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   886
                      | _ \<Rightarrow> {})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   887
                 else (case (cp2sproc s p, cp2sproc (CloseFd p fd # s) p) of 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   888
                         (Some sp, Some sp') \<Rightarrow> 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   889
                            (update_s2ss_obj s (s2ss s) (O_proc p)
75
chunhan
parents: 74
diff changeset
   890
                               (S_proc sp (O_proc p \<in> tainted s))
chunhan
parents: 74
diff changeset
   891
                               (S_proc sp' (O_proc p \<in> tainted s)))
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   892
                      | _ \<Rightarrow> {})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   893
      | _     \<Rightarrow> s2ss s)"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   894
apply (frule vd_cons, frule vt_grant_os)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   895
apply (clarsimp simp only:os_grant.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   896
apply (frule current_proc_has_sp, simp, erule exE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   897
apply (case_tac "file_of_proc_fd s p fd")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   898
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   899
apply (simp add:s2ss_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   900
apply (rule set_eqI, rule iffI, erule CollectE, erule exE, erule conjE, rule CollectI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   901
apply (rule_tac x = obj in exI, simp add:alive_co2sobj_closefd')
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   902
apply (frule co2sobj_closefd, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   903
apply (frule cp2sproc_closefd, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   904
apply (simp add:proc_file_fds_def split:t_object.splits)
75
chunhan
parents: 74
diff changeset
   905
apply (simp split:if_splits add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   906
apply (erule CollectE, erule exE, erule conjE, rule CollectI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   907
apply (rule_tac x = obj in exI, simp add:alive_co2sobj_closefd2)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   908
apply (frule_tac obj = obj in co2sobj_closefd, simp add:alive_co2sobj_closefd2)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   909
apply (frule cp2sproc_closefd, simp)
75
chunhan
parents: 74
diff changeset
   910
apply (auto simp add:proc_file_fds_def co2sobj.simps 
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   911
            split:t_object.splits option.splits if_splits)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   912
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   913
apply (case_tac "cp2sproc (CloseFd p fd # s) p")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   914
apply (drule current_proc_has_sp', simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   915
apply (case_tac "cf2sfile s a")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   916
apply (drule current_file_has_sfile', simp, simp add:file_of_pfd_in_current)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   917
apply (simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   918
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   919
apply (rule conjI, rule impI, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   920
apply (simp add:del_s2ss_file_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   921
apply (rule conjI|rule impI|erule exE|erule conjE|erule bexE)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   922
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   923
apply (simp add:update_s2ss_obj_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   924
apply (rule conjI|rule impI|erule exE|erule conjE|erule bexE)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   925
apply (tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   926
apply simp
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   927
apply (case_tac "obj = O_proc p")
75
chunhan
parents: 74
diff changeset
   928
apply (simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   929
apply (rule disjI2, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   930
apply (frule_tac obj = obj in co2sobj_closefd, simp add:alive_simps)
75
chunhan
parents: 74
diff changeset
   931
apply (simp add:alive_simps co2sobj.simps split:t_object.splits if_splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   932
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   933
apply (rule_tac x = "O_proc p" in exI)
75
chunhan
parents: 74
diff changeset
   934
apply (simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   935
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   936
apply (case_tac "obj = O_proc p")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   937
apply (rule_tac x = obj' in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   938
apply (frule co2sobj_sproc_imp, erule exE, simp add:co2sobj_closefd)
75
chunhan
parents: 74
diff changeset
   939
apply (simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   940
apply (case_tac "obj = O_file a")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   941
apply (rule_tac x = "O_file f'" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   942
apply (case_tac "f' = a", simp add:same_inode_files_prop9 file_of_pfd_is_file)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   943
apply (frule_tac obj = "O_file f'" in co2sobj_closefd, simp add:alive_simps)
75
chunhan
parents: 74
diff changeset
   944
apply (simp add:alive_simps co2sobj.simps split:t_object.splits if_splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   945
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   946
apply (frule_tac obj = obj in alive_co2sobj_closefd3, simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   947
apply (frule_tac obj = obj in co2sobj_closefd, simp)
75
chunhan
parents: 74
diff changeset
   948
apply (auto simp add:alive_simps co2sobj.simps split:t_object.splits if_splits)[1]
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   949
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   950
apply (rule impI)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   951
apply (tactic {*my_seteq_tac 1*})
75
chunhan
parents: 74
diff changeset
   952
apply (case_tac "obj = O_proc p", rule disjI1, simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   953
apply (rule disjI2)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   954
apply (case_tac "obj = O_file a", simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   955
apply (rule DiffI, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   956
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   957
apply (frule_tac obj = obj in alive_co2sobj_closefd', simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   958
apply (frule_tac obj = obj in co2sobj_closefd, simp)
75
chunhan
parents: 74
diff changeset
   959
apply (simp add:alive_simps co2sobj.simps split:t_object.splits if_splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   960
apply (simp, rule notI, simp, frule co2sobj_sproc_imp, erule exE, simp add:co2sobj_closefd)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   961
apply (erule_tac x = "O_proc pa" in allE, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   962
apply (tactic {*my_setiff_tac 1*})
75
chunhan
parents: 74
diff changeset
   963
apply (rule_tac x = "O_proc p" in exI, simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   964
apply (tactic {*my_setiff_tac 1*})
75
chunhan
parents: 74
diff changeset
   965
apply (case_tac "obj = O_proc p", simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   966
apply (case_tac "obj = O_file a", rule_tac x = "O_file f'" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   967
apply (case_tac "f' = a", simp add:same_inode_files_prop9 file_of_pfd_is_file)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   968
apply (frule_tac obj = "O_file f'" in co2sobj_closefd, simp add:alive_simps)
75
chunhan
parents: 74
diff changeset
   969
apply (simp add:alive_simps co2sobj.simps split:t_object.splits if_splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   970
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   971
apply (frule_tac obj = obj in alive_co2sobj_closefd3, simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   972
apply (frule_tac obj = obj in co2sobj_closefd, simp)
75
chunhan
parents: 74
diff changeset
   973
apply (auto simp add:co2sobj.simps split:t_object.splits if_splits)[1]
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   974
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   975
apply (rule impI, tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   976
apply (simp add:update_s2ss_obj_def update_s2ss_sfile_del_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   977
apply (rule conjI| rule impI|erule exE|erule conjE)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   978
apply (erule_tac obj = obj in co2sobj_some_caseD)
75
chunhan
parents: 74
diff changeset
   979
apply (case_tac "pa = p", simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   980
apply (rule disjI2, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   981
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   982
apply (case_tac "f = a", simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   983
apply (rule disjI2, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   984
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   985
apply (rule disjI2, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   986
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   987
apply (rule disjI2, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   988
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   989
apply (rule disjI2, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   990
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   991
apply (rule conjI| rule impI|erule exE|erule conjE)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   992
apply (erule_tac obj = obj in co2sobj_some_caseD)
75
chunhan
parents: 74
diff changeset
   993
apply (case_tac "pa = p", simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   994
apply (rule disjI2, rule disjI2, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   995
apply (frule_tac obj = obj in co2sobj_closefd, simp)
75
chunhan
parents: 74
diff changeset
   996
apply (auto simp add:co2sobj.simps split:t_object.splits if_splits)[1]
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   997
apply (case_tac "f = a", simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   998
apply (case_tac "f \<in> same_inode_files s a", rule disjI1)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
   999
apply (simp add:co2sobj_simps split:if_splits option.splits t_sobject.splits)
75
chunhan
parents: 74
diff changeset
  1000
apply (simp add:co2sobj.simps same_inodes_tainted cf2sfiles_prop)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1001
apply (erule bexE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1002
apply (erule_tac x = f'' in ballE, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1003
apply (rule disjI2, rule disjI2, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1004
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1005
apply (rule disjI2, rule disjI2, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1006
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1007
apply (rule disjI2, rule disjI2, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1008
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1009
apply (rule disjI2, rule disjI2, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1010
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1011
apply (rule impI, rule conjI, rule impI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1012
apply (erule_tac obj = obj in co2sobj_some_caseD)
75
chunhan
parents: 74
diff changeset
  1013
apply (case_tac "pa = p", simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1014
apply (rule disjI2, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1015
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1016
apply (rule notI, simp add:co2sobj_closefd, erule_tac x = obj in allE, simp add:is_file_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1017
apply (case_tac "f = a", simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1018
apply (rule disjI2, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1019
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1020
apply (rule notI, simp add:co2sobj_closefd, erule_tac x = obj in allE, simp add:is_file_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1021
apply (rule disjI2, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1022
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1023
apply (rule notI, simp add:co2sobj_closefd, erule_tac x = obj in allE, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1024
apply (rule disjI2, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1025
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1026
apply (rule notI, simp add:co2sobj_closefd, erule_tac x = obj in allE, simp add:is_dir_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1027
apply (rule disjI2, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1028
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1029
apply (rule notI, simp add:co2sobj_closefd, erule_tac x = obj in allE, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1030
apply (rule impI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1031
apply (erule_tac obj = obj in co2sobj_some_caseD)
75
chunhan
parents: 74
diff changeset
  1032
apply (case_tac "pa = p", simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1033
apply (rule disjI2, rule disjI2, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1034
apply (frule_tac obj = obj in co2sobj_closefd, simp)
75
chunhan
parents: 74
diff changeset
  1035
apply (auto simp add:co2sobj.simps split:t_object.splits if_splits)[1]
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1036
apply (rule notI, simp add:co2sobj_closefd)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1037
apply (erule_tac x = obj in allE, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1038
apply (case_tac "f = a", simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1039
apply (case_tac "f \<in> same_inode_files s a", rule disjI1)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1040
apply (simp add:co2sobj_simps split:if_splits option.splits t_sobject.splits)
75
chunhan
parents: 74
diff changeset
  1041
apply (simp add:co2sobj.simps same_inodes_tainted cf2sfiles_prop)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1042
apply (erule bexE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1043
apply (erule_tac x = f'' in ballE, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1044
apply (rule disjI2, rule disjI2, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1045
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1046
apply (rule notI, simp add:co2sobj_closefd, erule_tac x = obj in allE, simp add:is_file_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1047
apply (rule disjI2, rule disjI2, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1048
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1049
apply (rule notI, simp add:co2sobj_closefd, erule_tac x = obj in allE, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1050
apply (rule disjI2, rule disjI2, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1051
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1052
apply (rule notI, simp add:co2sobj_closefd, erule_tac x = obj in allE, simp add:is_dir_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1053
apply (rule disjI2, rule disjI2, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1054
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1055
apply (rule notI, simp add:co2sobj_closefd, erule_tac x = obj in allE, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1056
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1057
apply (simp add:update_s2ss_sfile_del_def update_s2ss_obj_def split:if_splits)
75
chunhan
parents: 74
diff changeset
  1058
apply (erule disjE, rule_tac x = "O_proc p" in exI, simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1059
apply (erule exE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1060
apply (case_tac "obj = O_proc p")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1061
apply (rule_tac x = obj' in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1062
apply (frule co2sobj_sproc_imp, erule exE, simp add:co2sobj_closefd)
75
chunhan
parents: 74
diff changeset
  1063
apply (simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1064
apply (case_tac "obj = O_file a")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1065
apply (rule_tac x = "O_file f'" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1066
apply (case_tac "f' = a", simp add:same_inode_files_prop9 file_of_pfd_is_file)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1067
apply (frule_tac obj = "O_file f'" in co2sobj_closefd, simp add:alive_simps)
75
chunhan
parents: 74
diff changeset
  1068
apply (simp add:alive_simps co2sobj.simps split:t_object.splits if_splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1069
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1070
apply (frule_tac obj = obj in alive_co2sobj_closefd3, simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1071
apply (frule_tac obj = obj in co2sobj_closefd, simp)
75
chunhan
parents: 74
diff changeset
  1072
apply (auto simp add:alive_simps co2sobj.simps split:t_object.splits if_splits)[1]
chunhan
parents: 74
diff changeset
  1073
apply (erule disjE, rule_tac x = "O_proc p" in exI, simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1074
apply (erule conjE, erule exE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1075
apply (case_tac "obj = O_proc p")
75
chunhan
parents: 74
diff changeset
  1076
apply (simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1077
apply (case_tac "obj = O_file a")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1078
apply (rule_tac x = "O_file f'" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1079
apply (case_tac "f' = a", simp add:same_inode_files_prop9 file_of_pfd_is_file)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1080
apply (frule_tac obj = "O_file f'" in co2sobj_closefd, simp add:alive_simps)
75
chunhan
parents: 74
diff changeset
  1081
apply (simp add:alive_simps co2sobj.simps split:t_object.splits if_splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1082
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1083
apply (frule_tac obj = obj in alive_co2sobj_closefd3, simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1084
apply (frule_tac obj = obj in co2sobj_closefd, simp)
75
chunhan
parents: 74
diff changeset
  1085
apply (auto simp add:alive_simps co2sobj.simps split:t_object.splits if_splits)[1]
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1086
apply (erule disjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1087
apply (drule same_inode_files_prop10, simp add:file_of_pfd_is_file, erule exE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1088
apply (rule_tac x = "O_file f'a" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1089
apply (frule same_inode_files_prop11)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1090
apply (frule_tac obj = "O_file f'a" in co2sobj_closefd)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1091
apply (simp add:alive_simps)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1092
apply (frule_tac f = "f'a" in is_file_has_sfile', simp, erule exE)
75
chunhan
parents: 74
diff changeset
  1093
apply (simp add:co2sobj.simps cf2sfiles_prop same_inodes_tainted split:if_splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1094
apply (rule impI, erule bexE, erule conjE, erule_tac x = f'' in ballE, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1095
apply (erule bexE, erule conjE, erule_tac x = f'' in ballE, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1096
apply (erule disjE)
75
chunhan
parents: 74
diff changeset
  1097
apply (rule_tac x = "O_proc p" in exI, simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1098
apply (erule exE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1099
apply (case_tac "obj = O_proc p")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1100
apply (rule_tac x = obj' in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1101
apply (frule co2sobj_sproc_imp, erule exE, simp add:co2sobj_closefd)
75
chunhan
parents: 74
diff changeset
  1102
apply (simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1103
apply (erule_tac obj = obj in co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1104
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1105
apply (simp add:co2sobj_closefd)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1106
apply (case_tac "f \<in> same_inode_files s a")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1107
apply (rule_tac x = "O_file f'" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1108
apply (simp add:co2sobj_simps is_file_simps split:if_splits option.splits t_sobject.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1109
apply (rule conjI, rule notI, simp add:same_inode_files_prop9)
75
chunhan
parents: 74
diff changeset
  1110
apply (rule impI, simp add:co2sobj.simps cf2sfiles_prop same_inodes_tainted)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1111
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1112
apply (simp add:co2sobj_closefd is_file_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1113
apply (rule notI, simp add:same_inode_files_prop9)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1114
apply (rule_tac x = obj in exI, simp add:co2sobj_closefd)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1115
apply (rule_tac x = obj in exI, simp add:co2sobj_closefd is_dir_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1116
apply (rule_tac x = obj in exI, simp add:co2sobj_closefd)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1117
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1118
apply (erule disjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1119
apply (drule same_inode_files_prop10, simp add:file_of_pfd_is_file, erule exE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1120
apply (rule_tac x = "O_file f'a" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1121
apply (frule same_inode_files_prop11)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1122
apply (frule_tac obj = "O_file f'a" in co2sobj_closefd)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1123
apply (simp add:alive_simps)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1124
apply (frule_tac f = "f'a" in is_file_has_sfile', simp, erule exE)
75
chunhan
parents: 74
diff changeset
  1125
apply (simp add:co2sobj.simps cf2sfiles_prop same_inodes_tainted split:if_splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1126
apply (rule impI, erule bexE, erule conjE, erule_tac x = f'' in ballE, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1127
apply (erule bexE, erule conjE, erule_tac x = f'' in ballE, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1128
apply (erule disjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1129
apply (rule_tac x = "O_proc p" in exI)
75
chunhan
parents: 74
diff changeset
  1130
apply (simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1131
apply (erule conjE, erule exE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1132
apply (case_tac "obj = O_proc p")
75
chunhan
parents: 74
diff changeset
  1133
apply (simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1134
apply (erule_tac obj = obj in co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1135
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1136
apply (simp add:co2sobj_closefd)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1137
apply (case_tac "f \<in> same_inode_files s a")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1138
apply (rule_tac x = "O_file f'" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1139
apply (simp add:co2sobj_simps is_file_simps split:if_splits option.splits t_sobject.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1140
apply (rule conjI, rule notI, simp add:same_inode_files_prop9)
75
chunhan
parents: 74
diff changeset
  1141
apply (rule impI, simp add:co2sobj.simps cf2sfiles_prop same_inodes_tainted)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1142
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1143
apply (simp add:co2sobj_closefd is_file_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1144
apply (rule notI, simp add:same_inode_files_prop9)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1145
apply (rule_tac x = obj in exI, simp add:co2sobj_closefd)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1146
apply (rule_tac x = obj in exI, simp add:co2sobj_closefd is_dir_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1147
apply (rule_tac x = obj in exI, simp add:co2sobj_closefd)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1148
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1149
apply (rule impI, rule conjI, rule impI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1150
apply (tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1151
apply (simp add:update_s2ss_obj_def update_s2ss_sfile_del_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1152
apply (rule conjI| rule impI|erule exE|erule conjE)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1153
apply (erule_tac obj = obj in co2sobj_some_caseD)
75
chunhan
parents: 74
diff changeset
  1154
apply (case_tac "pa = p", simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1155
apply (rule disjI2, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1156
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1157
apply (case_tac "f = a", simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1158
apply (rule disjI2, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1159
apply (frule_tac obj = obj in co2sobj_closefd, simp, clarsimp simp:alive_simps split:if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1160
apply (rule disjI2, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1161
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1162
apply (rule disjI2, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1163
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1164
apply (rule disjI2, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1165
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1166
apply (rule conjI| rule impI|erule exE|erule conjE)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1167
apply (erule_tac obj = obj in co2sobj_some_caseD)
75
chunhan
parents: 74
diff changeset
  1168
apply (case_tac "pa = p", simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1169
apply (rule disjI2, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1170
apply (frule_tac obj = obj in co2sobj_closefd, simp)
75
chunhan
parents: 74
diff changeset
  1171
apply (auto simp add:co2sobj.simps split:t_object.splits if_splits)[1]
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1172
apply (rule notI, simp, erule_tac x = "O_proc pa" in allE, simp add:co2sobj_closefd)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1173
apply (case_tac "f = a", simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1174
apply (case_tac "f \<in> same_inode_files s a", rule disjI2)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1175
apply (simp add:co2sobj_simps split:if_splits option.splits t_sobject.splits)
75
chunhan
parents: 74
diff changeset
  1176
apply (simp add:co2sobj.simps same_inodes_tainted cf2sfiles_prop)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1177
apply (erule bexE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1178
apply (rule conjI, rule_tac x = "O_file f''" in exI)
75
chunhan
parents: 74
diff changeset
  1179
apply (simp add:same_inode_files_prop11 co2sobj.simps cf2sfiles_prop same_inodes_tainted)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1180
apply (rule notI, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1181
apply (rule disjI2, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1182
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1183
apply (rule notI, simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1184
apply (rule disjI2, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1185
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1186
apply (rule notI, simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1187
apply (rule disjI2, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1188
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1189
apply (rule notI, simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1190
apply (rule disjI2, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1191
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1192
apply (rule notI, simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1193
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1194
apply (erule bexE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1195
apply (simp add:update_s2ss_obj_def split:if_splits)
75
chunhan
parents: 74
diff changeset
  1196
apply (erule disjE, rule_tac x = "O_proc p" in exI, simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1197
apply (erule exE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1198
apply (case_tac "obj = O_proc p")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1199
apply (rule_tac x = obj' in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1200
apply (frule co2sobj_sproc_imp, erule exE, simp add:co2sobj_closefd)
75
chunhan
parents: 74
diff changeset
  1201
apply (simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1202
apply (case_tac "obj = O_file a")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1203
apply (rule_tac x = "O_file f'" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1204
apply (frule_tac obj = "O_file f'" in co2sobj_closefd, simp add:alive_simps same_inode_files_prop11)
75
chunhan
parents: 74
diff changeset
  1205
apply (simp add:alive_simps co2sobj.simps split:t_object.splits if_splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1206
apply (rule conjI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1207
apply (rule impI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1208
apply (rule_tac x = f' in ballE, simp, simp, simp)
75
chunhan
parents: 74
diff changeset
  1209
apply (simp add:same_inode_files_prop11 co2sobj.simps cf2sfiles_prop same_inodes_tainted)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1210
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1211
apply (frule_tac obj = obj in alive_co2sobj_closefd3, simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1212
apply (frule_tac obj = obj in co2sobj_closefd, simp)
75
chunhan
parents: 74
diff changeset
  1213
apply (auto simp add:alive_simps co2sobj.simps split:t_object.splits if_splits)[1]
chunhan
parents: 74
diff changeset
  1214
apply (erule disjE, rule_tac x = "O_proc p" in exI, simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1215
apply (erule conjE, erule exE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1216
apply (case_tac "obj = O_proc p")
75
chunhan
parents: 74
diff changeset
  1217
apply (simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1218
apply (case_tac "obj = O_file a")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1219
apply (rule_tac x = "O_file f'" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1220
apply (frule_tac obj = "O_file f'" in co2sobj_closefd, simp add:alive_simps same_inode_files_prop11)
75
chunhan
parents: 74
diff changeset
  1221
apply (simp add:alive_simps co2sobj.simps split:t_object.splits if_splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1222
apply (rule conjI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1223
apply (rule impI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1224
apply (rule_tac x = f' in ballE, simp, simp, simp)
75
chunhan
parents: 74
diff changeset
  1225
apply (simp add:same_inode_files_prop11 co2sobj.simps cf2sfiles_prop same_inodes_tainted)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1226
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1227
apply (frule_tac obj = obj in alive_co2sobj_closefd3, simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1228
apply (frule_tac obj = obj in co2sobj_closefd, simp)
75
chunhan
parents: 74
diff changeset
  1229
apply (auto simp add:alive_simps co2sobj.simps split:t_object.splits if_splits)[1]
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1230
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1231
apply (rule impI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1232
apply (tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1233
apply (simp add:update_s2ss_obj_def update_s2ss_sfile_del_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1234
apply (rule conjI| rule impI|erule exE|erule conjE)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1235
apply (erule_tac obj = obj in co2sobj_some_caseD)
75
chunhan
parents: 74
diff changeset
  1236
apply (case_tac "pa = p", simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1237
apply (rule disjI2, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1238
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1239
apply (case_tac "f = a", simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1240
apply (rule disjI2, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1241
apply (frule_tac obj = obj in co2sobj_closefd, simp, clarsimp simp:alive_simps split:if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1242
apply (rule disjI2, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1243
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1244
apply (rule disjI2, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1245
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1246
apply (rule disjI2, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1247
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1248
apply (frule_tac obj = obj in co2sobj_closefd, simp, rule notI, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1249
apply (frule_tac obj = obj in co2sobj_sfile_imp, erule exE, simp add:is_file_simps split:if_splits)
75
chunhan
parents: 74
diff changeset
  1250
apply (erule_tac x= f in allE, simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1251
apply (rule conjI| rule impI|erule exE|erule conjE)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1252
apply (erule_tac obj = obj in co2sobj_some_caseD)
75
chunhan
parents: 74
diff changeset
  1253
apply (case_tac "pa = p", simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1254
apply (rule disjI2, rule notI, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1255
apply (rule disjI2, rule conjI, rule disjI2, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1256
apply (frule_tac obj = obj in co2sobj_closefd, simp)
75
chunhan
parents: 74
diff changeset
  1257
apply (auto simp add:co2sobj.simps split:t_object.splits if_splits)[1]
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1258
apply (rule notI, simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1259
apply (case_tac "f = a", simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1260
apply (case_tac "f \<in> same_inode_files s a", rule disjI1)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1261
apply (simp add:co2sobj_simps split:if_splits option.splits t_sobject.splits)
75
chunhan
parents: 74
diff changeset
  1262
apply (simp add:co2sobj.simps same_inodes_tainted cf2sfiles_prop)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1263
apply (erule bexE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1264
apply (erule_tac x = f'' in ballE, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1265
apply (rule disjI2, rule conjI, rule disjI2, rule_tac x = obj in exI)
75
chunhan
parents: 74
diff changeset
  1266
apply (simp add:is_file_simps co2sobj_closefd)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1267
apply (rule notI, simp add:co2sobj_closefd)
75
chunhan
parents: 74
diff changeset
  1268
apply (erule_tac x = f in allE, simp add:is_file_simps co2sobj.simps) 
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1269
apply (rule disjI2, rule conjI, rule disjI2, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1270
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1271
apply (rule notI, simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1272
apply (rule disjI2, rule conjI, rule disjI2, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1273
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1274
apply (rule notI, simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1275
apply (rule disjI2, rule conjI, rule disjI2, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1276
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1277
apply (rule notI, simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1278
apply (rule impI, rule conjI, rule impI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1279
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1280
apply (erule_tac obj = obj in co2sobj_some_caseD)
75
chunhan
parents: 74
diff changeset
  1281
apply (case_tac "pa = p", simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1282
apply (rule notI, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1283
apply (rule conjI, rule disjI2, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1284
apply (frule_tac obj = obj in co2sobj_closefd, simp)
75
chunhan
parents: 74
diff changeset
  1285
apply (auto simp add:co2sobj.simps split:t_object.splits if_splits)[1]
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1286
apply (erule_tac x = obj in allE, simp add:co2sobj_closefd)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1287
apply (rule notI, simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1288
apply (case_tac "f = a", simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1289
apply (case_tac "f \<in> same_inode_files s a", rule conjI, rule disjI2, rule conjI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1290
apply (simp add:co2sobj_simps split:if_splits option.splits t_sobject.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1291
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1292
apply (rule notI, simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1293
apply (rule conjI, rule disjI2, rule conjI, rule_tac x = obj in exI)
75
chunhan
parents: 74
diff changeset
  1294
apply (simp add:is_file_simps co2sobj_closefd)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1295
apply (rule notI, simp add:co2sobj.simps)
75
chunhan
parents: 74
diff changeset
  1296
apply (rule notI, simp add:co2sobj_closefd)
chunhan
parents: 74
diff changeset
  1297
apply (erule_tac x = f in allE, simp add:is_file_simps co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1298
apply (rule conjI, rule disjI2, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1299
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1300
apply (rule notI, simp add:co2sobj.simps split:option.splits)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1301
apply (rule conjI, rule disjI2, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1302
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1303
apply (rule notI, simp add:co2sobj.simps split:option.splits)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1304
apply (rule conjI, rule disjI2, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1305
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1306
apply (rule notI, simp add:co2sobj.simps split:option.splits)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1307
apply (rule impI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1308
apply (erule_tac obj = obj in co2sobj_some_caseD)
75
chunhan
parents: 74
diff changeset
  1309
apply (case_tac "pa = p", simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1310
apply (rule disjI2, rule notI, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1311
apply (rule disjI2, rule conjI, rule disjI2, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1312
apply (frule_tac obj = obj in co2sobj_closefd, simp)
75
chunhan
parents: 74
diff changeset
  1313
apply (auto simp add:co2sobj.simps split:t_object.splits if_splits)[1]
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1314
apply (erule_tac x = obj in allE, simp add:co2sobj_closefd)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1315
apply (rule notI, simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1316
apply (case_tac "f = a", simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1317
apply (case_tac "f \<in> same_inode_files s a", rule disjI1)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1318
apply (simp add:co2sobj_closefd split:if_splits option.splits t_sobject.splits)
75
chunhan
parents: 74
diff changeset
  1319
apply (simp add:co2sobj.simps cf2sfiles_prop same_inodes_tainted)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1320
apply (erule bexE, erule conjE, erule_tac x = "f''" in ballE, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1321
apply (rule disjI2, rule conjI, rule disjI2, rule conjI, rule_tac x = obj in exI)
75
chunhan
parents: 74
diff changeset
  1322
apply (simp add:is_file_simps co2sobj_closefd)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1323
apply (rule notI, simp add:co2sobj.simps)
75
chunhan
parents: 74
diff changeset
  1324
apply (rule notI, simp add:co2sobj_closefd)
chunhan
parents: 74
diff changeset
  1325
apply (erule_tac x = f in allE, simp add:is_file_simps co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1326
apply (rule disjI2, rule conjI, rule disjI2, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1327
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1328
apply (rule notI, simp add:co2sobj.simps split:option.splits)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1329
apply (rule disjI2, rule conjI, rule disjI2, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1330
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1331
apply (rule notI, simp add:co2sobj.simps split:option.splits)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1332
apply (rule disjI2, rule conjI, rule disjI2, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1333
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1334
apply (rule notI, simp add:co2sobj.simps split:option.splits)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1335
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1336
apply (simp add:update_s2ss_sfile_del_def update_s2ss_obj_def split:if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1337
apply (erule conjE, erule disjE)
75
chunhan
parents: 74
diff changeset
  1338
apply (rule_tac x = "O_proc p" in exI, simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1339
apply (erule exE, erule conjE)
75
chunhan
parents: 74
diff changeset
  1340
apply (case_tac "obj = O_file a", simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1341
apply (case_tac "obj = O_proc p")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1342
apply (rule_tac x = obj' in exI, frule_tac obj = obj' in co2sobj_sproc_imp, erule exE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1343
apply (frule_tac obj = obj' in alive_co2sobj_closefd3, simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1344
apply (simp add:co2sobj_closefd)
75
chunhan
parents: 74
diff changeset
  1345
apply (simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1346
apply (frule_tac obj = obj in alive_co2sobj_closefd3, simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1347
apply (rule_tac x = obj in exI, simp add:co2sobj_closefd)
75
chunhan
parents: 74
diff changeset
  1348
apply (auto simp add:co2sobj.simps split:t_object.splits if_splits)[1]
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1349
apply (erule conjE|erule exE|erule disjE)+
75
chunhan
parents: 74
diff changeset
  1350
apply (rule_tac x = "O_proc p" in exI, simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1351
apply (erule conjE, erule exE, erule conjE)
75
chunhan
parents: 74
diff changeset
  1352
apply (case_tac "obj = O_file a", simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1353
apply (case_tac "obj = O_proc p")
75
chunhan
parents: 74
diff changeset
  1354
apply (simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1355
apply (frule_tac obj = obj in alive_co2sobj_closefd3, simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1356
apply (rule_tac x = obj in exI, simp add:co2sobj_closefd)
75
chunhan
parents: 74
diff changeset
  1357
apply (auto simp add:co2sobj.simps split:t_object.splits if_splits)[1]
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1358
apply (erule conjE|erule exE|erule disjE)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1359
apply (drule same_inode_files_prop10, simp add:file_of_pfd_is_file, erule exE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1360
apply (rule_tac x = "O_file f'" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1361
apply (frule same_inode_files_prop11)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1362
apply (frule_tac obj = "O_file f'" in co2sobj_closefd)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1363
apply (simp add:alive_simps)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1364
apply (frule_tac f = "f'" in is_file_has_sfile', simp, erule exE)
75
chunhan
parents: 74
diff changeset
  1365
apply (simp add:co2sobj.simps cf2sfiles_prop same_inodes_tainted split:if_splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1366
apply (rule impI, erule bexE, erule conjE, erule_tac x = f'' in ballE, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1367
apply (erule bexE, erule conjE, erule_tac x = f'' in ballE, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1368
apply (erule conjE, erule disjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1369
apply (rule_tac x = "O_proc p" in exI)
75
chunhan
parents: 74
diff changeset
  1370
apply (simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1371
apply (erule exE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1372
apply (case_tac "obj = O_proc p")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1373
apply (rule_tac x = "obj'" in exI, simp, frule_tac obj = obj' in co2sobj_sproc_imp, erule exE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1374
apply (frule_tac obj = obj' in alive_co2sobj_closefd3, simp+)
75
chunhan
parents: 74
diff changeset
  1375
apply (simp add:co2sobj_closefd)
chunhan
parents: 74
diff changeset
  1376
apply (simp add:co2sobj.simps)
chunhan
parents: 74
diff changeset
  1377
apply (case_tac "obj = O_file a", simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1378
apply (frule_tac obj = obj in alive_co2sobj_closefd3, simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1379
apply (erule_tac obj = obj in co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1380
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1381
apply (simp add:co2sobj_closefd)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1382
apply (case_tac "f = a", simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1383
apply (case_tac "f \<in> same_inode_files s a")
75
chunhan
parents: 74
diff changeset
  1384
apply (simp add:co2sobj.simps cf2sfiles_prop same_inodes_tainted)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1385
apply (rule_tac x = obj in exI, simp add:co2sobj_closefd)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1386
apply (rule_tac x = obj in exI, simp add:co2sobj_closefd)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1387
apply (rule_tac x = obj in exI, simp add:co2sobj_closefd)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1388
apply (rule_tac x = obj in exI, simp add:co2sobj_closefd)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1389
apply (erule disjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1390
apply (drule same_inode_files_prop10, simp add:file_of_pfd_is_file, erule exE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1391
apply (rule_tac x = "O_file f'" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1392
apply (frule same_inode_files_prop11)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1393
apply (frule_tac obj = "O_file f'" in co2sobj_closefd)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1394
apply (simp add:alive_simps)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1395
apply (frule_tac f = "f'" in is_file_has_sfile', simp, erule exE)
75
chunhan
parents: 74
diff changeset
  1396
apply (simp add:co2sobj.simps cf2sfiles_prop same_inodes_tainted split:if_splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1397
apply (rule impI, erule bexE, erule conjE, erule_tac x = f'' in ballE, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1398
apply (erule bexE, erule conjE, erule_tac x = f'' in ballE, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1399
apply (erule conjE, erule disjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1400
apply (rule_tac x = "O_proc p" in exI)
75
chunhan
parents: 74
diff changeset
  1401
apply (simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1402
apply (erule conjE, erule exE, erule conjE)
75
chunhan
parents: 74
diff changeset
  1403
apply (case_tac "obj = O_proc p", simp add:co2sobj.simps)
chunhan
parents: 74
diff changeset
  1404
apply (case_tac "obj = O_file a", simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1405
apply (erule_tac obj = obj in co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1406
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1407
apply (simp add:co2sobj_closefd)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1408
apply (case_tac "f \<in> same_inode_files s a")
75
chunhan
parents: 74
diff changeset
  1409
apply (simp add:co2sobj.simps cf2sfiles_prop same_inodes_tainted)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1410
apply (rule_tac x = obj in exI, simp add:co2sobj_closefd is_file_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1411
apply (rule_tac x = obj in exI, simp add:co2sobj_closefd)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1412
apply (rule_tac x = obj in exI, simp add:co2sobj_closefd is_dir_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1413
apply (rule_tac x = obj in exI, simp add:co2sobj_closefd)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1414
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1415
apply (rule impI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1416
apply (simp add:update_s2ss_obj_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1417
apply (rule conjI, rule impI, erule exE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1418
apply (simp add:s2ss_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1419
apply (rule set_eqI, rule iffI, erule CollectE, erule exE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1420
apply (simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1421
apply (case_tac "obj = O_proc p")
75
chunhan
parents: 74
diff changeset
  1422
apply (simp add:co2sobj.simps split:if_splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1423
apply (rule disjI2, rule_tac x = obj in exI, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1424
apply (simp add:alive_co2sobj_closefd')
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1425
apply (frule_tac obj = obj in co2sobj_closefd, simp, simp split:t_object.splits if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1426
apply (simp, erule disjE)
75
chunhan
parents: 74
diff changeset
  1427
apply (rule_tac x = "O_proc p" in exI, simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1428
apply (erule exE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1429
apply (case_tac "obj = O_proc p")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1430
apply (rule_tac x = obj' in exI, simp add:alive_co2sobj_closefd1)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1431
apply (frule_tac obj = obj' in co2sobj_closefd, simp add:alive_co2sobj_closefd1)
75
chunhan
parents: 74
diff changeset
  1432
apply (clarsimp split:t_object.splits if_splits option.splits simp:tainted_eq_tainted co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1433
apply (rule_tac x = obj in exI, simp add:alive_co2sobj_closefd1)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1434
apply (frule_tac obj = obj in co2sobj_closefd, simp add:alive_co2sobj_closefd1)
75
chunhan
parents: 74
diff changeset
  1435
apply (clarsimp split:t_object.splits if_splits option.splits simp:tainted_eq_tainted co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1436
apply (rule impI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1437
apply (simp add:s2ss_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1438
apply (rule set_eqI, rule iffI, erule CollectE, erule exE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1439
apply (simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1440
apply (case_tac "obj = O_proc p")
75
chunhan
parents: 74
diff changeset
  1441
apply (rule disjI1, simp add:co2sobj.simps split:if_splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1442
apply (rule disjI2, rule conjI, rule_tac x = obj in exI, simp add:alive_co2sobj_closefd')
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1443
apply (frule_tac obj = obj in co2sobj_closefd, simp add:alive_co2sobj_closefd1)
75
chunhan
parents: 74
diff changeset
  1444
apply (clarsimp split:t_object.splits if_splits option.splits simp:tainted_eq_tainted co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1445
apply (rule notI, erule_tac x = obj in allE, simp add:alive_co2sobj_closefd')
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1446
apply (frule_tac obj = obj in co2sobj_closefd, simp add:alive_co2sobj_closefd1)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1447
apply (clarsimp split:t_object.splits if_splits option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1448
apply (simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1449
apply (erule disjE)
75
chunhan
parents: 74
diff changeset
  1450
apply (rule_tac x = "O_proc p" in exI, simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1451
apply (erule exE|erule conjE)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1452
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1453
apply (frule_tac obj = obj in co2sobj_closefd, simp add:alive_co2sobj_closefd1)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1454
apply (clarsimp split:t_object.splits if_splits option.splits 
75
chunhan
parents: 74
diff changeset
  1455
                simp:tainted_eq_tainted co2sobj.simps alive_co2sobj_closefd1)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1456
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1457
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1458
lemma alive_co2sobj_unlink:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1459
  "\<lbrakk>alive s obj; valid (UnLink p f # s); obj \<noteq> O_file f\<rbrakk>
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1460
   \<Longrightarrow> alive (UnLink p f # s) obj"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1461
by (auto simp add:alive_simps split:t_object.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1462
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1463
lemma s2ss_unlink:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1464
  "valid (UnLink p f # s) \<Longrightarrow> s2ss (UnLink p f # s) = (
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1465
     if (proc_fd_of_file s f = {}) 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1466
     then (case (cf2sfile s f) of 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1467
             Some sf \<Rightarrow> del_s2ss_file s (s2ss s) f sf
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1468
           | _       \<Rightarrow> {})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1469
     else s2ss s)"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1470
apply (frule vd_cons, frule vt_grant_os, clarsimp split:if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1471
apply (frule is_file_has_sfile', simp, erule exE, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1472
apply (rule conjI, rule impI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1473
apply (simp add:update_s2ss_sfile_del_def del_s2ss_file_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1474
apply (rule impI|erule conjE|erule exE|rule conjI|erule bexE)+ defer
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1475
apply (rule impI|erule conjE|erule exE|rule conjI|erule bexE)+ 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1476
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1477
apply (simp add:s2ss_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1478
apply (tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1479
apply (case_tac "obj = O_file f", simp add:is_file_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1480
apply simp
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1481
apply (rule conjI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1482
apply (rule_tac x = obj in exI,simp add:co2sobj_unlink is_file_simps is_dir_simps split:t_object.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1483
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1484
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1485
apply (rule notI, simp, frule_tac obj = obj in co2sobj_sfile_imp, erule exE, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1486
apply (frule_tac obj = obj in co2sobj_unlink, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1487
apply (erule_tac x = fa in allE, simp add:is_file_simps)
75
chunhan
parents: 74
diff changeset
  1488
apply (simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1489
apply (tactic {*my_setiff_tac 1*})
75
chunhan
parents: 74
diff changeset
  1490
apply (case_tac "obj = O_file f", simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1491
apply (frule_tac alive_co2sobj_unlink, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1492
apply (frule_tac obj = obj in co2sobj_unlink, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1493
apply (rule_tac x = obj in exI)
75
chunhan
parents: 74
diff changeset
  1494
apply (simp add:co2sobj.simps split:t_object.splits if_splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1495
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1496
apply (rule impI|erule conjE|erule exE|rule conjI|erule bexE)+  defer
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1497
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1498
apply (rule impI|erule conjE|erule exE|rule conjI|erule bexE)+ 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1499
apply (simp add:s2ss_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1500
apply (tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1501
apply (case_tac "obj = O_file f", simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1502
apply (erule_tac obj = obj in co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1503
apply (rule disjI2, simp, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1504
apply (simp add:co2sobj_unlink)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1505
apply (case_tac "fa \<in> same_inode_files s f")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1506
apply (rule disjI1)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1507
apply (simp add:co2sobj_unlink)
75
chunhan
parents: 74
diff changeset
  1508
apply (simp add:co2sobj.simps same_inodes_tainted cf2sfiles_prop split:if_splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1509
apply (erule bexE, erule_tac x = f'' in ballE, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1510
apply (rule disjI2, simp, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1511
apply (simp add:co2sobj_unlink is_file_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1512
apply (rule disjI2, simp, rule_tac x = obj in exI, simp add:co2sobj_unlink)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1513
apply (rule disjI2, simp, rule_tac x = obj in exI, simp add:co2sobj_unlink is_dir_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1514
apply (rule disjI2, simp, rule_tac x = obj in exI, simp add:co2sobj_unlink)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1515
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1516
apply (drule same_inode_files_prop10, simp, erule exE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1517
apply (rule_tac x = "O_file f'a" in exI, simp add:is_file_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1518
apply (frule_tac obj = "O_file f'a" in co2sobj_unlink, simp add:same_inode_files_prop11 is_file_simps)
75
chunhan
parents: 74
diff changeset
  1519
apply (simp add:co2sobj.simps same_inodes_tainted cf2sfiles_prop 
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1520
  is_file_simps same_inode_files_prop11 split:if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1521
apply (rule impI, erule bexE, erule_tac x = f'' in ballE, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1522
apply (erule bexE, erule_tac x = f'' in ballE, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1523
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1524
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1525
apply (case_tac "f' = f", simp add:same_inode_files_prop9) 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1526
apply (case_tac "obj= O_file f")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1527
apply (rule_tac x = "O_file f'" in exI, simp add:is_file_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1528
apply (frule_tac f' = f' in cf2sfiles_unlink, simp add:current_files_simps is_file_in_current)
75
chunhan
parents: 74
diff changeset
  1529
apply (simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1530
apply (erule_tac obj = obj in co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1531
apply (rule_tac x = obj in exI, simp add:co2sobj_unlink)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1532
apply (case_tac "fa \<in> same_inode_files s f")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1533
apply (rule_tac x = "O_file f'" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1534
apply (frule_tac f' = f' in cf2sfiles_unlink, simp add:current_files_simps is_file_in_current)
75
chunhan
parents: 74
diff changeset
  1535
apply (simp add:co2sobj.simps is_file_simps cf2sfiles_prop same_inodes_tainted)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1536
apply (rule_tac x = obj in exI, simp add:co2sobj_unlink is_file_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1537
apply (rule_tac x = obj in exI, simp add:co2sobj_unlink)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1538
apply (rule_tac x = obj in exI, simp add:co2sobj_unlink is_dir_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1539
apply (rule_tac x = obj in exI, simp add:co2sobj_unlink)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1540
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1541
apply (rule impI|erule conjE|erule exE|rule conjI|erule bexE)+  defer
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1542
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1543
apply (rule impI|erule conjE|erule exE|rule conjI|erule bexE)+ 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1544
apply (simp add:s2ss_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1545
apply (tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1546
apply (case_tac "obj = O_file f", simp add:alive_simps, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1547
apply (erule_tac obj = obj in co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1548
apply (rule disjI2, rule conjI, simp, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1549
apply (simp add:co2sobj_unlink)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1550
apply (rule notI, simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1551
apply (case_tac "fa \<in> same_inode_files s f")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1552
apply (rule disjI1)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1553
apply (simp add:co2sobj_unlink)
75
chunhan
parents: 74
diff changeset
  1554
apply (simp add:co2sobj.simps same_inodes_tainted cf2sfiles_prop split:if_splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1555
apply (erule bexE, erule_tac x = f'' in ballE, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1556
apply (rule disjI2, rule conjI, simp, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1557
apply (simp add:co2sobj_unlink is_file_simps)
75
chunhan
parents: 74
diff changeset
  1558
apply (rule notI, simp add:co2sobj_unlink)
chunhan
parents: 74
diff changeset
  1559
apply (erule_tac x = fa in allE, simp add:co2sobj.simps is_file_simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1560
apply (rule disjI2, rule conjI, simp, rule_tac x = obj in exI, simp add:co2sobj_unlink)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1561
apply (rule notI, simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1562
apply (rule disjI2, rule conjI, simp, rule_tac x = obj in exI, simp add:co2sobj_unlink is_dir_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1563
apply (rule notI, simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1564
apply (rule disjI2, rule conjI, simp, rule_tac x = obj in exI, simp add:co2sobj_unlink)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1565
apply (rule notI, simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1566
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1567
apply (drule same_inode_files_prop10, simp, erule exE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1568
apply (rule_tac x = "O_file f'" in exI, simp add:is_file_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1569
apply (frule_tac obj = "O_file f'" in co2sobj_unlink, simp add:same_inode_files_prop11 is_file_simps)
75
chunhan
parents: 74
diff changeset
  1570
apply (simp add:co2sobj.simps same_inodes_tainted cf2sfiles_prop 
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1571
  is_file_simps same_inode_files_prop11 split:if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1572
apply (rule impI, erule bexE, erule_tac x = f'' in ballE, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1573
apply (erule bexE, erule_tac x = f'' in ballE, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1574
apply (tactic {*my_setiff_tac 1*}, simp)
75
chunhan
parents: 74
diff changeset
  1575
apply (case_tac "obj = O_file f", simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1576
apply (erule_tac obj = obj in co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1577
apply (rule_tac x = obj in exI, simp add:co2sobj_unlink)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1578
apply (case_tac "fa \<in> same_inode_files s f")
75
chunhan
parents: 74
diff changeset
  1579
apply (simp add:co2sobj.simps cf2sfiles_prop same_inodes_tainted)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1580
apply (rule_tac x = obj in exI, simp add:co2sobj_unlink is_file_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1581
apply (rule_tac x = obj in exI, simp add:co2sobj_unlink)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1582
apply (rule_tac x = obj in exI, simp add:co2sobj_unlink is_dir_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1583
apply (rule_tac x = obj in exI, simp add:co2sobj_unlink)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1584
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1585
apply (rule impI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1586
apply (simp add:s2ss_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1587
apply (tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1588
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1589
apply (simp add:co2sobj_unlink is_file_simps is_dir_simps split:t_object.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1590
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1591
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1592
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1593
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1594
apply (subgoal_tac "alive (UnLink p f # s) obj")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1595
apply (auto simp add:co2sobj_unlink is_file_simps is_dir_simps split:t_object.splits)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1596
apply (auto simp add:co2sobj_unlink alive_simps split:t_object.splits)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1597
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1598
apply (simp add:s2ss_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1599
apply (tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1600
apply (case_tac "obj = O_file f", simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1601
apply (rule_tac x = obj in exI, simp add:co2sobj_unlink is_file_simps is_dir_simps split:t_object.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1602
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1603
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1604
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1605
apply (case_tac "obj = O_file f")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1606
apply (rule_tac x = "O_file f'" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1607
apply (auto simp add:co2sobj_unlink is_file_simps is_dir_simps split:t_object.splits)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1608
apply (rule_tac x =obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1609
apply (subgoal_tac "alive (UnLink p f # s) obj")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1610
apply (auto simp add:co2sobj_unlink is_file_simps is_dir_simps split:t_object.splits)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1611
apply (auto simp add:co2sobj_unlink alive_simps split:t_object.splits)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1612
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1613
apply (simp add:s2ss_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1614
apply (tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1615
apply (case_tac "obj = O_file f", simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1616
apply (rule_tac x = obj in exI, simp add:co2sobj_unlink is_file_simps is_dir_simps split:t_object.splits if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1617
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1618
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1619
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1620
apply (case_tac "obj = O_file f")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1621
apply (rule_tac x = "O_file f'" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1622
apply (auto simp add:co2sobj_unlink is_file_simps is_dir_simps same_inode_files_prop9 split:t_object.splits)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1623
apply (erule_tac obj = obj in co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1624
apply (rule_tac x = obj in exI, simp add:co2sobj_unlink)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1625
apply (case_tac "fa \<in> same_inode_files s f")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1626
apply (rule_tac x = "O_file f'" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1627
apply (simp add:alive_simps co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1628
apply (rule conjI, rule notI, simp add:same_inode_files_prop9)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1629
apply (rule impI, frule_tac f' = f' in cf2sfiles_unlink)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1630
apply (simp add:current_files_simps is_file_simps is_file_in_current)
75
chunhan
parents: 74
diff changeset
  1631
apply (simp: same_inodes_tainted cf2sfiles_prop)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1632
apply (rule_tac x = obj in exI, simp add:co2sobj_unlink is_file_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1633
apply (rule_tac x = obj in exI, simp add:co2sobj_unlink)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1634
apply (rule_tac x = obj in exI, simp add:co2sobj_unlink is_dir_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1635
apply (rule_tac x = obj in exI, simp add:co2sobj_unlink)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1636
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1637
apply (simp add:s2ss_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1638
apply (tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1639
apply (case_tac "obj = O_file f", simp add:alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1640
apply (rule_tac x = obj in exI, simp add:co2sobj_unlink is_file_simps is_dir_simps split:t_object.splits if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1641
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1642
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1643
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1644
apply (case_tac "obj = O_file f")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1645
apply (rule_tac x = "O_file f'" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1646
apply (subgoal_tac "alive (UnLink p f # s) (O_file f')")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1647
apply (frule same_inode_files_prop11, frule_tac f = f' in is_file_has_sfile', simp add:vd_cons, erule exE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1648
apply (frule_tac obj = "O_file f'" in co2sobj_unlink, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1649
apply (simp split:if_splits option.splits add:is_file_simps)
75
chunhan
parents: 74
diff changeset
  1650
apply (simp add:co2sobj.simps cf2sfiles_prop same_inodes_tainted)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1651
apply (auto split:t_sobject.splits)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1652
apply (simp add:is_file_simps same_inode_files_prop11)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1653
apply (erule_tac obj = obj in co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1654
apply (rule_tac x = obj in exI, simp add:co2sobj_unlink)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1655
apply (case_tac "fa \<in> same_inode_files s f")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1656
apply (rule_tac x = "O_file f'" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1657
apply (subgoal_tac "alive (UnLink p f # s) (O_file f')")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1658
apply (frule same_inode_files_prop11, frule_tac f = f' in is_file_has_sfile', simp add:vd_cons, erule exE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1659
apply (frule_tac obj = "O_file f'" in co2sobj_unlink, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1660
apply (simp split:if_splits option.splits add:is_file_simps)
75
chunhan
parents: 74
diff changeset
  1661
apply (simp add:co2sobj.simps cf2sfiles_prop same_inodes_tainted)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1662
apply (auto split:t_sobject.splits)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1663
apply (simp add:is_file_simps same_inode_files_prop11)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1664
apply (rule_tac x = obj in exI, simp add:co2sobj_unlink is_file_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1665
apply (rule_tac x = obj in exI, simp add:co2sobj_unlink)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1666
apply (rule_tac x = obj in exI, simp add:co2sobj_unlink is_dir_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1667
apply (rule_tac x = obj in exI, simp add:co2sobj_unlink)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1668
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1669
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1670
definition del_s2ss_obj :: "t_state \<Rightarrow> t_static_state \<Rightarrow> t_object \<Rightarrow> t_sobject \<Rightarrow> t_static_state"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1671
where
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1672
  "del_s2ss_obj s ss obj sobj \<equiv> 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1673
     if (\<exists> obj'. alive s obj' \<and> obj' \<noteq> obj \<and> co2sobj s obj' = Some sobj)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1674
     then ss
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1675
     else ss - {sobj}"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1676
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1677
lemma del_update_s2ss_obj:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1678
  "update_s2ss_obj s ss obj sobj sobj' = del_s2ss_obj s ss obj sobj \<union> {sobj'}"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1679
by (auto simp:update_s2ss_obj_def del_s2ss_obj_def split:if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1680
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1681
lemma s2ss_rmdir: "valid (Rmdir p f # s) \<Longrightarrow> s2ss (Rmdir p f # s) = (
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1682
  case (co2sobj s (O_dir f)) of
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1683
    Some sdir \<Rightarrow> del_s2ss_obj s (s2ss s) (O_dir f) sdir
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1684
  | _         \<Rightarrow> {})"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1685
apply (frule vd_cons, frule vt_grant_os)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1686
apply (clarsimp simp:dir_is_empty_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1687
apply (frule is_dir_has_sdir', simp, erule exE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1688
apply (simp split:option.splits, rule conjI, rule impI, simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1689
apply (rule allI, rule impI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1690
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1691
apply (simp add:del_s2ss_obj_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1692
apply (rule conjI|rule impI|erule exE|erule conjE)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1693
apply (simp add:s2ss_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1694
apply (tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1695
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1696
apply (simp add:co2sobj_rmdir is_file_simps is_dir_simps alive_simps split:t_object.splits if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1697
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1698
apply (case_tac "obj = O_dir f")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1699
apply (rule_tac x = obj' in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1700
apply (subgoal_tac "alive (Rmdir p f # s) obj'")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1701
apply (auto simp add:co2sobj_rmdir is_file_simps is_dir_simps split:t_object.splits)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1702
apply (simp add:alive_rmdir)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1703
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1704
apply (subgoal_tac "alive (Rmdir p f # s) obj")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1705
apply (auto simp add:co2sobj_rmdir is_file_simps is_dir_simps split:t_object.splits)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1706
apply (simp add:alive_rmdir)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1707
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1708
apply (rule conjI|rule impI|erule exE|erule conjE)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1709
apply (simp add:s2ss_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1710
apply (tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1711
apply simp
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1712
apply (case_tac "obj = O_dir f", simp add:alive_rmdir)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1713
apply (rule conjI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1714
apply (rule_tac x = obj in exI, simp add:co2sobj_rmdir alive_rmdir)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1715
apply (simp add:co2sobj_rmdir)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1716
apply (simp add:alive_rmdir, erule_tac x = obj in allE, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1717
apply (tactic {*my_setiff_tac 1*}, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1718
apply (case_tac "obj = O_dir f", simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1719
apply (rule_tac x = obj in exI, simp add:co2sobj_rmdir alive_rmdir)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1720
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1721
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1722
lemma s2ss_mkdir: "valid (Mkdir p f inum # s) \<Longrightarrow> s2ss (Mkdir p f inum # s) = (
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1723
  case (cf2sfile (Mkdir p f inum # s) f) of
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1724
    Some sf \<Rightarrow> (s2ss s) \<union> {S_dir sf}
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1725
  | _       \<Rightarrow> {})"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1726
apply (frule vt_grant_os, frule vd_cons, clarsimp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1727
apply (case_tac "cf2sfile (Mkdir p f inum # s) f")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1728
apply (drule current_file_has_sfile', simp, simp add:current_files_simps, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1729
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1730
apply (simp add:s2ss_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1731
apply (tactic {*my_seteq_tac 1*}, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1732
apply (case_tac "obj = O_dir f")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1733
apply (rule disjI1, simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1734
apply (rule disjI2, rule_tac x = obj in exI, simp add:co2sobj_mkdir alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1735
apply (tactic {*my_setiff_tac 1*}, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1736
apply (rule_tac x = "O_dir f" in exI, simp add:alive_mkdir co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1737
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1738
apply (case_tac "obj = O_dir f", simp add:is_dir_in_current)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1739
apply (rule_tac x = obj in exI, simp add:co2sobj_mkdir alive_mkdir)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1740
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1741
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1742
definition update_s2ss_sfile:: "t_state \<Rightarrow> t_static_state \<Rightarrow> t_file \<Rightarrow> t_sfile \<Rightarrow> t_static_state"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1743
where
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1744
 "update_s2ss_sfile s ss f sf \<equiv>
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1745
    if (\<exists> f'. is_file s f' \<and> f' \<notin> same_inode_files s f \<and> co2sobj s (O_file f') = co2sobj s (O_file f))
75
chunhan
parents: 74
diff changeset
  1746
       then ss \<union> {S_file (cf2sfiles s f \<union> {sf}) (O_file f \<in> tainted s)}
chunhan
parents: 74
diff changeset
  1747
       else ss - {S_file (cf2sfiles s f) (O_file f \<in> tainted s)} 
chunhan
parents: 74
diff changeset
  1748
               \<union> {S_file (cf2sfiles s f \<union> {sf}) (O_file f \<in> tainted s)}"
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1749
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1750
lemma same_inode_files_prop12:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1751
  "is_file s f \<Longrightarrow> f \<in> same_inode_files s f "
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1752
by (auto simp:is_file_def  same_inode_files_def split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1753
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1754
definition update_s2ss_sfile_tainted:: "t_state \<Rightarrow> t_static_state \<Rightarrow> t_file \<Rightarrow> bool \<Rightarrow> t_static_state"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1755
where
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1756
 "update_s2ss_sfile_tainted s ss f tag \<equiv>
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1757
    if (\<exists> f'. is_file s f' \<and> f' \<notin> same_inode_files s f \<and> 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1758
              co2sobj s (O_file f') = Some (S_file (cf2sfiles s f) False))
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1759
       then ss \<union> {S_file (cf2sfiles s f) True}
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1760
       else ss - {S_file (cf2sfiles s f) False} 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1761
               \<union> {S_file (cf2sfiles s f) True}"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1762
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1763
lemma s2ss_truncate: "valid (Truncate p f len # s) \<Longrightarrow> s2ss (Truncate p f len # s) = (
75
chunhan
parents: 74
diff changeset
  1764
  if (O_file f \<notin> tainted s \<and> O_proc p \<in> tainted s \<and> len > 0)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1765
  then update_s2ss_sfile_tainted s (s2ss s) f True
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1766
  else s2ss s)"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1767
apply (frule vt_grant_os, frule vd_cons, simp split:if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1768
apply (rule conjI, rule impI, (erule conjE)+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1769
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1770
apply (simp add:update_s2ss_sfile_tainted_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1771
apply (rule conjI|rule impI|erule exE|erule conjE)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1772
apply (simp add:s2ss_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1773
apply (tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1774
apply (case_tac "obj = O_file f")
75
chunhan
parents: 74
diff changeset
  1775
apply (rule disjI1, simp add:co2sobj.simps same_inode_files_prop12 cf2sfiles_other)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1776
apply (erule_tac obj = obj in co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1777
apply (rule disjI2, simp, rule_tac x = obj in exI, simp add:co2sobj_truncate alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1778
apply (case_tac "fa \<in> same_inode_files s f")
75
chunhan
parents: 74
diff changeset
  1779
apply (rule disjI1, simp add:co2sobj.simps cf2sfiles_prop cf2sfiles_other)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1780
apply (rule disjI2, simp, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1781
apply (simp add:co2sobj_truncate is_file_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1782
apply (rule disjI2, simp, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1783
apply (simp add:co2sobj_truncate)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1784
apply (rule disjI2, simp, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1785
apply (simp add:co2sobj_truncate is_dir_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1786
apply (rule disjI2, simp, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1787
apply (simp add:co2sobj_truncate)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1788
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1789
apply (rule_tac x = "O_file f" in exI)
75
chunhan
parents: 74
diff changeset
  1790
apply (simp add:co2sobj.simps is_file_simps cf2sfiles_other same_inode_files_prop12)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1791
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1792
apply (erule_tac obj = obj in co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1793
apply (rule_tac x = obj in exI, simp add:co2sobj_truncate)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1794
apply (case_tac "fa \<in> same_inode_files s f")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1795
apply (rule_tac x = "O_file f'" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1796
apply (auto simp:co2sobj_truncate is_file_simps is_dir_simps split:t_object.splits)[1]
75
chunhan
parents: 74
diff changeset
  1797
apply (simp add:co2sobj.simps same_inodes_tainted cf2sfiles_prop)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1798
apply (rule_tac x = obj in exI, simp add:co2sobj_truncate is_file_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1799
apply (rule_tac x = obj in exI, simp add:co2sobj_truncate)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1800
apply (rule_tac x = obj in exI, simp add:co2sobj_truncate is_dir_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1801
apply (rule_tac x = obj in exI, simp add:co2sobj_truncate)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1802
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1803
apply (rule conjI|rule impI|erule exE|erule conjE)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1804
apply (simp add:s2ss_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1805
apply (tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1806
apply (case_tac "obj = O_file f")
75
chunhan
parents: 74
diff changeset
  1807
apply (rule disjI1, simp add:co2sobj.simps same_inode_files_prop12 cf2sfiles_other)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1808
apply (erule_tac obj = obj in co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1809
apply (rule disjI2, simp, rule conjI, rule_tac x = obj in exI, simp add:co2sobj_truncate alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1810
apply (rule notI, simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1811
apply (case_tac "fa \<in> same_inode_files s f")
75
chunhan
parents: 74
diff changeset
  1812
apply (rule disjI1, simp add:co2sobj.simps cf2sfiles_prop cf2sfiles_other)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1813
apply (rule disjI2, simp, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1814
apply (simp add:co2sobj_truncate is_file_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1815
apply (rule notI, simp add:co2sobj_truncate is_file_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1816
apply (erule_tac x = fa in allE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1817
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1818
apply (rule disjI2, simp, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1819
apply (simp add:co2sobj_truncate)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1820
apply (rule notI, simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1821
apply (rule disjI2, simp, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1822
apply (simp add:co2sobj_truncate is_dir_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1823
apply (rule notI, simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1824
apply (rule disjI2, simp, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1825
apply (simp add:co2sobj_truncate)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1826
apply (rule notI, simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1827
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1828
apply (rule_tac x = "O_file f" in exI)
75
chunhan
parents: 74
diff changeset
  1829
apply (simp add:co2sobj.simps is_file_simps cf2sfiles_other same_inode_files_prop12)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1830
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1831
apply (erule_tac obj = obj in co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1832
apply (rule_tac x = obj in exI, simp add:co2sobj_truncate)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1833
apply (case_tac "fa \<in> same_inode_files s f")
75
chunhan
parents: 74
diff changeset
  1834
apply (simp add:co2sobj.simps same_inodes_tainted cf2sfiles_prop)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1835
apply (rule_tac x = obj in exI, simp add:co2sobj_truncate is_file_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1836
apply (rule_tac x = obj in exI, simp add:co2sobj_truncate)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1837
apply (rule_tac x = obj in exI, simp add:co2sobj_truncate is_dir_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1838
apply (rule_tac x = obj in exI, simp add:co2sobj_truncate)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1839
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1840
apply (rule impI, simp add:s2ss_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1841
apply (tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1842
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1843
apply (simp add:alive_simps co2sobj_truncate)
75
chunhan
parents: 74
diff changeset
  1844
apply (simp split:t_object.splits if_splits add:co2sobj.simps)
chunhan
parents: 74
diff changeset
  1845
apply (case_tac "O_proc p \<in> tainted s", simp add:same_inodes_tainted)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1846
apply simp
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1847
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1848
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1849
apply (simp add:alive_simps co2sobj_truncate)
75
chunhan
parents: 74
diff changeset
  1850
apply (auto split:t_object.splits if_splits simp:co2sobj.simps same_inodes_tainted)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1851
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1852
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1853
lemma s2ss_createmsgq: "valid (CreateMsgq p q # s) \<Longrightarrow> s2ss (CreateMsgq p q # s) = 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1854
  (case (cq2smsgq (CreateMsgq p q # s) q) of 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1855
     Some sq \<Rightarrow> s2ss s \<union> {S_msgq sq}
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1856
   | _       \<Rightarrow> {})"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1857
apply (frule vd_cons, frule vt_grant_os, clarsimp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1858
apply (case_tac "cq2smsgq (CreateMsgq p q # s) q")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1859
apply (drule current_has_smsgq', simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1860
apply (simp add:s2ss_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1861
apply (tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1862
apply (case_tac "obj = O_msgq q")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1863
apply (rule disjI1, simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1864
apply (rule disjI2, simp, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1865
apply (simp add:co2sobj_createmsgq is_file_simps is_dir_simps split:t_object.splits if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1866
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1867
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1868
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1869
apply (rule_tac x = "O_msgq q" in exI, simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1870
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1871
apply (case_tac "obj = O_msgq q")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1872
apply simp
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1873
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1874
apply (auto simp add:co2sobj_createmsgq alive_simps split:t_object.splits if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1875
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1876
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1877
ML {*fun my_clarify_tac i = 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1878
REPEAT ((  rtac @{thm impI}
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1879
   ORELSE' rtac @{thm allI}
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1880
   ORELSE' rtac @{thm ballI}
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1881
   ORELSE' rtac @{thm conjI}
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1882
   ORELSE' etac @{thm conjE}
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1883
   ORELSE' etac @{thm exE}
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1884
   ORELSE' etac @{thm bexE}
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1885
   ORELSE' etac @{thm disjE}) i)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1886
*}
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1887
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1888
lemma s2ss_sendmsg: "valid (SendMsg p q m # s) \<Longrightarrow> s2ss (SendMsg p q m # s) = (
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1889
  case (cq2smsgq s q, cq2smsgq (SendMsg p q m # s) q) of
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1890
    (Some sq, Some sq') \<Rightarrow> update_s2ss_obj s (s2ss s) (O_msgq q) (S_msgq sq) (S_msgq sq')
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1891
  | _  \<Rightarrow> {})"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1892
apply (frule vd_cons, frule vt_grant_os, clarsimp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1893
apply (case_tac "cq2smsgq s q")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1894
apply (drule current_has_smsgq', simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1895
apply (case_tac "cq2smsgq (SendMsg p q m # s) q")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1896
apply (drule current_has_smsgq', simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1897
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1898
apply (simp add:update_s2ss_obj_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1899
apply (tactic {*my_clarify_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1900
apply (simp add:s2ss_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1901
apply (tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1902
apply (case_tac "obj = O_msgq q")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1903
apply (rule disjI1, simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1904
apply (rule disjI2, simp, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1905
apply (simp add:co2sobj_sendmsg is_file_simps is_dir_simps split:t_object.splits if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1906
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1907
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1908
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1909
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1910
apply (rule_tac x = "O_msgq q" in exI, simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1911
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1912
apply (case_tac "obj = O_msgq q")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1913
apply (rule_tac x = obj' in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1914
apply (simp add:co2sobj_sendmsg alive_sendmsg split:t_object.splits if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1915
apply (auto simp:co2sobj.simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1916
apply (rule_tac x = obj in exI, simp add:co2sobj_sendmsg alive_sendmsg split:t_object.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1917
apply (auto simp:co2sobj.simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1918
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1919
apply (rule impI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1920
apply (simp add:s2ss_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1921
apply (tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1922
apply (case_tac "obj = O_msgq q")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1923
apply (rule disjI1, simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1924
apply (rule disjI2, simp, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1925
apply (simp add:co2sobj_sendmsg is_file_simps is_dir_simps split:t_object.splits if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1926
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1927
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1928
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1929
apply (rule notI, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1930
apply (frule_tac obj = obj in co2sobj_smsgq_imp, erule exE, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1931
apply (erule_tac x = obj in allE, simp add:co2sobj_sendmsg)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1932
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1933
apply (rule_tac x = "O_msgq q" in exI, simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1934
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1935
apply (case_tac "obj = O_msgq q")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1936
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1937
apply (rule_tac x = obj in exI, simp add:co2sobj_sendmsg alive_sendmsg split:t_object.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1938
apply (auto simp:co2sobj.simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1939
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1940
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1941
lemma alive_co2sobj_removemsgq:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1942
  "\<lbrakk>alive s obj; valid (RemoveMsgq p q # s); co2sobj s obj = Some sobj; obj \<noteq> O_msgq q\<rbrakk> 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1943
   \<Longrightarrow> alive (RemoveMsgq p q # s) obj"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1944
apply (erule co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1945
apply (auto simp:is_file_simps is_dir_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1946
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1947
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1948
lemma s2ss_removemsgq: "valid (RemoveMsgq p q # s) \<Longrightarrow> s2ss (RemoveMsgq p q # s) = 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1949
  (case (cq2smsgq s q) of
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1950
     Some sq \<Rightarrow> del_s2ss_obj s (s2ss s) (O_msgq q) (S_msgq sq)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1951
   | _       \<Rightarrow> {})"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1952
apply (frule vd_cons, frule vt_grant_os, clarsimp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1953
apply (split option.splits, rule conjI, rule impI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1954
apply (drule current_has_smsgq', simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1955
apply (rule allI, rule impI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1956
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1957
apply (simp add:del_s2ss_obj_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1958
apply (tactic {*my_clarify_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1959
apply (simp add:s2ss_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1960
apply (tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1961
apply (case_tac "obj = O_msgq q", simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1962
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1963
apply (simp add:co2sobj_removemsgq alive_simps split:t_object.splits if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1964
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1965
apply (case_tac "obj = O_msgq q", simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1966
apply (rule_tac x = obj' in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1967
apply (frule_tac obj = obj' in co2sobj_smsgq_imp, erule exE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1968
apply (simp add:co2sobj_removemsgq alive_simps split:t_object.splits if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1969
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1970
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1971
apply (simp add:co2sobj_removemsgq alive_co2sobj_removemsgq)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1972
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1973
apply (rule impI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1974
apply (simp add:s2ss_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1975
apply (tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1976
apply (case_tac "obj = O_msgq q", simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1977
apply (simp, rule conjI, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1978
apply (simp add:co2sobj_removemsgq alive_simps split:t_object.splits if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1979
apply (rule notI, simp, frule_tac obj = obj in co2sobj_smsgq_imp, erule exE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1980
apply (erule_tac x = obj in allE, simp add:co2sobj_removemsgq alive_co2sobj_removemsgq)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1981
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1982
apply (case_tac "obj = O_msgq q", simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1983
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1984
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1985
apply (simp add:co2sobj_removemsgq alive_co2sobj_removemsgq)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1986
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1987
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1988
declare Product_Type.split_paired_Ex Product_Type.split_paired_All [simp del]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1989
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1990
lemma s2ss_shm_no_bk_elim':
75
chunhan
parents: 74
diff changeset
  1991
  "\<lbrakk>x \<notin> s2ss_shm_no_backup s pfrom; co2sobj s (O_proc p) = Some x; O_proc p \<notin> tainted s;
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1992
    valid s; info_flow_shm s pfrom p\<rbrakk>
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1993
   \<Longrightarrow> \<exists> p'. \<not> info_flow_shm s pfrom p' \<and> p' \<in> current_procs s \<and> co2sobj s (O_proc p') = Some x"
75
chunhan
parents: 74
diff changeset
  1994
apply (auto simp:s2ss_shm_no_backup_def co2sobj.simps split:option.splits)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1995
apply (erule_tac x = p in allE, auto)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1996
apply (rule_tac x = p' in exI, auto)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1997
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1998
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  1999
lemma s2ss_recvmsg: "valid (RecvMsg p q m # s) \<Longrightarrow> s2ss (RecvMsg p q m # s) = (
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2000
  case (cq2smsgq s q, cq2smsgq (RecvMsg p q m # s) q) of
75
chunhan
parents: 74
diff changeset
  2001
    (Some sq, Some sq') \<Rightarrow> if (O_msg q m \<in> tainted s \<and> O_proc p \<notin> tainted s)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2002
                          then update_s2ss_obj s (update_s2ss_shm s p) (O_msgq q) (S_msgq sq) (S_msgq sq')
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2003
                          else update_s2ss_obj s (s2ss s) (O_msgq q) (S_msgq sq) (S_msgq sq')
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2004
  | _ \<Rightarrow> {})"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2005
apply (frule vt_grant_os, frule vd_cons)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2006
apply (case_tac "cq2smsgq s q")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2007
apply (drule current_has_smsgq', simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2008
apply (case_tac "cq2smsgq (RecvMsg p q m # s) q")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2009
apply (drule current_has_smsgq', simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2010
apply (simp split:if_splits add:update_s2ss_obj_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2011
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2012
apply (tactic {*my_clarify_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2013
unfolding s2ss_def update_s2ss_shm_def
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2014
apply (tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2015
apply (case_tac "obj = O_msgq q")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2016
apply (rule disjI1, simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2017
apply (rule disjI2)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2018
apply (rule DiffI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2019
apply (erule_tac obj = obj in co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2020
apply (case_tac "info_flow_shm s p pa")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2021
apply (rule UnI2)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2022
apply (simp add:co2sobj_recvmsg del:Product_Type.split_paired_Ex
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2023
  split:t_object.splits option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2024
apply (rule_tac x = ab in exI, simp, rule_tac x = pa in exI, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2025
apply (rule UnI1,simp, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2026
apply (simp add:co2sobj_recvmsg split:t_object.splits option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2027
apply (rule UnI1,simp, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2028
apply (simp add:co2sobj_recvmsg is_file_simps split:t_object.splits option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2029
apply (rule UnI1, simp,rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2030
apply (simp add:co2sobj_recvmsg split:t_object.splits option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2031
apply (rule UnI1, simp,rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2032
apply (simp add:co2sobj_recvmsg is_dir_simps split:t_object.splits option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2033
apply (rule UnI1, simp, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2034
apply (simp add:co2sobj_recvmsg split:t_object.splits option.splits if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2035
apply (rule notI, simp add:s2ss_shm_no_backup_def del:Product_Type.split_paired_Ex)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2036
apply (erule exE|erule conjE)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2037
apply (simp, frule co2sobj_sproc_imp, erule exE, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2038
apply (simp add:co2sobj_recvmsg split:if_splits option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2039
apply (erule_tac x = paa in allE, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2040
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2041
apply (rule_tac x = "O_msgq q" in exI, simp add:co2sobj.simps alive_recvmsg)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2042
apply (tactic {*my_setiff_tac 1*}, erule UnE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2043
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2044
apply (case_tac "obj = O_msgq q")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2045
apply (rule_tac x = obj' in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2046
apply (simp add:co2sobj_recvmsg is_file_simps is_dir_simps alive_recvmsg 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2047
  split:t_object.splits if_splits option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2048
apply (auto simp:co2sobj.simps is_file_simps is_dir_simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2049
apply (erule_tac obj = obj in co2sobj_some_caseD)
75
chunhan
parents: 74
diff changeset
  2050
apply (case_tac "info_flow_shm s p pa \<and> O_proc pa \<notin> tainted s")
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2051
apply (drule_tac p = pa in s2ss_shm_no_bk_elim', simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2052
apply (erule exE|erule conjE)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2053
apply (rule_tac x = "O_proc p'" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2054
apply (simp add:co2sobj_recvmsg alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2055
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2056
apply (case_tac "info_flow_shm s p pa", simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2057
apply (frule_tac obj = obj in co2sobj_recvmsg, simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2058
apply (case_tac "cp2sproc s pa", simp add:co2sobj.simps)
75
chunhan
parents: 74
diff changeset
  2059
apply (simp, simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2060
apply (simp, frule_tac obj = obj in co2sobj_recvmsg, simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2061
apply (rule_tac x = obj in exI, simp add:co2sobj_recvmsg alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2062
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2063
apply (frule_tac obj = obj in co2sobj_recvmsg, simp split:t_object.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2064
apply (simp split:t_object.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2065
apply (rule_tac x = obj in exI, simp add:co2sobj_recvmsg is_dir_simps) 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2066
apply (rule_tac x = obj in exI, simp add:co2sobj_recvmsg) 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2067
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2068
apply (rule_tac x = "O_proc pa" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2069
apply (frule_tac obj = "O_proc pa" in co2sobj_recvmsg)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2070
apply (simp add:info_shm_flow_in_procs, simp add:info_shm_flow_in_procs)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2071
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2072
apply (tactic {*my_clarify_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2073
apply (tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2074
apply (case_tac "obj = O_msgq q")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2075
apply (rule disjI1, simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2076
apply (rule disjI2, simp, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2077
apply (simp add:co2sobj_recvmsg is_file_simps is_dir_simps split:t_object.splits if_splits option.splits)
75
chunhan
parents: 74
diff changeset
  2078
apply (simp add:co2sobj.simps info_flow_shm_tainted)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2079
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2080
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2081
apply (case_tac "msgs_of_queue s q", simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2082
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2083
apply (rule_tac x = "O_msgq q" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2084
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2085
apply (tactic {*my_setiff_tac 1 *})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2086
apply (case_tac "obj = O_msgq q")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2087
apply (rule_tac x = obj' in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2088
apply (simp add:co2sobj_recvmsg is_file_simps is_dir_simps alive_recvmsg 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2089
  split:t_object.splits if_splits option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2090
apply (auto simp:co2sobj.simps is_file_simps is_dir_simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2091
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2092
apply (simp add:co2sobj_recvmsg is_file_simps is_dir_simps alive_recvmsg 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2093
  split:t_object.splits if_splits option.splits)
75
chunhan
parents: 74
diff changeset
  2094
apply (auto simp:co2sobj.simps is_file_simps is_dir_simps info_flow_shm_tainted)[1]
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2095
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2096
apply (tactic {*my_clarify_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2097
apply (tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2098
apply (case_tac "obj = O_msgq q")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2099
apply (rule disjI1, simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2100
apply (rule disjI2)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2101
apply (erule_tac obj = obj in co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2102
apply (case_tac "info_flow_shm s p pa")
75
chunhan
parents: 74
diff changeset
  2103
apply (case_tac "O_proc pa \<in> tainted s")
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2104
apply (rule DiffI, rule UnI1, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2105
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2106
apply (frule_tac obj = obj in co2sobj_recvmsg, simp, simp split:option.splits)
75
chunhan
parents: 74
diff changeset
  2107
apply (simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2108
apply (erule s2ss_shm_no_bk_intro2, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2109
apply (rule DiffI, rule UnI2, rule CollectI)
75
chunhan
parents: 74
diff changeset
  2110
apply (simp only:co2sobj.simps split:option.splits, simp)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2111
apply (rule_tac x = ab in exI, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2112
apply (rule_tac x = pa in exI, simp add:cp2sproc_other)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2113
apply (rule s2ss_shm_no_bk_intro2, simp, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2114
apply (rule DiffI, rule UnI1, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2115
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2116
apply (frule_tac obj = obj in co2sobj_recvmsg, simp, simp split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2117
apply (rule_tac p = pa in s2ss_shm_no_bk_intro3)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2118
apply (simp add:co2sobj_recvmsg, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2119
apply (rule DiffI, rule UnI1, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2120
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2121
apply (frule_tac obj = obj in co2sobj_recvmsg, simp, simp add:is_file_simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2122
apply (simp add:co2sobj_recvmsg s2ss_shm_no_bk_intro1)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2123
apply (rule DiffI, rule UnI1, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2124
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2125
apply (frule_tac obj = obj in co2sobj_recvmsg, simp, simp split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2126
apply (simp add:co2sobj_recvmsg s2ss_shm_no_bk_intro1)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2127
apply (rule DiffI, rule UnI1, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2128
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2129
apply (frule_tac obj = obj in co2sobj_recvmsg, simp, simp add:is_dir_simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2130
apply (simp add:co2sobj_recvmsg s2ss_shm_no_bk_intro1)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2131
apply (rule DiffI, rule UnI1, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2132
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2133
apply (frule_tac obj = obj in co2sobj_recvmsg, simp, simp split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2134
apply (simp add:co2sobj_recvmsg s2ss_shm_no_bk_intro1)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2135
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2136
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2137
apply (rule_tac x = "O_msgq q" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2138
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2139
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2140
apply (erule UnE, tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2141
apply (case_tac "obj = O_msgq q")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2142
apply (rule_tac x = obj' in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2143
apply (simp add:co2sobj_recvmsg is_file_simps is_dir_simps alive_recvmsg 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2144
  split:t_object.splits if_splits option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2145
apply (auto simp:co2sobj.simps is_file_simps is_dir_simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2146
apply (erule_tac obj = obj in co2sobj_some_caseD)
75
chunhan
parents: 74
diff changeset
  2147
apply (case_tac "info_flow_shm s p pa \<and> O_proc pa \<notin> tainted s")
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2148
apply (drule_tac p = pa in s2ss_shm_no_bk_elim', simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2149
apply (erule exE|erule conjE)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2150
apply (rule_tac x = "O_proc p'" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2151
apply (simp add:co2sobj_recvmsg alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2152
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2153
apply (case_tac "info_flow_shm s p pa", simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2154
apply (frule_tac obj = obj in co2sobj_recvmsg, simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2155
apply (case_tac "cp2sproc s pa", simp add:co2sobj.simps)
75
chunhan
parents: 74
diff changeset
  2156
apply (simp, simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2157
apply (simp, frule_tac obj = obj in co2sobj_recvmsg, simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2158
apply (rule_tac x = obj in exI, simp add:co2sobj_recvmsg alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2159
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2160
apply (frule_tac obj = obj in co2sobj_recvmsg, simp split:t_object.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2161
apply (simp split:t_object.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2162
apply (rule_tac x = obj in exI, simp add:co2sobj_recvmsg is_dir_simps) 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2163
apply (rule_tac x = obj in exI, simp add:co2sobj_recvmsg) 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2164
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2165
apply (rule_tac x = "O_proc pa" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2166
apply (frule_tac obj = "O_proc pa" in co2sobj_recvmsg)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2167
apply (simp add:info_shm_flow_in_procs, simp add:info_shm_flow_in_procs)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2168
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2169
apply (rule impI, tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2170
apply (case_tac "obj = O_msgq q")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2171
apply (rule disjI1, simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2172
apply (rule disjI2, simp, rule conjI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2173
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2174
apply (simp add:co2sobj_recvmsg is_file_simps is_dir_simps alive_recvmsg 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2175
  split:t_object.splits if_splits option.splits)
75
chunhan
parents: 74
diff changeset
  2176
apply (simp add:co2sobj.simps info_flow_shm_tainted)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2177
apply (simp add:co2sobj_recvmsg)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2178
apply (simp add:alive_recvmsg split:if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2179
apply (erule_tac x = obj in allE, simp split:t_object.splits if_splits option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2180
apply (rule notI, simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2181
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2182
apply (rule_tac x = "O_msgq q" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2183
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2184
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2185
apply simp
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2186
apply (tactic {*my_clarify_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2187
apply (case_tac "obj = O_msgq q")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2188
apply (rule_tac x = obj' in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2189
apply (simp add:co2sobj_recvmsg is_file_simps is_dir_simps alive_recvmsg 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2190
  split:t_object.splits if_splits option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2191
apply (auto simp:co2sobj.simps is_file_simps is_dir_simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2192
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2193
apply (frule_tac obj = obj in co2sobj_recvmsg)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2194
apply (simp add:alive_recvmsg, rule notI, simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2195
apply (rule conjI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2196
apply (simp add:alive_recvmsg, rule notI, simp add:co2sobj.simps)
75
chunhan
parents: 74
diff changeset
  2197
apply (auto simp:co2sobj.simps split:t_object.splits option.splits if_splits)[1]
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2198
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2199
apply (tactic {*my_clarify_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2200
apply (tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2201
apply (case_tac "obj = O_msgq q")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2202
apply (rule disjI1, simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2203
apply (rule disjI2)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2204
apply (erule_tac obj = obj in co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2205
apply (case_tac "info_flow_shm s p pa")
75
chunhan
parents: 74
diff changeset
  2206
apply (case_tac "O_proc pa \<in> tainted s")
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2207
apply (rule DiffI, rule UnI1, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2208
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2209
apply (frule_tac obj = obj in co2sobj_recvmsg, simp, simp split:option.splits)
75
chunhan
parents: 74
diff changeset
  2210
apply (simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2211
apply (erule s2ss_shm_no_bk_intro2, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2212
apply (rule DiffI, rule UnI2, rule CollectI)
75
chunhan
parents: 74
diff changeset
  2213
apply (simp only:co2sobj.simps split:option.splits, simp)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2214
apply (rule_tac x = ab in exI, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2215
apply (rule_tac x = pa in exI, simp add:cp2sproc_other)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2216
apply (rule s2ss_shm_no_bk_intro2, simp, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2217
apply (rule DiffI, rule UnI1, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2218
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2219
apply (frule_tac obj = obj in co2sobj_recvmsg, simp, simp split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2220
apply (rule_tac p = pa in s2ss_shm_no_bk_intro3)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2221
apply (simp add:co2sobj_recvmsg, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2222
apply (rule DiffI, rule UnI1, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2223
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2224
apply (frule_tac obj = obj in co2sobj_recvmsg, simp, simp add:is_file_simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2225
apply (simp add:co2sobj_recvmsg s2ss_shm_no_bk_intro1)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2226
apply (rule DiffI, rule UnI1, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2227
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2228
apply (frule_tac obj = obj in co2sobj_recvmsg, simp, simp split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2229
apply (simp add:co2sobj_recvmsg s2ss_shm_no_bk_intro1)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2230
apply (rule DiffI, rule UnI1, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2231
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2232
apply (frule_tac obj = obj in co2sobj_recvmsg, simp, simp add:is_dir_simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2233
apply (simp add:co2sobj_recvmsg s2ss_shm_no_bk_intro1)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2234
apply (rule DiffI, rule UnI1, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2235
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2236
apply (frule_tac obj = obj in co2sobj_recvmsg, simp, simp split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2237
apply (simp add:co2sobj_recvmsg s2ss_shm_no_bk_intro1)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2238
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2239
apply (rule_tac x = "O_msgq q" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2240
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2241
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2242
apply (erule UnE, tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2243
apply (case_tac "obj = O_msgq q")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2244
apply (rule_tac x = obj' in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2245
apply (simp add:co2sobj_recvmsg is_file_simps is_dir_simps alive_recvmsg 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2246
  split:t_object.splits if_splits option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2247
apply (auto simp:co2sobj.simps is_file_simps is_dir_simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2248
apply (erule_tac obj = obj in co2sobj_some_caseD)
75
chunhan
parents: 74
diff changeset
  2249
apply (case_tac "info_flow_shm s p pa \<and> O_proc pa \<notin> tainted s")
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2250
apply (drule_tac p = pa in s2ss_shm_no_bk_elim', simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2251
apply (erule exE|erule conjE)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2252
apply (rule_tac x = "O_proc p'" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2253
apply (simp add:co2sobj_recvmsg alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2254
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2255
apply (case_tac "info_flow_shm s p pa", simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2256
apply (frule_tac obj = obj in co2sobj_recvmsg, simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2257
apply (case_tac "cp2sproc s pa", simp add:co2sobj.simps)
75
chunhan
parents: 74
diff changeset
  2258
apply (simp, simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2259
apply (simp, frule_tac obj = obj in co2sobj_recvmsg, simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2260
apply (rule_tac x = obj in exI, simp add:co2sobj_recvmsg alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2261
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2262
apply (frule_tac obj = obj in co2sobj_recvmsg, simp split:t_object.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2263
apply (simp split:t_object.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2264
apply (rule_tac x = obj in exI, simp add:co2sobj_recvmsg is_dir_simps) 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2265
apply (rule_tac x = obj in exI, simp add:co2sobj_recvmsg) 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2266
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2267
apply (rule_tac x = "O_proc pa" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2268
apply (frule_tac obj = "O_proc pa" in co2sobj_recvmsg)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2269
apply (simp add:info_shm_flow_in_procs, simp add:info_shm_flow_in_procs)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2270
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2271
apply (rule impI, tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2272
apply (case_tac "obj = O_msgq q")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2273
apply (rule disjI1, simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2274
apply (rule disjI2, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2275
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2276
apply (simp add:co2sobj_recvmsg is_file_simps is_dir_simps alive_recvmsg 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2277
  split:t_object.splits if_splits option.splits)
75
chunhan
parents: 74
diff changeset
  2278
apply (simp add:co2sobj.simps info_flow_shm_tainted)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2279
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2280
apply (rule_tac x = "O_msgq q" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2281
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2282
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2283
apply (case_tac "obj = O_msgq q")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2284
apply (rule_tac x = obj' in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2285
apply (simp add:co2sobj_recvmsg is_file_simps is_dir_simps alive_recvmsg 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2286
  split:t_object.splits if_splits option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2287
apply (auto simp:co2sobj.simps is_file_simps is_dir_simps)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2288
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2289
apply (frule_tac obj = obj in co2sobj_recvmsg)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2290
apply (simp add:alive_recvmsg, rule notI, simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2291
apply (rule conjI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2292
apply (simp add:alive_recvmsg, rule notI, simp add:co2sobj.simps)
75
chunhan
parents: 74
diff changeset
  2293
apply (auto simp:co2sobj.simps split:t_object.splits option.splits if_splits)[1]
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2294
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2295
apply (tactic {*my_clarify_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2296
apply (tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2297
apply (case_tac "obj = O_msgq q")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2298
apply (rule disjI1, simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2299
apply (rule disjI2)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2300
apply (erule_tac obj = obj in co2sobj_some_caseD)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2301
apply (case_tac "info_flow_shm s p pa")
75
chunhan
parents: 74
diff changeset
  2302
apply (case_tac "O_proc pa \<in> tainted s")
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2303
apply (rule DiffI, rule DiffI, rule UnI1, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2304
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2305
apply (frule_tac obj = obj in co2sobj_recvmsg, simp, simp split:option.splits)
75
chunhan
parents: 74
diff changeset
  2306
apply (simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2307
apply (erule s2ss_shm_no_bk_intro2, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2308
apply (simp, rule notI, simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2309
apply (rule DiffI, rule DiffI, rule UnI2, rule CollectI)
75
chunhan
parents: 74
diff changeset
  2310
apply (simp only:co2sobj.simps split:option.splits, simp)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2311
apply (rule_tac x = ab in exI, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2312
apply (rule_tac x = pa in exI, simp add:cp2sproc_other)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2313
apply (rule s2ss_shm_no_bk_intro2, simp, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2314
apply (simp, rule notI, simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2315
apply (rule DiffI, rule DiffI, rule UnI1, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2316
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2317
apply (frule_tac obj = obj in co2sobj_recvmsg, simp, simp split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2318
apply (rule_tac p = pa in s2ss_shm_no_bk_intro3)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2319
apply (simp add:co2sobj_recvmsg, simp, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2320
apply (simp, rule notI, simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2321
apply (rule DiffI, rule DiffI, rule UnI1, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2322
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2323
apply (frule_tac obj = obj in co2sobj_recvmsg, simp, simp add:is_file_simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2324
apply (simp add:co2sobj_recvmsg s2ss_shm_no_bk_intro1)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2325
apply (simp, rule notI, simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2326
apply (rule DiffI, rule DiffI, rule UnI1, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2327
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2328
apply (frule_tac obj = obj in co2sobj_recvmsg, simp, simp split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2329
apply (simp add:co2sobj_recvmsg s2ss_shm_no_bk_intro1)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2330
apply (simp, rule notI, simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2331
apply (rule DiffI, rule DiffI, rule UnI1, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2332
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2333
apply (frule_tac obj = obj in co2sobj_recvmsg, simp, simp add:is_dir_simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2334
apply (simp add:co2sobj_recvmsg s2ss_shm_no_bk_intro1)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2335
apply (simp, rule notI, simp add:co2sobj.simps split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2336
apply (rule DiffI, rule DiffI, rule UnI1, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2337
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2338
apply (frule_tac obj = obj in co2sobj_recvmsg, simp, simp split:option.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2339
apply (simp add:co2sobj_recvmsg s2ss_shm_no_bk_intro1)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2340
apply (simp, rule notI, erule_tac x = obj in allE, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2341
apply (simp add:co2sobj_recvmsg)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2342
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2343
apply (rule_tac x = "O_msgq q" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2344
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2345
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2346
apply (erule UnE, tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2347
apply (case_tac "obj = O_msgq q")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2348
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2349
apply (erule_tac obj = obj in co2sobj_some_caseD)
75
chunhan
parents: 74
diff changeset
  2350
apply (case_tac "info_flow_shm s p pa \<and> O_proc pa \<notin> tainted s")
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2351
apply (drule_tac p = pa in s2ss_shm_no_bk_elim', simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2352
apply (erule exE|erule conjE)+
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2353
apply (rule_tac x = "O_proc p'" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2354
apply (simp add:co2sobj_recvmsg alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2355
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2356
apply (case_tac "info_flow_shm s p pa", simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2357
apply (frule_tac obj = obj in co2sobj_recvmsg, simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2358
apply (case_tac "cp2sproc s pa", simp add:co2sobj.simps)
75
chunhan
parents: 74
diff changeset
  2359
apply (simp, simp add:co2sobj.simps)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2360
apply (simp, frule_tac obj = obj in co2sobj_recvmsg, simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2361
apply (rule_tac x = obj in exI, simp add:co2sobj_recvmsg alive_simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2362
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2363
apply (frule_tac obj = obj in co2sobj_recvmsg, simp split:t_object.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2364
apply (simp split:t_object.splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2365
apply (rule_tac x = obj in exI, simp add:co2sobj_recvmsg is_dir_simps) 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2366
apply (rule_tac x = obj in exI, simp add:co2sobj_recvmsg) 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2367
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2368
apply (rule_tac x = "O_proc pa" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2369
apply (frule_tac obj = "O_proc pa" in co2sobj_recvmsg)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2370
apply (simp add:info_shm_flow_in_procs, simp add:info_shm_flow_in_procs)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2371
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2372
apply (rule impI, tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2373
apply (case_tac "obj = O_msgq q")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2374
apply (rule disjI1, simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2375
apply (rule disjI2, simp, rule conjI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2376
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2377
apply (simp add:co2sobj_recvmsg is_file_simps is_dir_simps alive_recvmsg 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2378
  split:t_object.splits if_splits option.splits)
75
chunhan
parents: 74
diff changeset
  2379
apply (simp add:co2sobj.simps info_flow_shm_tainted)
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2380
apply (rule notI, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2381
apply (frule co2sobj_smsgq_imp, erule exE, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2382
apply (simp add:co2sobj_recvmsg)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2383
apply (erule_tac x = obj in allE, simp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2384
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2385
apply (rule_tac x = "O_msgq q" in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2386
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2387
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2388
apply (simp, erule exE, erule conjE)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2389
apply (case_tac "obj = O_msgq q")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2390
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2391
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2392
apply (frule_tac obj = obj in co2sobj_recvmsg)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2393
apply (simp add:alive_recvmsg, rule notI, simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2394
apply (rule conjI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2395
apply (simp add:alive_recvmsg, rule notI, simp add:co2sobj.simps)
75
chunhan
parents: 74
diff changeset
  2396
apply (auto simp:co2sobj.simps intro: info_flow_shm_tainted 
74
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2397
split:t_object.splits option.splits if_splits)[1]
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2398
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2399
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2400
lemma s2ss_createshm:
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2401
  "valid (CreateShM p h # s) \<Longrightarrow> s2ss (CreateShM p h # s) = 
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2402
     (case (ch2sshm (CreateShM p h # s) h) of
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2403
        Some sh \<Rightarrow> s2ss s \<union> {S_shm sh}
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2404
      | _       \<Rightarrow> {})"
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2405
apply (frule vd_cons, frule vt_grant_os, clarsimp)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2406
apply (case_tac "ch2sshm (CreateShM p h # s) h")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2407
apply (drule current_shm_has_sh', simp+)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2408
apply (simp add:s2ss_def)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2409
apply (tactic {*my_seteq_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2410
apply (case_tac "obj = O_shm h")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2411
apply (rule disjI1, simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2412
apply (rule disjI2, simp, rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2413
apply (simp add:co2sobj_createshm is_file_simps is_dir_simps split:t_object.splits if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2414
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2415
apply (simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2416
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2417
apply (rule_tac x = "O_shm h" in exI, simp add:co2sobj.simps)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2418
apply (tactic {*my_setiff_tac 1*})
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2419
apply (case_tac "obj = O_shm h")
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2420
apply simp
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2421
apply (rule_tac x = obj in exI)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2422
apply (auto simp add:co2sobj_createshm alive_simps split:t_object.splits if_splits)
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2423
done
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2424
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2425
end
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2426
271e9818b6f6 remove shm and linkhard, make a simplified version of selinux
chunhan
parents:
diff changeset
  2427
end