Summary:
X-link: https://github.com/facebookresearch/Private-ID/pull/71
Previous codemod left some crust. This commit cleans up useless uses to use less uses.
Reviewed By: stepancheg
Differential Revision: D38211793
fbshipit-source-id: c852dd1ec617fe81a1d9bd0d8a9e5d2357b9b502
Summary:
Add bundlr-sdk to rust 3p crates.
Also needed some new fixups for a couple deps, and a custom fork of bundlr to use derive_builder 0.9 which is pinned in 2 deps we use, and fixed a missing out of scope trait bug in bundlr sdk.
Reviewed By: zhuomingfb0
Differential Revision: D37962056
fbshipit-source-id: 878048840d66dffcf558351614c45f9beef2f626
Summary:
This diff updates tracing. New features include:
## `tracing`
- New `Value` implementations for `String` and 128-bit integers. The `Value` implementation for `String` allows recording a `String` without needing to call `.as_str()` or similar. The `Value` implementation allows recording 128-bit integers, resolving this papercut: https://fb.workplace.com/groups/learningrust/permalink/3208916922712504/.
- There are additional methods on different trait objects of` Subscriber`s.
## `tracing-subscriber`
- Fixes multiple filtering bugs in the `Layer` implementations for `Option<impl Layer>` and `Vec<impl Layer>` (this is how folks are able to do arbitrary/dynamic numbers of loggers in `tracing`).
- Increases the minimum version of `tracing-core`.
- Adds a new `Layer::event_enabled` method, which allows Layers to filter events _after_ their field values are recorded. This is import for
- Some bug fixes in the `Filter` implementation for `EnvFilter`.
## `tracing-appender`
- Fixes bug in `RollingFileAppender` that could result in a failure to rotate the log file, or in panics in debug mode.
Notice to self: it seems like the filtering implementation in `tracing-subscriber` is kinda complex: it could make sense to fuzz it.
---
## Linked Change Logs
- `tracing-core`: https://github.com/tokio-rs/tracing/blob/v0.1.x/tracing-core/CHANGELOG.md#0128-june-23-2022
- `tracing-subscriber`: https://github.com/tokio-rs/tracing/blob/v0.1.x/tracing-subscriber/CHANGELOG.md#0314-jul-1-2022
- `tracing-appender`: https://github.com/tokio-rs/tracing/blob/v0.1.x/tracing-appender/CHANGELOG.md#022-march-17-2022
(Note: this ignores all push blocking failures!)
Reviewed By: jsgf
Differential Revision: D37932030
fbshipit-source-id: bee53e5ba219ffbcc9009781d347cd6b40f577ee
Summary: The `syscalls` crate now has the ability to create a statically-allocated bitset of syscalls. This gets rid of our usage of the dynamically-allocated `BitVec` and no longer makes assumptions about the size and offset of the syscall table. These assumptions are wrong for some architectures where syscall numbers start at 4096 instead of 0.
Reviewed By: johnhurt
Differential Revision: D37890556
fbshipit-source-id: 8d0d51e93c1a09c7390fd3898cea7955ef786e96
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 fixes a few things related to timers on AMD CPUs:
1. Fixes a breakage caused by updating to `raw-cpuid` v10. `FeatureInfo::{family_id,model_id}` no longer behave as they once did. This actually cleans up the code a bit.
2. Fixes some invalid assembly code in a test that only runs on AMD CPUs. This would cause a SIGILL.
3. Adds support for a few more AMD microarchitectures (Pinnacle Ridge, Castle Peak, and Cezanne).
Pull Request resolved: https://github.com/facebookexperimental/reverie/pull/14
Reviewed By: andronat
Differential Revision: D37638404
Pulled By: jasonwhite
fbshipit-source-id: f39c4aa166dab88917b56b0a0a16d319031a213a
Summary: If an RPC fails to send, there isn't much that can be done to handle it. In all call sites so far, they all just unwrap the error because it can't be handled properly. If an RPC fails, it is a programmer error (because the request/response failed to serialize/deserialize) and indicates a bug in our code.
Differential Revision: D37563857
fbshipit-source-id: 267072709f4230732a13989aaf74b50fd0908337
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: Adds log output to the strace example tool. The real strace does this and so should we.
Reviewed By: johnhurt
Differential Revision: D37524309
fbshipit-source-id: e4f67a1e32b6ad4efedf84f570cb50cffad4fb3d
Summary:
This is a pretty in depth third party library being added. The main changes are...
**version bumping**:
dunce = "1.0.0" => "1.0.2"
once_cell = "1.8" => "1.12"
tracing = "0.1.32" => "0.1.35"
adding ethers-rs fork:
https://github.com/rlkelly/ethers-rs.git
this depends on forks of:
coins-bip32 = https://github.com/rlkelly/bitcoins-rs.git
coins-bip39 = https://github.com/rlkelly/bitcoins-rs.git
eth-keystore = https://github.com/rlkelly/eth-keystore-rs.git
this was necessary to remove the wasm target, which creates a cyclic dependency for "indexmap". This was ran into previously here:
https://fb.workplace.com/groups/rust.language/permalink/8603206789727860/
also, some fixups were created for a few packages to facilitate build. I'm not a fan of libraries creating a build step to generate documentation...
----
This still does not have the ethers-middleware crate or the ethers-solc crate because it has the external build dependency of solc, which would make this a bit more complex to add:
https://docs.soliditylang.org/en/latest/installing-solidity.html
adding the crates without solc makes the process of integrating this library much easier, but it would be beneficial in the future.
@public
update rust deps
Reviewed By: jsgf
Differential Revision: D37320246
fbshipit-source-id: 251bd1c3c0e51733347a534fa597dea33d1df74b
Summary: This is to enable development on my Alder Lake Fedora laptop.
Reviewed By: jasonwhite
Differential Revision: D37300482
fbshipit-source-id: cf881caa854ca4f8ab84b23454faa5dba0445e8a
Summary:
Right now we get a whole bunch of annoying messages from tokio that spam our test logs:
2022-06-10T15:09:59.751928Z TRACE runtime.spawn{kind=block_on task.name= loc.file="hermetic_infra/reverie/reverie-ptrace/src/testing.rs" loc.line=58 loc.col=8}:runtime.spawn{kind=local task.name= loc.file="third-party/rust/vendor/tokio-1.15.0/src/task/local.rs" loc.line=302 loc.col=22}: tokio::task::waker: op="waker.drop" task.id=26
This diff makes the filter more restrictive for reverie tests.
Reviewed By: johnhurt
Differential Revision: D37071398
fbshipit-source-id: fe93ec3cc0cf61938be10d40df6fe2f46979fbf9
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
Summary:
If we're going to print a trace message when we inject the syscall, we might as well show the raw args.
The specific use case I used this for was making sure when I am changing args between the Detcore and reverie layers, that they are changing in the expected way. Detcore already prints log messages for the syscalls and arguments it receives from the guest. This lets us see the actual arguments that are passed to the kernel.
Reviewed By: jasonwhite
Differential Revision: D35804814
fbshipit-source-id: 2fc5a1b526326b554d4f015bfd0cb41d0dfc4ab2
Summary:
The Ubuntu VM that GitHub Actions uses doesn't seem to have permissions
to access the PMU. This exits the test successfully if it's not available.
Pull Request resolved: https://github.com/facebookexperimental/reverie/pull/12
Reviewed By: andronat
Differential Revision: D35838916
Pulled By: jasonwhite
fbshipit-source-id: 0e6cba4c170e3c7e293300e031ee41333c399040
Summary:
In case the child dies, no error code is reported. Here is an example:
```
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ()', hermetic_infra/reverie/reverie-process/src/container.rs:850:26
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```
With this diff, we at least have some more info shown:
```
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { errno: EINVAL, context: Mount }', hermetic_infra/reverie/reverie-process/src/container.rs:834:26
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```
Reviewed By: jasonwhite
Differential Revision: D35615348
fbshipit-source-id: ad540645a1bb06f275ab43994b1b1f4e9a4fdb1f
Summary:
Upgrades to platform010.
1. This will let us use the new `core::arch::asm` macro and get rid of `llvm_asm`.
2. All of fbcode should be upgrading to platform010. See [this post](https://fb.workplace.com/groups/fbcode.fyi/permalink/4768582506510846/) for more information.
Reviewed By: johnhurt
Differential Revision: D34939437
fbshipit-source-id: 2f8a6249c09c74d4e07dbca41994b17a708bf333
Summary:
Add NanosleepFamily of syscalls, namely `nanosleep` and `clock_nanosleep`.
`nanosleep` can be transformed into `clock_nanosleep` by using clockid `CLOCK_REALTIME` and flags 0 (i.e., *not* `TIMER_ABSTIME`).
Reviewed By: johnhurt
Differential Revision: D35577747
fbshipit-source-id: 5925b083b4a49cdbfdff11117156d6366947d706
Summary: `libunwind` seems to be failing to look up the symbols. Need to debug this further.
Reviewed By: andronat
Differential Revision: D35569071
fbshipit-source-id: 38dc3925a277bb655ca476f97791754a736fb6aa
Summary: `clock_getres` is a vdso function in recent versions of glibc.
Reviewed By: andronat
Differential Revision: D35570102
fbshipit-source-id: d09850b4d1bec002af749452f80228e1542fafaa
Summary: 0.3.10 adds a new EnvFilter builder that I would like to use. :)
Reviewed By: wqfish
Differential Revision: D35473723
fbshipit-source-id: df31dad09c8f8fc9c27a43c85b5d6ac8f97d69a3
Summary: Expose the child TID arg passed to clone family syscalls. For fork and vfork this will be 0 as child TID is not an arg, for clone and clone3 this is read from the args.
Reviewed By: jasonwhite
Differential Revision: D35370069
fbshipit-source-id: 32821152adaadd17c66f334f286f5410fabd4b97