Skip to content

Commit

Permalink
minor: pass through key mgmt syscalls explicitly and note the TODO
Browse files Browse the repository at this point in the history
Summary: These were not being mentioned at all in the syscall subscription list, but they are a source of nondeterminism, as described in issue #30.

Reviewed By: VladimirMakaev

Differential Revision: D41613558

fbshipit-source-id: f481fc9baf3e05467ad2f6e0a97b9023b6a24a34
  • Loading branch information
rrnewton authored and facebook-github-bot committed Dec 7, 2022
1 parent f40bd81 commit 3a67ab9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions detcore/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,13 @@ impl<T: RecordOrReplay> Tool for Detcore<T> {
]);
}

if true
// TODO: could introduce a flag for this:
/* config.virtualize_keys */
{
subscription.syscalls([Sysno::add_key, Sysno::request_key, Sysno::keyctl]);
}

if do_sched {
subscription.syscall(Sysno::connect);
}
Expand Down Expand Up @@ -1070,6 +1077,11 @@ impl<T: RecordOrReplay> Tool for Detcore<T> {
Syscall::Sigaltstack(_) => self.passthrough(guest, call).await,
Syscall::Sysinfo(s) => self.handle_sysinfo(guest, s).await,

// TODO(#30) handle key mgmt syscalls, virtualizing serial numbers:
Syscall::AddKey(_) => self.passthrough(guest, call).await,
Syscall::Keyctl(_) => self.passthrough(guest, call).await,
Syscall::RequestKey(_) => self.passthrough(guest, call).await,

_ => {
if config.panic_on_unsupported_syscalls {
error!(
Expand Down

0 comments on commit 3a67ab9

Please sign in to comment.