Commit graph

9 commits

Author SHA1 Message Date
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
Will Hughes
675073a631 Read child TID from clone family syscalls
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
2022-04-05 01:23:00 -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
75e875fe28 Implement local memory access
Reviewed By: johnhurt

Differential Revision: D34676792

fbshipit-source-id: 77f28c90d535ca3c50b05542e558053d1263937d
2022-03-07 13:11:06 -08:00
Jason White
eed2eba46a Add support for TIOCGPTPEER ioctl
Summary:
This is called when creating a slave from a master pty and returns a file descriptor.

Usage example:
```
async fn handle_ioctl<G: Guest<Self>>(
    &self,
    guest: &mut G,
    syscall: Ioctl,
) -> Result<i64, Errno> {
    use reverie::syscalls::ioctl;

    match syscall.request() {
        ioctl::Request::TIOCGPTPEER(flags) => {
            let fd = guest.inject(syscall).await?;
            // Do something with the flags and fd ...
            Ok(fd)
        }
        _ => Ok(guest.inject(syscall).await?)
    }
}
```

Reviewed By: wangbj, igorsugak

Differential Revision: D33961825

fbshipit-source-id: 0e6d4a0ed984a4b96b2501095dd44a978030788e
2022-02-02 17:47:21 -08:00
Jason White
371f84d4d4 Add clone3 syscall support
Summary: Adds support for the `clone3` syscall, which is now used by `pthread_create`. This also introduces `CloneFamily`, which abstracts `fork`, `vfork`, `clone`, and `clone3`.

Reviewed By: johnhurt

Differential Revision: D33865362

fbshipit-source-id: 8b91225c63ff6a8aa9c283877a30f58aa4cd9bb2
2022-01-31 15:54:19 -08:00
Jason White
256fc33dd5 Remove extern crate usage
Summary: This hasn't been necessary for quite a while now.

Reviewed By: wangbj

Differential Revision: D33411662

fbshipit-source-id: e6f88834521809b59323aa9d14796ff31571e7b6
2022-01-04 18:14:12 -08:00
facebook-github-bot
15d2f61411 Initial commit
fbshipit-source-id: c440d991296c92bdc5e109a11d269049e8840e94
2021-12-29 16:14:27 -08:00