Skip to content

Commit

Permalink
chore: Update seccomp filters to include sched_yield
Browse files Browse the repository at this point in the history
With rust 1.67.0, the implementation for std::sync::mpmc (which we
transitively use through using mpsc channels) got switched out for
crossbeam's implementation, which includes a `sched_yield` syscall
[1].

[1]: https://github.com/rust-lang/rust/blame/cf32b9de1e8f66526c36ad2927458558d2e81093/library/std/src/sync/mpmc/utils.rs#L130

Signed-off-by: Patrick Roy <[email protected]>
  • Loading branch information
roypat authored and dianpopa committed Apr 3, 2023
1 parent 7843fa9 commit 2fbbd9e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions resources/seccomp/aarch64-unknown-linux-musl.json
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,10 @@
"comment": "KVM_GET_DEVICE_ATTR"
}
]
},
{
"syscall": "sched_yield",
"comment": "Used by the rust standard library in std::sync::mpmc. Firecracker uses mpsc channels from this module for inter-thread communication"
}
]
},
Expand Down Expand Up @@ -690,6 +694,10 @@
"comment": "FIONBIO"
}
]
},
{
"syscall": "sched_yield",
"comment": "Used by the rust standard library in std::sync::mpmc. Firecracker uses mpsc channels from this module for inter-thread communication"
}
]
},
Expand Down Expand Up @@ -968,6 +976,10 @@
"comment": "KVM_GET_REG_LIST"
}
]
},
{
"syscall": "sched_yield",
"comment": "Used by the rust standard library in std::sync::mpmc. Firecracker uses mpsc channels from this module for inter-thread communication"
}
]
}
Expand Down
12 changes: 12 additions & 0 deletions resources/seccomp/x86_64-unknown-linux-musl.json
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,10 @@
"comment": "KVM_GET_PIT2"
}
]
},
{
"syscall": "sched_yield",
"comment": "Used by the rust standard library in std::sync::mpmc. Firecracker uses mpsc channels from this module for inter-thread communication"
}
]
},
Expand Down Expand Up @@ -702,6 +706,10 @@
"comment": "FIONBIO"
}
]
},
{
"syscall": "sched_yield",
"comment": "Used by the rust standard library in std::sync::mpmc. Firecracker uses mpsc channels from this module for inter-thread communication"
}
]
},
Expand Down Expand Up @@ -1172,6 +1180,10 @@
"comment": "KVM_GET_TSC_KHZ"
}
]
},
{
"syscall": "sched_yield",
"comment": "Used by the rust standard library in std::sync::mpmc. Firecracker uses mpsc channels from this module for inter-thread communication"
}
]
}
Expand Down

0 comments on commit 2fbbd9e

Please sign in to comment.