Commit graph

23 commits

Author SHA1 Message Date
Jason White
f5c1175aa9 third-party/rust: Update syscalls 0.6.2 -> 0.6.5
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
2022-07-15 12:52:06 -07:00
Jason White
6813d9a7b2 rustfmt with imports_granularity=Item
Summary: This makes merge conflicts much easier to handle.

Reviewed By: johnhurt

Differential Revision: D37564000

fbshipit-source-id: a7f1a2711ffbdbb23c93e2f479f47d0368a2dad9
2022-06-30 14:56:20 -07:00
Jason White
d34189fda6 third-party/rust: Update syscalls crate 0.6.1 -> 0.6.2
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
2022-06-30 11:59:56 -07:00
Jason White
674fbb2af5 third-party/rust: Update syscalls 0.6.0 -> 0.6.1
Reviewed By: johnhurt

Differential Revision: D37051530

fbshipit-source-id: e21fc86f98c5f55817ba6f412d7271b3da63d7bb
2022-06-09 18:12:21 -07:00
Jason White
20c7020868 Appease the copyright linter
Summary: The OSS license linter doesn't like the word "its".

Reviewed By: johnhurt

Differential Revision: D36856385

fbshipit-source-id: 909037d96de8976f08004497d28b77838f8c6870
2022-06-02 11:51:06 -07:00
Jason White
d16ca7d7c0 Change Facebook -> Meta Platforms in Cargo.toml files
Reviewed By: johnhurt

Differential Revision: D36727976

fbshipit-source-id: 0449545ee3fb2faf4febcdec0be1d5940af5e937
2022-05-27 10:20:35 -07:00
Jason White
1bbfa8a5a2 Update copyright headers
Reviewed By: johnhurt

Differential Revision: D36727878

fbshipit-source-id: 2529052f6a81fb5a177ccdba51b7e0051577c148
2022-05-27 09:51:26 -07:00
Jason White
011e521c08 third-party/rust: Update syscalls crate 0.5 -> 0.6
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
2022-05-24 09:29:52 -07:00
Jason White
f507b56319 third-party/rust: Update syscalls crate to v0.5.0
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
2022-05-05 13:15:19 -07:00
Jason White
ab908fd184 third-party/rust: Update raw-cpuid to v10.
Summary: Updating raw-cpuid to get this fix: https://github.com/gz/rust-cpuid/issues/45

Reviewed By: dtolnay

Differential Revision: D35856229

fbshipit-source-id: 74e173e4db6d3e4270ce0993a5491adb2b776a1f
2022-04-22 18:48:48 -07:00
Anastasios Andronidis
6cb6d53799 Don't hide error info
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
2022-04-13 16:58:26 -07:00
Jason White
86f6a155f3 third-party/rust: Update tempfile to v3.3.0
Reviewed By: jsgf

Differential Revision: D35477506

fbshipit-source-id: ef10c8f7548a21c0fb3d83d5debfe2e000657d08
2022-04-11 15:18:36 -07:00
Huapeng Zhou
f38f5c1cbc rust: update serde_json to 1.0.79 and serde to 1.0.136
Summary:
Needed to import [cloud-hypervisor](https://github.com/cloud-hypervisor/cloud-hypervisor).

(Note: this ignores all push blocking failures!)

Reviewed By: dtolnay

Differential Revision: D34433589

fbshipit-source-id: f92ea3ba640d19f170513b558f3d5208790bab67
2022-04-10 23:39:55 -07:00
Huapeng Zhou
413542a24f rust: update thiserror to 1.0.30
Summary: Needed to import [cloud-hypervisor](https://github.com/cloud-hypervisor/cloud-hypervisor/blob/main/Cargo.toml#L31).

Reviewed By: dtolnay

Differential Revision: D34437972

fbshipit-source-id: 9f22bb1fde83308a319f40e138d9ab7f180c7fa0
2022-03-31 00:26:06 -07:00
CodemodService FBSourceRustfmtLinterBot
e467c37695 Daily arc lint --take RUSTFMT
Reviewed By: ivanmurashko

Differential Revision: D35243292

fbshipit-source-id: 2f973660c82eb4e772c36af50499adca697f076d
2022-03-30 02:52:36 -07:00
David Tolnay
924aff3d5e Reformat with new rustfmt 4/7
Summary:
Generated by `tools/arcanist/lint/codemods/rustfmt-fbsource` with the rustfmt executable added by D35234535 (ce519e0af4).

drop-conflicts

Reviewed By: zertosh

Differential Revision: D35234536

fbshipit-source-id: 3e8b23b4abbb9bdd052d86dcd619f88bbcc5d454
2022-03-29 20:22:00 -07:00
Jason White
6dd486377b Add Command::prepend_args
Summary: This is useful when wrapping a preexisting `Command` with another program.

Reviewed By: johnhurt

Differential Revision: D35164471

fbshipit-source-id: 39f861de9cf41c1ba438c497c885d5d367ada5ce
2022-03-29 18:41:29 -07:00
Jason White
74ca492114 Add seccomp notify support
Summary:
Adds the ability to receive seccomp notify events from a process asynchronously.

NOTE: Getting the file descriptor out of the `seccomp()` return value in the child process is very akward. Because of this, there is currently a possibility of deadlock if using `seccomp_notify` and a process fails to spawn. In this case, an error will be sent through a pipe to the parent process, but the parent process will never be able to read it because it will be spinning in a loop trying to read the file descriptor from the child.

Reviewed By: johnhurt

Differential Revision: D35138101

fbshipit-source-id: 2df0ddb39a6ed7e594d04df188a2143833f082c0
2022-03-29 18:41:29 -07:00
Huapeng Zhou
7213f65761 rust: update libc from 0.2.117 to 0.2.121
Summary: Needed to import cloud-hypervisor https://github.com/cloud-hypervisor/cloud-hypervisor/blob/main/Cargo.toml#L25.

Reviewed By: dtolnay

Differential Revision: D35052728

fbshipit-source-id: bdd60925501c446ee6d429fad6e95d6593ff2544
2022-03-23 10:00:47 -07:00
Javier Honduvilla Coto
36515611d2 Bump nix crate from 0.22 => 0.23
Summary:
Updating to be able to use  `pwritev` and `preadv`.

- Followed [the documentation on how to update crates](https://www.internalfb.com/intern/wiki/Rust-at-facebook/Managing_fbsource_third-party_with_Reindeer/).
- These are all the changes between our current version and the updated one: https://github.com/nix-rust/nix/compare/v0.22.0..v0.23.1. See `CHANGELOG.md` for the most significant changes in this version.

Let me know if I missed anything, this is my first crate upgrade!

Reviewed By: jsgf

Differential Revision: D34820818

fbshipit-source-id: 89f59a759bf042112e7d48612a345a8164dc7176
2022-03-22 09:26:52 -07:00
Jason White
9864620234 Fix doc references
Reviewed By: wangbj

Differential Revision: D33808859

fbshipit-source-id: 2897f66dcd50ef89b90d9c69f2303aadaaacfa6a
2022-01-27 12:44:16 -08:00
Andres Suarez
23b58143af Update tokio to 1.15
Reviewed By: Imxset21

Differential Revision: D33759920

fbshipit-source-id: 7fd02dc93a7c1c564454a1fece3ff4b12dba3d3e
2022-01-25 02:04:43 -08:00
facebook-github-bot
15d2f61411 Initial commit
fbshipit-source-id: c440d991296c92bdc5e109a11d269049e8840e94
2021-12-29 16:14:27 -08:00