Skip to content

Commit f509f2b

Browse files
local/global clarification (#436)
Fix #432 --------- Signed-off-by: Tariq Kurd <tariqandlaura@gmail.com> Co-authored-by: Alexander Richardson <mail@alexrichardson.me>
1 parent cd01404 commit f509f2b

4 files changed

+6
-4
lines changed

src/insns/atomic_exceptions.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ If <<c_perm>> is not granted then store the memory tag as zero, and load `cd.tag
88
+
99
If the authorizing capability does not grant <<lm_perm>>, and the tag of `cd` is 1 and `cd` is not sealed, then an implicit <<ACPERM>> clearing <<w_perm>> and <<lm_perm>> is performed to obtain the intermediate permissions on `cd` (see <<LC>>).
1010
+
11-
If the authorizing capability does not grant <<el_perm>>, and the tag of `cd` is 1, then an implicit <<ACPERM>> clearing <<el_perm>> and restricting <<section_cap_level>> to the level of the authorizing capability is performed to obtain the final permissions on `cd` (see <<LC>>).
11+
If the authorizing capability does not grant <<el_perm>>, and the tag of `cd` is 1, then an implicit <<ACPERM>> clearing <<el_perm>> and restricting the <<section_cap_level>> to the level of the authorizing capability is performed to obtain the final permissions on `cd` (see <<LC>>).
1212
+
1313
The stored tag is also set to zero if the authorizing capability does not have <<sl_perm>> set but the stored data has a <<section_cap_level>> of 0 (see <<SC>>).
1414
endif::[]

src/insns/load_tag_perms.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The tag value written to `cd` is 0 if the tag of the memory location loaded is
44
+
55
If the authorizing capability does not grant <<lm_perm>>, and the tag of `cd` is 1 and `cd` is not sealed, then an implicit <<ACPERM>> clearing <<w_perm>> and <<lm_perm>> is performed to obtain the intermediate permissions on `cd`.
66
+
7-
If the authorizing capability does not grant <<el_perm>>, and the tag of `cd` is 1, then an implicit <<ACPERM>> clearing <<el_perm>> and restricting <<section_cap_level>> to the level of the authorizing capability is performed to obtain the final permissions on `cd`.
7+
If the authorizing capability does not grant <<el_perm>>, and the tag of `cd` is 1, then an implicit <<ACPERM>> clearing <<el_perm>> and restricting the <<section_cap_level>> to the level of the authorizing capability is performed to obtain the final permissions on `cd`.
88

99
NOTE: Missing <<lm_perm>> does not affect untagged values since this could result in surprising bit patterns when copying non-capability data.
1010
Similarly, sealed capabilities are not modified as they are not directly dereferenceable.

src/insns/store_tag_perms.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ Tag of the written capability value::
22

33
The capability written to memory has the tag set to 0 if the tag of `cs2` is 0 or if the authorizing capability (<<ddc>> or `cs1`) does not grant <<c_perm>>.
44
+
5-
The stored tag is also set to zero if the authorizing capability does not have <<sl_perm>> set but the stored data has a <<section_cap_level>> of 0.
5+
The stored tag is also set to zero if the authorizing capability does not have <<sl_perm>> set but the stored data has a <<section_cap_level>> of 0 (_local_).

src/level-ext.adoc

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ NOTE: The <<cap_encoding_xlen64,`MXLEN=64` capability encoding>> diagram shows t
2424
NOTE: {cheri_levels_ext_name} requires that LVLBITS&#8805;1 although LVLBITS>1 is considered an experimental enhancement of this extension.
2525
See <<section_ext_cheri_multiple_levels>> for the mechanics when LVLBITS>1.
2626

27-
[#section_cap_level,reftext="capability level"]
27+
[#section_cap_level,reftext="Capability Level (CL)"]
2828
==== Capability Level (CL)
2929

3030
The Capability Level (CL) is a new field added to the capability encoding, as shown in xref:section_cap_encoding[xrefstyle=short].
@@ -108,6 +108,8 @@ This avoids the need for a dedicated instruction and allows reducing the level a
108108
[#section_cap_level_summary]
109109
=== Capability level summary table
110110

111+
NOTE: A capability with <<section_cap_level,CL>>=1 is _global_ and with <<section_cap_level,CL>>=0 is _local_.
112+
111113
.{cheri_levels_ext_name} `LVLBITS=1` summary table for stored capabilities
112114
[#cap_level_store_summary,width="100%",options=header,halign=center,cols="1,1,1,1,5"]
113115
|==============================================================================

0 commit comments

Comments
 (0)