Skip to content

Commit dbe2c40

Browse files
Merge branch 'main' into feat-mprotec-syscall
2 parents 95cfdd4 + 1747e9f commit dbe2c40

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+4177
-953
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ clang+llvm-16.0.4-x86_64-linux-gnu-ubuntu-22.04/
33
*.cwasm
44
src/glibc/build/
55
bazel-*
6+
src/RawPOSIX/tmp/

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ Now let try to print `Hello world!`
2424
./lindtool.sh run tests/unit-tests/file_tests/deterministic/printf
2525
```
2626

27+
Further examples can be found [here](https://lind-project.github.io/lind-wasm-docs/use/examples/)
28+
2729
## Documentation
2830

2931
Check out our [docs]([lind-project.github.io/lind-wasm-docs/](https://lind-project.github.io/lind-wasm-docs/))!

src/RawPOSIX/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ parking_lot = "0.12"
2626
bit-set = "0.5"
2727
nodit = "0.9.2" # Used for VMMAP
2828
quick_cache = "0.6.9"
29+
fdtables = { path = "../fdtables" }
30+
sysdefs = { path = "../sysdefs" }
2931

3032
[dependencies.lazy_static]
3133
version = "1.0"

src/RawPOSIX/src/constants/mod.rs

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/RawPOSIX/src/fdtables/mod.rs

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/RawPOSIX/src/interface/mem.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
use crate::constants::{F_GETFL, MAP_ANONYMOUS, MAP_FIXED, MAP_PRIVATE, PROT_EXEC};
1+
use sysdefs::constants::err_const::{syscall_error, Errno};
2+
use sysdefs::constants::fs_const::{
3+
F_GETFL, MAP_ANONYMOUS, MAP_FIXED, MAP_PRIVATE, MAP_SHARED, PAGESHIFT, PAGESIZE, PROT_EXEC,
4+
PROT_NONE, PROT_READ, PROT_WRITE,
5+
};
26

3-
use crate::constants::{MAP_SHARED, PAGESHIFT, PAGESIZE, PROT_NONE, PROT_READ, PROT_WRITE};
4-
use crate::safeposix::vmmap::{MemoryBackingType, Vmmap, VmmapOps};
5-
6-
use crate::interface::{cagetable_getref, syscall_error, Errno};
7+
use crate::interface::cagetable_getref;
78
use crate::safeposix::cage::Cage;
9+
use crate::safeposix::vmmap::{MemoryBackingType, Vmmap, VmmapOps};
810
use std::result::Result;
911

1012
// heap is placed at the very top of the memory

src/RawPOSIX/src/interface/misc.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,16 @@ pub use serde_cbor::{
3131
from_slice as serde_deserialize_from_bytes, ser::to_vec_packed as serde_serialize_to_bytes,
3232
};
3333

34-
use crate::constants::SEM_VALUE_MAX;
3534
use crate::interface;
36-
use crate::interface::errnos::VERBOSE;
37-
use crate::interface::types::SigsetType;
3835
use std::sync::LazyLock;
3936
use std::time::Duration;
4037

38+
// Import constants
39+
use sysdefs::constants::err_const::VERBOSE;
40+
use sysdefs::constants::fs_const::SEM_VALUE_MAX;
41+
// Import data struct
42+
use sysdefs::data::fs_struct::SigsetType;
43+
4144
pub const MAXCAGEID: i32 = 1024;
4245
const EXIT_SUCCESS: i32 = 0;
4346

src/RawPOSIX/src/interface/mod.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
mod comm;
2-
pub mod errnos;
31
mod file;
42
mod mem;
53
mod misc;
64
mod timer;
75
pub mod types;
8-
pub use comm::*;
9-
pub use errnos::*;
106
pub use file::*;
117
pub use mem::*;
128
pub use misc::*;

0 commit comments

Comments
 (0)