Commit graph

26 commits

Author SHA1 Message Date
Jason White
531faf7a34 Prepare safeptrace to be published as a crate
Summary:
* Adds a `README.md` file.
 * Adds optional features to enable memory access and the async API.

`safeptrace` depends on `reverie-process` and `reverie-memory`, so those will need to be published as crates too.

Reviewed By: VladimirMakaev

Differential Revision: D44386559

fbshipit-source-id: e74c55d5d26239aa09aedac130dca880eb5f1206
2023-03-25 16:12:24 -07:00
Arun Thulasi
d51b9e8a1c Update libc-0.2.137 to libc-0.2.139
Reviewed By: zertosh

Differential Revision: D43203556

fbshipit-source-id: 460f339f603fec97f367967a20a4c6e7a81ad027
2023-02-12 16:30:00 -08:00
Andres Suarez
4dd84a499d Update tokio-1.21.2 to tokio-1.25.0
Reviewed By: diliop

Differential Revision: D42837228

fbshipit-source-id: 5e891cf1ff8ab1beff6e3c845b913144655778ea
2023-01-30 14:49:36 -08:00
Jason White
dba0b5b9b7 Extract MemoryAccess into separate crate
Summary: This removes the need for `safeptrace` to depend on `reverie-syscalls`, which is a somewhat heavyweight library.

Reviewed By: VladimirMakaev

Differential Revision: D41751372

fbshipit-source-id: 36f601c7f441b070cd3a0678621649c4fb12b28e
2022-12-07 18:06:56 -08:00
Jason White
9515dfe3c2 Only compile for Linux
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
2022-12-07 18:05:11 -08:00
Jason White
bcce15d17d safeptrace: Remove unnecessary copying of registers
Summary: Might lead to a minor speed up, but probably not due to the magic of compiler optimizations. I noticed this a while back and meant to fix it before publishing the `safeptrace` crate (so this won't be a breaking change later).

Reviewed By: VladimirMakaev

Differential Revision: D41699769

fbshipit-source-id: ef3e5f24468ddb4b69b8628e28b1da8cfdcbce7b
2022-12-07 07:38:13 -08:00
Jason White
90e39abc59 Fix skip_seccomp_syscall
Summary: Fixes `skip_seccomp_syscall` on aarch64 to *actually* skip the syscall. I plan on cleaning this up a bit more in a later diff because we are calling `getregs` and `setregs` more than necessary on a per-interception basis.

Reviewed By: VladimirMakaev

Differential Revision: D40867423

fbshipit-source-id: d72b4998b5c1c44f426a9129eccb205ccfc320fa
2022-11-01 10:11:35 -07:00
Jason White
0ae449caba Fix unused dependency warning
Reviewed By: VladimirMakaev

Differential Revision: D40872004

fbshipit-source-id: 07ee4af14dcf33e9a8d1c0f2aa2333062d39c044
2022-11-01 10:11:35 -07:00
David Tolnay
a3ed18f93a Update libc to 0.2.137
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
2022-11-01 02:16:19 -07:00
Jason White
21f7f9a8a6 Fix rustc warnings
Reviewed By: VladimirMakaev

Differential Revision: D40701835

fbshipit-source-id: d74560c4c6b360f89ff6b8d37bc33890bf633947
2022-10-27 10:56:09 -07:00
Vladimir Makaev
03cbd6044d update hermetic_infra/** files with correct license header - 1/x
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
2022-10-26 12:18:14 -07:00
Jason White
6e36d021a3 Add aarch64 support to safeptrace
Summary: Adds aarch64 support to the safeptrace crate.

Reviewed By: wangbj

Differential Revision: D40577290

fbshipit-source-id: e7748e00a3d37d13a576e33865a4b97917cb661d
2022-10-21 12:09:36 -07:00
Andrey Buchinskiy
a24e92eea4 bump tokio version to 1.21.2
Reviewed By: zertosh

Differential Revision: D40199323

fbshipit-source-id: 32355e73ea669a180ac759ddb02760db10c8b02b
2022-10-14 15:24:20 -07:00
Sargun Dhillon
fa682caf9b Update Rust libc crate to 0.2.135
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
2022-10-13 18:51:18 -07:00
Jason White
38a3818c48 third-party/rust: Update syscalls v0.6.6 -> v0.6.7
Reviewed By: rrnewton

Differential Revision: D40312880

fbshipit-source-id: b6386d3821507787e7d76c86c1f63c265be86319
2022-10-12 14:29:02 -07:00
Sophia Sun
aadb1865e7 Update nix crate from 0.23 to 0.25
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
2022-10-03 15:31:17 -07:00
Andres Suarez
42214f8ec2 update to rust 1.64.0
Summary: https://blog.rust-lang.org/2022/09/22/Rust-1.64.0.html

Reviewed By: diliop, dtolnay

Differential Revision: D39825734

fbshipit-source-id: 4a789f2c24707fbc6a14b506448d405d5a60a53d
2022-09-27 15:18:58 -07:00
Andres Suarez
0f60462d16 Update libc-0.2.125 to libc-0.2.132
Reviewed By: dtolnay

Differential Revision: D39578353

fbshipit-source-id: 800721931e82485678e8ecf997afcc6711f6d4cf
2022-09-16 20:06:28 -07:00
David Tolnay
3deaf0e0c0 third-party/rust: Revert D39418421 "unpin thiserror"
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
2022-09-15 17:20:40 -07:00
Edwin Smith
8fef664fab unpin thiserror
Reviewed By: bolinfest, zertosh

Differential Revision: D39418421

fbshipit-source-id: 2f0246f190403a6f481e8803834174f229c0849a
2022-09-13 07:15:29 -07:00
Michael Bolin
c013909676 pin libc crate to 0.2.125
Reviewed By: ImanolBarba

Differential Revision: D39433159

fbshipit-source-id: 4442651a0874ebc6724796206db02c20e455a1c0
2022-09-12 09:55:50 -07:00
Michael Bolin
3c618d400d use git-config@0.7.1 instead of patched version
Reviewed By: mzr

Differential Revision: D39331880

fbshipit-source-id: 5990d68d718297a6df72e5eea3c16fed5b84169e
2022-09-09 21:01:16 -07:00
Jan Mazur
0a18bdf95f futures 0.3.21 -> 0.3.24
Summary: We have some deprecated functions in GH builds.

Differential Revision: D38909563

fbshipit-source-id: 3e8b77b10c352bfdfcbfe344f0ea2e95d4a339ad
2022-09-05 13:49:07 -07:00
Facebook Community Bot
2f6328ac8d
Re-sync with internal repository (#16)
Co-authored-by: Facebook Community Bot <6422482+facebook-github-bot@users.noreply.github.com>
2022-09-01 12:34:47 -07:00
Jason White
6e18487a85 Remove dead code
Reviewed By: johnhurt

Differential Revision: D39036935

fbshipit-source-id: ca5febf045b279d421e2547e102c26e98d725d10
2022-08-29 12:25:19 -07:00
Jason White
89e2e8e431 Refactor trace module into its own crate
Reviewed By: johnhurt

Differential Revision: D36788853

fbshipit-source-id: 8a3765fb58d94188514ed1aba406a2dcd1e6551a
2022-08-26 09:27:58 -07:00