def ex.nonroot_p

bend-osdev-caps@0.1.0.0 · PROOF.bend:783

import bend-osdev-caps@0.1.0.0/PROOF.bend as PROOF
import Base
import bend-osdev-caps@0.1.0.0/caps.bend as C
import bend-osdev-caps@0.1.0.0/exec.bend as E

783def ex.nonroot_p(+nr: Bool, +r0: Bool, +e0: Bool, +s: C.CapState) -> {r0 == False{} : Bool} -> {e0 == False{} : Bool} -> {C.CapState.permitted(E.CapExec.sets(E.CapExec.flags.go(nr, r0, e0, False{}, None{}), s)) == C.CapState.ambient(s) : C.CapSet()}:
784  match nr r0 e0 s:
785    case True{} r0 e0 C.CapState{+p, +i, +e, +b, +a}:
786      hr => he => set.nonroot(i, b, a)
787    case False{} True{} e0 C.CapState{+p, +i, +e, +b, +a}:
788      hr => he => bits.absurd_tf(C.CapSet(), C.CapState.permitted(E.CapExec.sets(E.CapExec.flags.go(False{}, True{}, e0, False{}, None{}), C.CapState{p, i, e, b, a})), a, hr)
789    case False{} False{} True{} C.CapState{+p, +i, +e, +b, +a}:
790      hr => he => bits.absurd_tf(C.CapSet(), C.CapState.permitted(E.CapExec.sets(E.CapExec.flags.go(False{}, False{}, True{}, False{}, None{}), C.CapState{p, i, e, b, a})), a, he)
791    case False{} False{} False{} C.CapState{+p, +i, +e, +b, +a}:
792      hr => he => set.nonroot(i, b, a)

Uses (10)

Used by (1)