Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The first edition that can load and execute single program #25

Merged
merged 13 commits into from Jun 5, 2021

Conversation

imlk0
Copy link
Collaborator

@imlk0 imlk0 commented Jun 4, 2021

This PR handles the loading of the program and the translation of a small part of the syscall:

  • Implement execve::exit::transfert_load_script()
  • (Simply) Implement open::enter(), standard_syscall::enter(), and open_at::enter()
  • Some bug fixes
  • Signal delivery

Note that currently it can only be compiled and run on x86_64 Linux, and contains some unresolved issues.

You can test /bin/sleep it should execute correctly:

# build proot-rs
cargo build
# run from binary
./target/debug/proot-rs --rootfs=./rootfs /bin/sleep 3
# or run with log level set to `trace`
RUST_LOG=trace ./target/debug/proot-rs --rootfs=./rootfs /bin/sleep 3

The expected behavior is that it will wait three seconds and exit with zero code
image

@imlk0 imlk0 requested a review from oxr463 June 4, 2021 13:01
@imlk0 imlk0 self-assigned this Jun 4, 2021
@imlk0 imlk0 added this to the v0.0.1 milestone Jun 4, 2021
@imlk0 imlk0 linked an issue Jun 4, 2021 that may be closed by this pull request
3 tasks
@imlk0 imlk0 added this to In progress in GSoC 2021 via automation Jun 4, 2021
src/filesystem/fs.rs Outdated Show resolved Hide resolved
src/process/proot.rs Outdated Show resolved Hide resolved
GSoC 2021 automation moved this from In progress to Reviewer approved Jun 4, 2021
@oxr463 oxr463 merged commit 08b5397 into master Jun 5, 2021
GSoC 2021 automation moved this from Reviewer approved to Done Jun 5, 2021
@oxr463 oxr463 deleted the let-sleep-run branch June 5, 2021 11:38
@imlk0 imlk0 mentioned this pull request Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Get /bin/sleep to run and exit correctly
2 participants