With this commit, rosenpass uses a signal handler based on the signal-hook-mio crate.
Even though, in this commit, no rosenpass-rp code is touched, this also
fixes the signal handling in rosenpass-rp. The way rosenpass is
integrated in rp is a bit of a hack – it just directly embeds
rosenpass in the same process (though on a dedicated thread). For this
reason, rp now just inherits rosenpass' signal handlers. The
rosenpass event_loop() will terminate. The main loop of `rp` just spends
most of the time waiting for rosenpass itself to finish, and exits when
it finishes.
Unfortunately, this means we are not using signalfd(2)[^0]; the
signal-hook-mio crate appears to use a pipe-based mechanism to deliver
events to mio instead.
This may not be such a bad thing, as signalfd has some severe drawbacks
with respect to subprocesses and masked signals[^1].
Fixes: #358 (https://github.com/rosenpass/rosenpass/issues/385)
Fixes: #522 (https://github.com/rosenpass/rosenpass/issues/522)
Fixes: #678 (https://github.com/rosenpass/rosenpass/pull/678)
[^0]: https://unixism.net/2021/02/making-signals-less-painful-under-linux/
[^1]: https://ldpreload.com/blog/signalfd-is-useless?reposted-on-request
This commit introduces two kinds of benchmarks:
1. Cryptographic Primitives. Measures the performance of all available
implementations of cryptographic algorithms using traditional
benchmarking. Uses criterion.
2. Protocol Runs. Measures the time each step in the protocol takes.
Measured using a tracing-based approach.
The benchmarks are run on CI and an interactive visual overview is
written to the gh-pages branch. If a benchmark takes more than twice the
time than the reference commit (for PR: the main branch), the action
fails.
Before this change, the patch release was left open. This patch
pinpoints it exactly, down to the patch release.
Signed-off-by: wucke13 <wucke13+github@gmail.com>
This implicates a change from nixpkgs-fmt to nixfmt. Nixfmt will become
the new standard on nix formatting, sanctioned by the nixpkgs. To verify
that these changes are purely in whitespace, but not semantic:
git diff --ignore-all-space -w HEAD^!
That will only show newline changes, make the diffing somewhat easier.
Signed-off-by: wucke13 <wucke13+github@gmail.com>
- Had to remove the test checking for manpages to be generated for
the keygen command since clap-mangen disabled creating manpages
for hidden commands.
d96cc71626
- Had to pin home to the previous version because it now requires a
new rust version without major version update
- Changed util/src/fd tests due to false positives in CI
> note: panic did not contain expected string
> panic message: `"fd != -1"`,
> expected substring: `"fd != u32::MAX as RawFd"`
There's a more complete module description for the encoder and decoder now. Both versions get appended by rustdoc, which looks wrong and shouldn't be necessary.
There's some redundancy here with the docstring examples/tests, but that's entirely on purpose:
Unfortunately, it seems that the coverage tool has trouble recognizing calls from within the docstring examples. It's an unstable feature - maybe that's why?
Even with these tests, the tool still doesn't properly detect everything. Regardless, function coverage is 100% when running the coverage tool locally.