Summary:
Update num_cpus to version 1.16.0. We need this version as it is a requirement
of libbpf-sys v1.2.1+v1.2.0, which is to be imported subsequently.
Reviewed By: zertosh
Differential Revision: D47380958
fbshipit-source-id: d1fa12a1c8a974686d70d47876e990da4a73b839
Summary:
Note: this is a re-land of D44623815, which was was reverted because of a land race with D44626072
In particular this fixes `FlattenUnordered` having a nasty deadlock, but also
some other bugs:
```
# 0.3.28 - 2023-03-30
* Update to syn 2. This raises MSRV of utility crates to 1.56. (#2730, #2733)
* Fix bug in `FlattenUnordered` (#2726, #2728)
# 0.3.27 - 2023-03-11
* Add `TryFlattenUnordered` (#2577, #2590, #2606, #2607)
* Add `AbortHandle::is_aborted` (#2710)
* Add `AbortRegistration::handle` (#2712)
* Make `BiLock` strict-provenance compatible (#2716)
# 0.3.26 - 2023-01-30
* Add `Either::as_pin_mut` and `Either::as_pin_ref` (#2691)
* Add `Shared::ptr_eq` and `Shared::ptr_hash` (#2691)
* Implement `FusedStream` for `Buffered` (#2676)
* Implement `FusedStream` for all streams in `ReadyChunks` (#2693)
* Fix bug in `FuturesOrdered::push_front` (#2664)
* Remove `Fut::Output: Clone` bounds from some `Shared` methods (#2662)
* Remove `T: Debug` bounds from `Debug` implementations of `mpsc` and `oneshot` types (#2666, #2667)
# 0.3.25 - 2022-10-20
* Fix soundness issue in `join!` and `try_join!` macros (#2649)
* Implement `Clone` for `sink::Drain` (#2650)
# 0.3.24 - 2022-08-29
* Fix incorrect termination of `select_with_strategy` streams (#2635)
# 0.3.23 - 2022-08-14
* Work around MSRV increase due to a cargo bug.
```
Reviewed By: zertosh
Differential Revision: D44632588
fbshipit-source-id: bdd87cb02b3aef63a65b1f9b852579225adfedbd
Summary:
Removes need for patch.
It had already been updated to 3.4 but this just formalizes it.
Reviewed By: jasonwhite
Differential Revision: D44274378
fbshipit-source-id: d17ecbbee06c7df30f689eb859fb31fdf07d8d44
Summary:
Everything in Reverie is super Linux-specific, so we should just skip compilation if we're not targetting Linux.
This is helpful for consumers of the library when it gets published to crates.io. With this, they don't need to have a special case for this in the `[dependencies]` section of `Cargo.toml`.
Reviewed By: VladimirMakaev
Differential Revision: D41824410
fbshipit-source-id: be1e0a887e35ed151cfad27af8107246df30c2e5
Summary: Missed these in a previous diff.
Reviewed By: rrnewton
Differential Revision: D41567346
fbshipit-source-id: eba0b738a66da1823312803ed91fdc5eeaf90c57
Summary: This size optimization relies on a nightly feature that will likely never be stabilized. All it did was make `Option<Fd>` equal to 4 bytes instead of 8 bytes.
Reviewed By: rrnewton
Differential Revision: D41506685
fbshipit-source-id: 15aa75b01200ff7f179373b07e14f542590aa24d
Summary: `std::io::set_output_capture()` is only available in nightly. In order to publish this crate, we can't use unstable features.
Reviewed By: rrnewton
Differential Revision: D41394375
fbshipit-source-id: d4b6e9310cd6d6925aa9d7b0cd5c4558d6ef7d4c
Summary: Refactors `do_exec` a little bit so that it no longer needs the `never_type` feature. This doesn't affect correctness at all.
Reviewed By: rrnewton
Differential Revision: D41394377
fbshipit-source-id: 30e8793557d12d9aef1c5641eb782b170f86512b
Summary: The usage of `rustc_attrs` is completely optional and only serves as a size optimization for the `Fd` type.
Reviewed By: rrnewton
Differential Revision: D41394376
fbshipit-source-id: 2f4898b872dc32c517df99e0b5f4a82fad5bda77
Summary:
This adds the "nightly" crate feature to `reverie-process` so that it can use nightly features if they are enabled.
This *should* let it still get uploaded to crates.io, but some fancy optional nightly features will be hidden behind this feature flag. Then, we can still use these features internally.
Reviewed By: rrnewton
Differential Revision: D41394572
fbshipit-source-id: 6f5eaccd070f85c839089d3d5e5994471948afd4
Summary: These previous launch_* functions can be simplified by using RunOpts to contain all the relevant information about a run, plus everything needed to print a reproducer command.
Reviewed By: VladimirMakaev
Differential Revision: D41329114
fbshipit-source-id: 5bab08dfbf28e1cee7fd244178e03ba2cdc1ba34
Summary: This fixes the initial syscall injection on aarch64. This also does slight simplification of the instructions that get plopped down at the current instruction pointer so that we can fit the instructions into a single word. That is, instead of injecting `INT3; SYSCALL; INT3`, we inject `SYSCALL; INT3`.
Reviewed By: VladimirMakaev
Differential Revision: D40867427
fbshipit-source-id: 2afa96f2270e16284523a17b09da00529893c20e
Summary: Gets all tests in `reverie-process` successfully working on aarch64.
Reviewed By: VladimirMakaev
Differential Revision: D40867425
fbshipit-source-id: 4aa7b0be17a40f677baf5de312a0765f8c41c2a4
Summary: Update from 0.2.135 to 0.2.137, the latest version on crates.io, in preparation for backporting a PR in the diff after this one.
Reviewed By: zertosh
Differential Revision: D40874274
fbshipit-source-id: debf9dae82ecc20201470e634f10904a2b308e51
Summary:
Followed guide here https://www.internalfb.com/intern/wiki/Linting/License_Lint/ to add fbcode/hermetic_infra/** code to license linter. As we have parts of our code shipped as Open Source it's important to get this automated
This diff is updating existing file's licenses to not get conflict after lint rule enablement
Reviewed By: jasonwhite
Differential Revision: D40674080
fbshipit-source-id: da6ecac036f8964619cf7912058f3a911558e7b1
Summary: This updates the libc crate to 0.2.135, which includes the FICLONE constant needed to the given ioctl.
Reviewed By: justintrudell
Differential Revision: D40286796
fbshipit-source-id: acfa115479cd289f478d8d73937be34ced5c4bbb
Summary:
When I was trying to use `nix::unistd::gethostname` in D39783468, the version `0.23.0` will require users to pass in a `buf` as a parameter, however, in `0.25.0`, there is no need to pass in a `buf` as a parameter. Hence, I would love to update `nix` crate from `0.23` to `0.25` in order to not pass a redundant `buf` while calling `nix::unistd::gethostname`.
I fixed conflicts reflected from the signals manually so this diff is more than a few lines of code in `Cargo.toml`.
Here are the [changes](https://github.com/nix-rust/nix/compare/v0.23.0..v0.25.0) between `0.23` and `0.25`. See `CHANGELOG.md` for the most significant changes in this version.
Reviewed By: bgw
Differential Revision: D39919100
fbshipit-source-id: 7f62585ff72230bd2608aeb5a4780dc0128795f7
Summary: D39418421 (8fef664fab) prematurely upgraded `thiserror`. Various projects in fbcode use nightly features including std::backtrace but the current fbcode Rust toolchain is 1.63.0, in which the backtrace API is different from the API of the latest nightlies.
Reviewed By: quark-zju
Differential Revision: D39562441
fbshipit-source-id: d1f8a993ec776cf82b1736b242bd4466def21230
Summary:
## v0.6.5
- Renamed `with-serde` feature to just `serde`. The `with-serde` feature will
be removed in the next major release.
- Implemented `Serialize` and `Deserialize` for `SysnoSet`.
## v0.6.4
- Implemented `Default`, `BitOr`, and `BitOrAssign` for `SysnoSet`.
## v0.6.3
- Added features to expose the syscall tables of other architectures besides
the target architecture. There is one feature per architecture and have the
same name. For example, if the target architecture is `x86-64` and we also
want the syscall table for `x86`, the `x86` feature can be enabled. Then,
`syscalls::x86::Sysno` will be exposed.
- Added the `all` feature, which enables the syscall tables for all
architectures.
- Added the `full` feature, which enables all current and future features for
the crate.
- Added man page links for all syscalls. Since these are generated, some links
may be broken.
Reviewed By: johnhurt
Differential Revision: D37871066
fbshipit-source-id: 4aa4674d0dcf1168d989a34062befa3b07456d68
Summary: This makes merge conflicts much easier to handle.
Reviewed By: johnhurt
Differential Revision: D37564000
fbshipit-source-id: a7f1a2711ffbdbb23c93e2f479f47d0368a2dad9
Summary:
From the changelog:
- Added `SysnoSet` for constructing sets of syscalls. It uses a bitset under
the hood and provides constant-time lookup and insertion of `Sysno`s.
- Fixed `Sysno::len()` returning the wrong value for architectures with large
syscall offsets.
- Deprecated `Sysno::len()`. Use `Sysno::table_size()` instead. This will be
removed in the next major version.
Differential Revision: D37556871
fbshipit-source-id: a287f2146a0776e6f0459a08b43a1d5a92bb6176
Summary: The OSS license linter doesn't like the word "its".
Reviewed By: johnhurt
Differential Revision: D36856385
fbshipit-source-id: 909037d96de8976f08004497d28b77838f8c6870
Summary:
Changelog:
* Removed `build.rs` and switched to Rust's inline assembly syntax. This should enable better codegen, including the ability to have syscalls get inlined.
* **Breaking**: Architectures besides `arm`, `x86`, and `x86-64` now require nightly.
* **Breaking**: Removed top-level `SYS_` constants. Just use the `Sysno` enum instead.
Reviewed By: johnhurt
Differential Revision: D36606892
fbshipit-source-id: 9d20addfec65fa712b25d9449ec6e414187565ca
Summary:
See https://github.com/jasonwhite/syscalls/blob/master/CHANGELOG.md
The biggest change here is that the type of syscall registers and return values was changed from `u64` to `usize` (to support 32-bit architectures).
Reviewed By: zertosh
Differential Revision: D36157822
fbshipit-source-id: d8776b6809dd00df93b147ee34deb37df61a2675