Fixed an issue where return sentries weren't being sealed properly. PiperOrigin-RevId: 707173405 Change-Id: Ia126d4ef1eac55cd521f06a0d455925a5fbe2366
diff --git a/cheriot/mpact_cheriot.cc b/cheriot/mpact_cheriot.cc index ef14699..74efd2c 100644 --- a/cheriot/mpact_cheriot.cc +++ b/cheriot/mpact_cheriot.cc
@@ -82,7 +82,7 @@ using ::mpact::sim::util::TaggedMemoryUseProfiler; // Flat to specify core version. -ABSL_FLAG(int, core_version, 100, "Core version"); +ABSL_FLAG(int, core_version, 50, "Core version"); // Flags for specifying interactive mode. ABSL_FLAG(bool, i, false, "Interactive mode"); ABSL_FLAG(bool, interactive, false, "Interactive mode");
diff --git a/cheriot/riscv_cheriot_instructions.cc b/cheriot/riscv_cheriot_instructions.cc index 06d20a1..d1b1637 100644 --- a/cheriot/riscv_cheriot_instructions.cc +++ b/cheriot/riscv_cheriot_instructions.cc
@@ -518,6 +518,8 @@ case CapReg::kInterruptInheritingSentry: case CapReg::kInterruptDisablingForwardSentry: case CapReg::kInterruptEnablingForwardSentry: + case CapReg::kInterruptDisablingBackwardSentry: + case CapReg::kInterruptEnablingBackwardSentry: case CapReg::kSealedExecutable6: case CapReg::kSealedExecutable7: permitted_otype = cs1->HasPermission(CapReg::kPermitExecute);
diff --git a/cheriot/test/riscv_cheriot_instructions_test.cc b/cheriot/test/riscv_cheriot_instructions_test.cc index 3271a58..2a10c91 100644 --- a/cheriot/test/riscv_cheriot_instructions_test.cc +++ b/cheriot/test/riscv_cheriot_instructions_test.cc
@@ -1452,6 +1452,8 @@ if ((o_type == OT::kInterruptInheritingSentry) || (o_type == OT::kInterruptDisablingForwardSentry) || (o_type == OT::kInterruptEnablingForwardSentry) || + (o_type == OT::kInterruptDisablingBackwardSentry) || + (o_type == OT::kInterruptEnablingBackwardSentry) || (o_type == OT::kSealedExecutable6) || (o_type == OT::kSealedExecutable7)) { EXPECT_TRUE(c3_reg()->tag());