Skip to content

CW and CD bits in PTE #113

@andresag01

Description

@andresag01

The CHERI specification adds two bits (CW and CD) to the RISC-V PTEs to control capabilities being written into pages. However, raising the appropriate exceptions is dependent on the stored data tag value when executing store-capability instructions. In some hardware implementations, the stored data arrives late in the pipeline, which may cause problems because these exceptions in connection with CW and CD would have to be resolved very late.

An alternative to eliminate the store-capability dependency on the stored tag data is to always raise the exception when CD is 0, but this would not work well with memcpy which relies on store-capability instructions.

Another alternative is to:

  • Automatically clear the tag when CW is 0, and
  • Always raise the exception when CW is 1 and CD is 0

But this causes compatibility problems with existing software that does not consider whether a page has CW set to 1 or 0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions