Commit Graph

21 Commits (7b01bfb2be3e5383f8cfcd5209c7e193c3e81ebe)

Author SHA1 Message Date
Michael Dawson 3badecd125 deps: update uvwasi to 0.0.20 and fixup tests
- update uvwasi to 0.0.20
- adjust tests to reflect udpated behaviour from
  https://github.com/nodejs/uvwasi/pull/224 included
  in uvwasi 0.0.20

Signed-off-by: Michael Dawson <midawson@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/51355
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-01-08 16:48:28 -05:00
Node.js GitHub Bot 3227d7327c deps: update uvwasi to 0.0.19
PR-URL: https://github.com/nodejs/node/pull/49908
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-09-29 15:16:48 -04:00
Node.js GitHub Bot 9772065231 deps: update uvwasi to 0.0.18
PR-URL: https://github.com/nodejs/node/pull/47866
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2023-05-19 21:26:26 +00:00
Node.js GitHub Bot c1d496a662 deps: update uvwasi to 0.0.17
PR-URL: https://github.com/nodejs/node/pull/47866
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2023-05-19 21:26:25 +00:00
Michael Dawson b185e9728d deps: update uvwasi to v0.0.16
Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: https://github.com/nodejs/node/pull/46434
Refs: https://github.com/nodejs/uvwasi/pull/185
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2023-03-01 12:37:43 -05:00
Colin Ihrig 27c51243b5
deps: update to uvwasi 0.0.15
Notable changes:

- Use GetThreadTimes() on Windows for CLOCK_THREAD_CPUTIME_ID.
- Increase the precision of the process and thread clocks on
  Windows.

PR-URL: https://github.com/nodejs/node/pull/46253
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2023-01-20 15:56:07 +00:00
Colin Ihrig 610b2e45e7
deps: update to uvwasi 0.0.14
Notable changes:

- Windows applications not in ConsoleMode now properly guess
  handle types for FILE_TYPE_CHAR file types which cannot be
  stat'ed.
- The UVWASI_DEBUG macro can now be used without a format string.
- The libuv dependency has been updated to v1.44.2.

PR-URL: https://github.com/nodejs/node/pull/45970
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2022-12-27 03:51:58 +00:00
cjihrig f17eac9727 deps: update to uvwasi 0.0.13
Notable changes:

- A bug has been fixed in `uvwasi_fd_readdir()` that caused
  the number of entries to be processed incorrectly.

PR-URL: https://github.com/nodejs/node/pull/44524
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2022-09-07 06:14:37 +02:00
Colin Ihrig e10085a03b
deps: update to uvwasi 0.0.12
Notable changes:

- Several overflows have been fixed.
- The libuv dependency has been updated to v1.42.0.

PR-URL: https://github.com/nodejs/node/pull/40847
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-11-20 20:07:13 +00:00
cjihrig 636c0bb419 deps: update to uvwasi 0.0.11
Notable changes:

- Several issues have been addressed in uvwasi_fd_readdir().
  A bug in the copying of the directory entry's name has been fixed.
  The function now returns UVWASI_ENOSYS on Windows and Android.
  Serdes support has been added for uvwasi_dirent_t's.
- The libuv dependency has been updated to v1.39.0.

PR-URL: https://github.com/nodejs/node/pull/35104
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-09-11 05:46:06 -07:00
cjihrig 0a3ac681c2 deps: update to uvwasi 0.0.10
Notable changes:

- The uvwasi_preopen_t now uses const char* for the mapped_path
  and real_path fields. Previously, these were not `const`.
- uvwasi_path_filestat_get() now properly handles the
  UVWASI_LOOKUP_SYMLINK_FOLLOW flag.
- uvwasi_options_init() has been added to reduce the boilerplate
  code associated with initializing uvwasi_options_t's.
- The DEBUG() macro has been renamed to UVWASI_DEBUG() to reduce
  naming conflicts with other projects.
- A compilation error on NetBSD 8.2 has been fixed.
- The uvwasi_fd_filestat_set_times() and
  uvwasi_path_filestat_set_times() functions now have proper
  implementations.

Fixes: https://github.com/nodejs/node/issues/34510

PR-URL: https://github.com/nodejs/node/pull/34623
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-08-07 08:49:32 -07:00
cjihrig 3abb52fdb6
deps: update to uvwasi 0.0.9
Notable changes:

- A `DEBUG()` macro and `UVWASI_DEBUG_LOG` build option have been
  added to improve debugging.
- Path length restrictions have been removed across the codebase.
- Initial support for `poll_oneoff()` has been added on all
  platforms. The implementation is based on `uv_poll_t`'s.
- A new `uvwasi_size_t` has been introduced across the WASI system
  call API. This provides consistent 32-bit `size_t`'s.
- The cmake test targets are now only generated if uvwasi is the
  root project to avoid conflicts with targets from embedders.
- `uv.h` has been removed from the public headers.
- A serialization/deserialization API has been added to simplify
  the process of working with WASM memory. This also hides many
  WASI <--> WASM interfacing implementation details from
  embedders.
- A memory corruption bug on Windows related to path resolution
  has been fixed.

PR-URL: https://github.com/nodejs/node/pull/33445
Fixes: https://github.com/nodejs/node/issues/33403
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2020-05-19 19:19:39 +02:00
cjihrig 497ad815ae
deps: update to uvwasi 0.0.8
This release focuses on improving the robustness of the path
resolution and sandboxing, including adding support for relative
preopen paths.

PR-URL: https://github.com/nodejs/node/pull/33078
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-04-28 13:08:45 -04:00
cjihrig 543c046feb
deps: update to uvwasi 0.0.6
PR-URL: https://github.com/nodejs/node/pull/32309
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-03-18 20:47:28 -04:00
cjihrig 30173c6087 deps: uvwasi: cherry-pick eea4508
Original commit message:

    prevent race conditions with uvwasi_fd_close()

    uvwasi_fd_close() performed the following operations:

    - lock the file descriptor mutex
    - close the file
    - release the file descriptor mutex
    - call the file table's remove() function

    Once the fd's mutex is released, another thread could
    acquire it before the fd is removed from the file
    table. If this happens, remove() could destroy a held
    mutex.

    This commit updates uvwasi_fd_close() to perform the
    entire sequence while holding the file table's lock,
    preventing new acquisitions of the fd's mutex.

    Fixes: https://github.com/cjihrig/uvwasi/issues/88

PR-URL: https://github.com/nodejs/node/pull/31432
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2020-01-23 05:22:27 -08:00
cjihrig c150f9da7e deps: uvwasi: cherry-pick c3bef8e
Original commit message:
    prevent locking fd table while holding a mutex

    uvwasi_path_rename(), uvwasi_path_link(),
    uvwasi_path_open(), and uvwasi_fd_renumber() operate
    on multiple file descriptors. uvwasi_fd_renumber() has
    been updated prior to this commit, and is not relevant
    here. The other three functions would perform the
    following locking operations:

    - lock the file table
    - acquire a file descriptor mutex
    - unlock the file table
    - unlock the file table again
    - acquire another file descriptor mutex
    - unlock the file table
    - unlock the two mutexes

    Attempting to acquire the second mutex introduced
    the possibility of deadlock because another thread
    could attempt to acquire the first mutex while
    holding the file table lock.

    This commit ensures that multiple mutexes are either:
    - acquired in a single lock of the file table
    - or, only acquired after releasing previously held mutexes

    Fixes: https://github.com/cjihrig/uvwasi/issues/89

PR-URL: https://github.com/nodejs/node/pull/31432
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2020-01-23 05:22:25 -08:00
cjihrig 8b606d3e26 deps: update to uvwasi 0.0.5
This version improves file descriptor renumbering, and as a result
fixes uvwasi_fd_renumber().

PR-URL: https://github.com/nodejs/node/pull/31432
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2020-01-23 05:22:20 -08:00
cjihrig 12ff616498 deps,test: update to uvwasi 0.0.4
This commit updates the uvwasi dependency to version 0.0.4. The
most notable change is a refactor of the way paths are resolved.
All paths, including symlinks, are now resolved in terms of
sandboxed paths instead of leaking host system paths.

PR-URL: https://github.com/nodejs/node/pull/31363
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2020-01-16 22:28:32 -08:00
cjihrig b6c589fde5 deps,src,test: update to uvwasi 0.0.3
This commit updates to uvwasi 0.0.3, which implements a newer
version of the WASI spec, snapshot_1. Since the WASI API has
changed, this also requires updating the WebAssembly memory
interfacing logic and recompiling the WASI tests with a
version of wasi-libc that supports snapshot_1.

PR-URL: https://github.com/nodejs/node/pull/30980
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-12-17 17:35:09 -08:00
Anna Henningsen 0a7c874e9c
deps: update uvwasi
PR-URL: https://github.com/nodejs/node/pull/30745
Refs: 34ee0bc96f/src/node_mem.h
Refs: https://github.com/nodejs/quic/pull/126
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-12-07 22:55:19 +01:00
cjihrig 09b1228c3a
wasi: introduce initial WASI support
Co-authored-by: Gus Caplan <me@gus.host>
Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com>
Co-authored-by: Jiawen Geng <technicalcute@gmail.com>
Co-authored-by: Tobias Nießen <tniessen@tnie.de>
Co-authored-by: Chengzhong Wu <legendecas@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/30258
Refs: https://github.com/nodejs/node/pull/27850
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2019-11-30 18:06:39 +01:00