Skip to content

Commit

Permalink
Clarify permissions when the level extension is not implemented
Browse files Browse the repository at this point in the history
Update the infinite cap bit pattern and add a note to GCPERM.
  • Loading branch information
arichardson committed Jan 7, 2025
1 parent 8a556fc commit 2b4bbb4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cap-description.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ or 'root' capability.
| SDP | ones | Grants all permissions
| AP (MXLEN=32) | 0x8/0x9^1^ (see xref:cap_perms_encoding32[xrefstyle=short])
| Grants all permissions
| AP (MXLEN=64) | 0xFF (see xref:cap_perms_encoding64[xrefstyle=short])
| AP (MXLEN=64) | 0x3F/0xFF^3^ (see xref:cap_perms_encoding64[xrefstyle=short])
| Grants all permissions
| CL | one^2^| _Global_
| CT | zero | Unsealed
Expand All @@ -652,6 +652,8 @@ or 'root' capability.

^2^ This field only exists if {cheri_levels_ext_name} is implemented.

^3^ When {cheri_levels_ext_name} is not implemented the value is 0x3f since the bits reserved for `EL` and `SL` must be zero.

[#section_cap_representable_check, reftext="Representable Range"]
=== Representable Range Check

Expand Down
3 changes: 3 additions & 0 deletions src/insns/gcperm_32bit.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ permission bits in `rd` are set to 0.
[#gcperm_bit_field]
include::../img/acperm_bit_field.edn[]

NOTE: When {cheri_levels_ext_name} is not implemented, the `CL`, `SL`, and `EL` fields always report 0.
Therefore, the presence of the {cheri_levels_ext_name} can be detected by checking the <<GCPERM>> result on the <<infinite-cap>>.

Exceptions::
include::require_cre.adoc[]

Expand Down

0 comments on commit 2b4bbb4

Please sign in to comment.