@ai-ecoverse/wasix-sysroot 2025.9.30-23 → 2025.9.30-25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/README.md +35 -2
  2. package/package.json +2 -2
  3. package/sysroot/include/__header_fcntl.h +1 -1
  4. package/sysroot/include/unistd.h +1 -1
  5. package/sysroot/lib/wasm32-wasip1/crt1-command.o +0 -0
  6. package/sysroot/lib/wasm32-wasip1/crt1-reactor.o +0 -0
  7. package/sysroot/lib/wasm32-wasip1/crt1.o +0 -0
  8. package/sysroot/lib/wasm32-wasip1/libc.a +0 -0
  9. package/sysroot-eh/include/__header_fcntl.h +1 -1
  10. package/sysroot-eh/include/unistd.h +1 -1
  11. package/sysroot-eh/lib/wasm32-wasip1/crt1-command.o +0 -0
  12. package/sysroot-eh/lib/wasm32-wasip1/crt1-reactor.o +0 -0
  13. package/sysroot-eh/lib/wasm32-wasip1/crt1.o +0 -0
  14. package/sysroot-eh/lib/wasm32-wasip1/libc.a +0 -0
  15. package/sysroot-ehpic/include/__header_fcntl.h +1 -1
  16. package/sysroot-ehpic/include/unistd.h +1 -1
  17. package/sysroot-ehpic/lib/wasm32-wasip1/crt1-command.o +0 -0
  18. package/sysroot-ehpic/lib/wasm32-wasip1/crt1-reactor.o +0 -0
  19. package/sysroot-ehpic/lib/wasm32-wasip1/crt1.o +0 -0
  20. package/sysroot-ehpic/lib/wasm32-wasip1/libc.a +0 -0
  21. package/sysroot-exnref-eh/include/__header_fcntl.h +1 -1
  22. package/sysroot-exnref-eh/include/unistd.h +1 -1
  23. package/sysroot-exnref-eh/lib/wasm32-wasip1/crt1-command.o +0 -0
  24. package/sysroot-exnref-eh/lib/wasm32-wasip1/crt1-reactor.o +0 -0
  25. package/sysroot-exnref-eh/lib/wasm32-wasip1/crt1.o +0 -0
  26. package/sysroot-exnref-eh/lib/wasm32-wasip1/libc.a +0 -0
  27. package/sysroot-exnref-ehpic/include/__header_fcntl.h +1 -1
  28. package/sysroot-exnref-ehpic/include/unistd.h +1 -1
  29. package/sysroot-exnref-ehpic/lib/wasm32-wasip1/crt1-command.o +0 -0
  30. package/sysroot-exnref-ehpic/lib/wasm32-wasip1/crt1-reactor.o +0 -0
  31. package/sysroot-exnref-ehpic/lib/wasm32-wasip1/crt1.o +0 -0
  32. package/sysroot-exnref-ehpic/lib/wasm32-wasip1/libc.a +0 -0
package/README.md CHANGED
@@ -10,8 +10,8 @@ Each tree has a real `lib/wasm32-wasip1` (not a symlink — npm/ipk skip
10
10
  links). clang 24 `--target=wasm32-wasip1` resolves crt/libc there.
11
11
  `unistd.h` declares `fork` under `__wasix__` even with `-fwasm-exceptions`.
12
12
  EH `libc.a` archives get real `fork`/`_Fork` (static trees since -14, PIC trees since -23).
13
- Every libc embeds SLICC identity stubs (getuid=1000) and reports
14
- `st_uid`/`st_gid` 1000 from `stat`/`lstat`/`fstat`/`fstatat`.
13
+ `stat`/`lstat`/`fstat`/`fstatat` report the file's owner from slicc-kernel
14
+ (since -24), else the caller's `getuid()`/`getgid()`.
15
15
  `chmod`/`fchmod`/`fchmodat`/`umask` and the modes of fresh `open(O_CREAT)` /
16
16
  `mkdir` go to the kernel's `slicc_fs` imports, and `stat`/`fstat`/`lstat`
17
17
  read the permission bits back from them (slicc-kernel ≥
@@ -41,6 +41,39 @@ Since 2025.9.30-18:
41
41
  `sleep` early with the seconds left.
42
42
  - `raise()` and `pthread_kill(pthread_self())` reach the handler.
43
43
 
44
+ Since 2025.9.30-25 `access`, `faccessat`, `eaccess` and `euidaccess` ask
45
+ slicc-kernel (`slicc_fs.path_access`, slicc-kernel >= 1.63.0, K3(b)), which
46
+ checks the file's owner, group and mode against the real ids (`access`) or the
47
+ effective ids (`AT_EACCESS`, `eaccess`), as Linux does, including search
48
+ permission on every directory of the path and root needing an x bit for
49
+ `X_OK`. With users `'off'` or `'report'` it only checks that the path exists.
50
+ On an older kernel the -24 check stays (the path exists; WASI rights).
51
+ - `AT_EACCESS` is now 0x200 (it was 0, so `faccessat(…, AT_EACCESS)` was
52
+ `access`); `faccessat` also takes `AT_SYMLINK_NOFOLLOW`, which was EINVAL.
53
+ - `eaccess`/`euidaccess` exist (declared with `_GNU_SOURCE`, as in glibc).
54
+ - `linkat` refuses flags other than `AT_SYMLINK_FOLLOW` (WASIX's 0x2) with
55
+ EINVAL, as Linux does.
56
+ - `open` already asks only for the rights its mode needs (`O_RDONLY`: no
57
+ write rights), so under users `'enforce'` a read-only file opens for reading;
58
+ slicc-kernel counts a request for write rights as a write.
59
+
60
+ Since 2025.9.30-24 files have real owners when slicc-kernel keeps them
61
+ (`createKernel({ users: 'report' | 'enforce' })`, slicc-kernel K3):
62
+ - `chown`/`lchown`/`fchown`/`fchownat` go to the kernel (`slicc_fs.path_chown`/
63
+ `fd_chown`), which applies Linux's rules: root may set anything, an owner may
64
+ only change the group to one of its own, -1 keeps an id, EPERM otherwise;
65
+ - `stat`/`lstat`/`fstat` report the stored owner instead of the caller's own
66
+ ids: one call, `slicc_fs.path_filestat_owner`/`fd_filestat_owner` (the WASI
67
+ filestat and the owner together), or on a kernel without those the WASI
68
+ filestat plus `slicc_fs.path_owner`/`fd_owner`;
69
+ - with users `'off'` the chown calls still check the path or fd (ENOENT,
70
+ EBADF) but change nothing, and `stat` shows the caller's ids, as before;
71
+ - on a kernel without these imports everything stays as in -23: chown to
72
+ anything but 0/-1 is ENOSYS, and `stat` shows `getuid()`/`getgid()`.
73
+
74
+ `linkat(AT_FDCWD, old, AT_FDCWD, new, …)` (and with two absolute paths) links
75
+ `old` again; up to -23 it passed `new` as both paths and failed with ENOENT.
76
+
44
77
  Since 2025.9.30-23 `ioctl` also takes Linux's request numbers for the
45
78
  window size, `TIOCGWINSZ` 0x5413 and `TIOCSWINSZ` 0x5414, next to WASIX's
46
79
  0x101/0x102 (the headers keep those): code and ctypes snippets that hard-code
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/wasix-sysroot",
3
- "version": "2025.9.30-23",
4
- "description": "WASIX sysroots: st_uid/st_gid = getuid()/getgid(), file modes via slicc_fs, F_SETFD CLOEXEC fix, select exceptfds, physical chdir, POSIX TZ, socketpair flags, sigaction_set, alarm/setitimer/getitimer, EINTR sleeps, raise/pthread_kill, process credentials from slicc-kernel (no fixed uid 1000), per-fd termios/winsize from slicc-kernel (Linux and WASIX ioctl numbers), fork in the PIC variants, wasip1, clang24 exnref",
3
+ "version": "2025.9.30-25",
4
+ "description": "WASIX sysroots: st_uid/st_gid, chown and access() through slicc-kernel file owners (getuid()/getgid() on older kernels), file modes via slicc_fs, F_SETFD CLOEXEC fix, select exceptfds, physical chdir, POSIX TZ, socketpair flags, sigaction_set, alarm/setitimer/getitimer, EINTR sleeps, raise/pthread_kill, process credentials from slicc-kernel (no fixed uid 1000), per-fd termios/winsize from slicc-kernel (Linux and WASIX ioctl numbers), fork in the PIC variants, wasip1, clang24 exnref",
5
5
  "license": "Apache-2.0 WITH LLVM-exception",
6
6
  "repository": {
7
7
  "type": "git",
@@ -50,7 +50,7 @@
50
50
 
51
51
  #define FD_CLOEXEC (1)
52
52
 
53
- #define AT_EACCESS (0x0)
53
+ #define AT_EACCESS (0x200)
54
54
  #define AT_SYMLINK_NOFOLLOW (0x1)
55
55
  #define AT_SYMLINK_FOLLOW (0x2)
56
56
  #define AT_REMOVEDIR (0x4)
@@ -276,9 +276,9 @@ char *get_current_dir_name(void);
276
276
  #ifdef __wasilibc_unmodified_upstream /* WASI has no syncfs */
277
277
  int syncfs(int);
278
278
  #endif
279
- #ifdef __wasilibc_unmodified_upstream /* WASI has no eaccess */
280
279
  int euidaccess(const char *, int);
281
280
  int eaccess(const char *, int);
281
+ #ifdef __wasilibc_unmodified_upstream /* WASI has no copy_file_range, gettid */
282
282
  ssize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned);
283
283
  pid_t gettid(void);
284
284
  #endif
Binary file
Binary file
@@ -50,7 +50,7 @@
50
50
 
51
51
  #define FD_CLOEXEC (1)
52
52
 
53
- #define AT_EACCESS (0x0)
53
+ #define AT_EACCESS (0x200)
54
54
  #define AT_SYMLINK_NOFOLLOW (0x1)
55
55
  #define AT_SYMLINK_FOLLOW (0x2)
56
56
  #define AT_REMOVEDIR (0x4)
@@ -276,9 +276,9 @@ char *get_current_dir_name(void);
276
276
  #ifdef __wasilibc_unmodified_upstream /* WASI has no syncfs */
277
277
  int syncfs(int);
278
278
  #endif
279
- #ifdef __wasilibc_unmodified_upstream /* WASI has no eaccess */
280
279
  int euidaccess(const char *, int);
281
280
  int eaccess(const char *, int);
281
+ #ifdef __wasilibc_unmodified_upstream /* WASI has no copy_file_range, gettid */
282
282
  ssize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned);
283
283
  pid_t gettid(void);
284
284
  #endif
Binary file
Binary file
@@ -50,7 +50,7 @@
50
50
 
51
51
  #define FD_CLOEXEC (1)
52
52
 
53
- #define AT_EACCESS (0x0)
53
+ #define AT_EACCESS (0x200)
54
54
  #define AT_SYMLINK_NOFOLLOW (0x1)
55
55
  #define AT_SYMLINK_FOLLOW (0x2)
56
56
  #define AT_REMOVEDIR (0x4)
@@ -276,9 +276,9 @@ char *get_current_dir_name(void);
276
276
  #ifdef __wasilibc_unmodified_upstream /* WASI has no syncfs */
277
277
  int syncfs(int);
278
278
  #endif
279
- #ifdef __wasilibc_unmodified_upstream /* WASI has no eaccess */
280
279
  int euidaccess(const char *, int);
281
280
  int eaccess(const char *, int);
281
+ #ifdef __wasilibc_unmodified_upstream /* WASI has no copy_file_range, gettid */
282
282
  ssize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned);
283
283
  pid_t gettid(void);
284
284
  #endif
@@ -50,7 +50,7 @@
50
50
 
51
51
  #define FD_CLOEXEC (1)
52
52
 
53
- #define AT_EACCESS (0x0)
53
+ #define AT_EACCESS (0x200)
54
54
  #define AT_SYMLINK_NOFOLLOW (0x1)
55
55
  #define AT_SYMLINK_FOLLOW (0x2)
56
56
  #define AT_REMOVEDIR (0x4)
@@ -276,9 +276,9 @@ char *get_current_dir_name(void);
276
276
  #ifdef __wasilibc_unmodified_upstream /* WASI has no syncfs */
277
277
  int syncfs(int);
278
278
  #endif
279
- #ifdef __wasilibc_unmodified_upstream /* WASI has no eaccess */
280
279
  int euidaccess(const char *, int);
281
280
  int eaccess(const char *, int);
281
+ #ifdef __wasilibc_unmodified_upstream /* WASI has no copy_file_range, gettid */
282
282
  ssize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned);
283
283
  pid_t gettid(void);
284
284
  #endif
@@ -50,7 +50,7 @@
50
50
 
51
51
  #define FD_CLOEXEC (1)
52
52
 
53
- #define AT_EACCESS (0x0)
53
+ #define AT_EACCESS (0x200)
54
54
  #define AT_SYMLINK_NOFOLLOW (0x1)
55
55
  #define AT_SYMLINK_FOLLOW (0x2)
56
56
  #define AT_REMOVEDIR (0x4)
@@ -276,9 +276,9 @@ char *get_current_dir_name(void);
276
276
  #ifdef __wasilibc_unmodified_upstream /* WASI has no syncfs */
277
277
  int syncfs(int);
278
278
  #endif
279
- #ifdef __wasilibc_unmodified_upstream /* WASI has no eaccess */
280
279
  int euidaccess(const char *, int);
281
280
  int eaccess(const char *, int);
281
+ #ifdef __wasilibc_unmodified_upstream /* WASI has no copy_file_range, gettid */
282
282
  ssize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned);
283
283
  pid_t gettid(void);
284
284
  #endif