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

Quick typos fixes #50

Merged
merged 1 commit into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ PolkaVM is a general purpose user-level RISC-V based virtual machine.

(**Note: not all of these are currently true!**)

- Secure and sandboxed by default. The code running in the VM should run in a separate process, and should not be able to access the host system, even in the presence of an attacker with full remote code execution priviledges inside of the VM.
- Fast to execute. The runtime performance of the code running in the VM should be competetive with state-of-art WebAssembly VMs, at least within the same order of magnitude.
- Secure and sandboxed by default. The code running in the VM should run in a separate process, and should not be able to access the host system, even in the presence of an attacker with full remote code execution privileges inside of the VM.
- Fast to execute. The runtime performance of the code running in the VM should be competitive with state-of-art WebAssembly VMs, at least within the same order of magnitude.
- Fast to compile, with guaranteed single-pass O(n) compilation. Loading new code into the VM should be near instanteneous.
- Low memory footprint. Each concurrent instance of the VM should have a baseline memory overhead of no more than 128KB.
- Small binaries. Programs compiled for this VM should take up as little space as possible.
Expand All @@ -18,7 +18,7 @@ PolkaVM is a general purpose user-level RISC-V based virtual machine.
- Support for high performance asynchronous gas metering. Gas metering should be cheap, deterministic, and reasonably accurate.
- Simple. It should be possible for a single programmer to write an interpreter fully compatible with this VM in less than a week.
- Versioned operational semantics. Any future changes to the semantics that are observable by a guest program will be versioned, and will be explicitly opt-in.
- Standarized. There should be a spec fully describing the guest-observable operational semantics of this VM.
- Standardized. There should be a spec fully describing the guest-observable operational semantics of this VM.
- Cross-platform. On unsupported OSes and platforms the VM will run in an interpreted mode.
- Minimum external dependencies. The VM should be mostly self-contained, fast to compile, and resistant to supply-chain attacks.
- Built-in tooling for debugging and performance profiling.
Expand Down
6 changes: 3 additions & 3 deletions crates/polkavm-linux-sandbox/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -444,14 +444,14 @@ unsafe fn child_main(zygote_memfd: Fd, child_socket: Fd, uid_map: &str, gid_map:
// Clear all of our ambient capabilities.
linux_raw::sys_prctl_cap_ambient_clear_all()?;

// Flag ourselves that we won't ever want to acquire any new priviledges.
// Flag ourselves that we won't ever want to acquire any new privileges.
linux_raw::sys_prctl_set_no_new_privs()?;

linux_raw::sys_prctl_set_securebits(
// Make UID == 0 have no special priviledges.
// Make UID == 0 have no special privileges.
linux_raw::SECBIT_NOROOT |
linux_raw::SECBIT_NOROOT_LOCKED |
// Calling 'setuid' from/to UID == 0 doesn't change any priviledges.
// Calling 'setuid' from/to UID == 0 doesn't change any privileges.
linux_raw::SECBIT_NO_SETUID_FIXUP |
linux_raw::SECBIT_NO_SETUID_FIXUP_LOCKED |
// The process cannot add capabilities to its ambient set.
Expand Down