Skip to content

Commit

Permalink
CUnseal: permit any in-bound type
Browse files Browse the repository at this point in the history
FIXES #71
  • Loading branch information
nwf committed Nov 15, 2024
1 parent 789dd7e commit 8b12792
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/cheri_insts.sail
Original file line number Diff line number Diff line change
Expand Up @@ -754,10 +754,8 @@ function clause execute (CUnseal(cd, cs1, cs2)) = {
let permitted = cs2_val.tag
& isCapSealed(cs1_val)
& not(isCapSealed(cs2_val))
& (cs2_addr == unsigned(cs1_val.otype))
& cs2_val.permit_unseal
& (cs2_addr >= cs2_base)
& (cs2_addr < cs2_top);
& inCapBounds(cs2_val, zero_extend(cs1_val.otype), 1)
& cs2_val.permit_unseal;
let new_global = cs1_val.global & cs2_val.global;
let newCap = {unsealCap(cs1_val) with global=new_global};
C(cd) = clearTagIf(newCap, not(permitted));
Expand Down

0 comments on commit 8b12792

Please sign in to comment.