software_revoker: revoker_tick return 0
Quiet the compiler's warning of void cross-compartment calls
diff --git a/sdk/core/allocator/revoker.h b/sdk/core/allocator/revoker.h
index e484b4f..891445d 100644
--- a/sdk/core/allocator/revoker.h
+++ b/sdk/core/allocator/revoker.h
@@ -389,7 +389,7 @@
// time that it's queried.
if ((current & 1) == 1)
{
- revoker_tick();
+ (void)revoker_tick();
current = *epoch;
}
// We want to know if current is greater than epoch, but current
@@ -415,7 +415,7 @@
/// Start revocation running.
void system_bg_revoker_kick()
{
- revoker_tick();
+ (void)revoker_tick();
}
};
diff --git a/sdk/core/allocator/software_revoker.h b/sdk/core/allocator/software_revoker.h
index 561e021..11066ca 100644
--- a/sdk/core/allocator/software_revoker.h
+++ b/sdk/core/allocator/software_revoker.h
@@ -6,10 +6,14 @@
/**
* Prod the software revoker to do some work. This does not do a complete
- * revocation pass, it will scan a region of memory and then return.
+ * revocation pass; it will scan a region of memory and then return.
+ *
+ * Returns 0 on success, a compartment invocation failure indication
+ * (-ENOTENOUGHSTACK, -ENOTENOUGHTRUSTEDSTACK) if it cannot be invoked, or
+ * possibly -ECOMPARTMENTFAIL if the software revoker compartment is damaged.
*/
[[cheri::interrupt_state(disabled)]] __cheri_compartment(
- "software_revoker") void revoker_tick();
+ "software_revoker") int revoker_tick();
/**
* Returns a read-only capability to the current revocation epoch. If the low
diff --git a/sdk/core/software_revoker/revoker.cc b/sdk/core/software_revoker/revoker.cc
index 445c778..3db6041 100644
--- a/sdk/core/software_revoker/revoker.cc
+++ b/sdk/core/software_revoker/revoker.cc
@@ -159,7 +159,7 @@
} // namespace
-void revoker_tick()
+int revoker_tick()
{
// If we've been asked to run, make sure that we're running.
if (state == State::NotRunning)
@@ -167,7 +167,9 @@
advance();
}
// Do some work.
- return scan_range();
+ scan_range();
+
+ return 0;
}
const uint32_t *revoker_epoch_get()