76 Commits

Author SHA1 Message Date
Jamey Sharp
9616ead607 cargo vet audits for guest profiling support (#6284)
These audits are necessary for in-process guest profiling support,
currently under development in PR #6282.
2023-04-25 17:57:28 +00:00
Nick Fitzgerald
8145e6b5b1 Add a wildcard audit for arbitrary (#6264) 2023-04-21 22:33:19 +00:00
Trevor Elliott
d9e27c5441 Bump regalloc2 to 0.7.0 (#6237)
* Bump RA2 to 0.7.0

* Certify the RA2 update

* Import the rustc-hash audit

* Updates for regalloc2

prtest:full

* Update tests
2023-04-21 00:47:58 +00:00
Dan Gohman
1a077dfd6b Fix poll_oneoff's handling of non-regular files. (#6258)
`poll_oneoff` uses `system_interface::ReadReady` to compute how many
bytes are ready to be read, which is part of the Preview1 `poll_oneoff`
API. This updates to system-interface 0.25.7 which has a fix to handle
special files such as /dev/urandom and /dev/null properly.

Fixes #6239.
2023-04-21 00:34:29 +00:00
Dan Gohman
c59bb8db39 Update several dependencies. (#6171)
This updates to rustix 0.37.13, which contains some features we can use to
implement more features in wasi-common for the wasi-sockets API. This also
pulls in several other updates to avoid having multiple versions of rustix.

This does introduce multiple versions of windows-sys, as the errno and tokio
crates are currently using 0.45 while rustix and other dependencies have
updated to 0.48; PRs updating these are already in flight so this will
hopefully be resolved soon.

It also includes cap-std 1.0.14, which disables the use of `openat2` and
`statx` on Android, fixing a bug where some Android devices crash the
process when those syscalls are executed.
2023-04-20 14:03:49 +00:00
Trevor Elliott
ef7af28ef0 Bump hashbrown to 0.13.2 (#6238) 2023-04-18 23:12:09 +00:00
Bobby Holley
5e4b928161 Run cargo-vet prune. (#6231) 2023-04-18 18:23:46 +00:00
Alex Crichton
91de5de049 Update wasm-tools crates (#6215)
While bringing in no major updates for Wasmtime I've taken this
opportunity to list myself for `cargo vet` with wildcard audits of this
family of crates. That means I shouldn't need to further add any more
entries in the future for updating these crates and additionally any
other organizations using these audits will automatically be able to
have audits for version that I publish.

While here I also ran `cargo vet prune` which was able to remove a
number of our exemptions.
2023-04-15 00:07:32 +00:00
Andrew Brown
5ba0d696b7 ci: unpin the wasi-nn tasks from an older Ubuntu (#6089)
* ci: unpin the wasi-nn tasks from an older Ubuntu

Previously, OpenVINO's lack of APT packages for Ubuntu 22.04 (`jammy`)
prevented us from upgrading the GitHub runner to use `ubuntu-latest`. I
updated the `install-openvino-action` to substitute in the `focal`
packages in this case (this is what the OpenVINO team considers the fix)
so this pin should no longer be necessary. Fixes #5408.

(Run all CI actions: prtest:full)

* vet: audit the openvino version bump
2023-04-06 15:44:16 +00:00
Pat Hickey
bf1aaba06d add supply chain audits for #5929's rustls changes (#6137)
The `ring` crate needed to be exempted: it contains a large quantity of asm and native binary implementations of crypto primitives. It is a major undertaking to certify the safety of those implementations.

ring also pulled in the wasm-bindgen family of crates for its wasm32-unknown-unknown target, which this project will not be using. Because we don't care about that platform, I added exemptions for all of these crates, so we don't have to audit them.

The actual supply chain audits for rusttls, rustls-webpki, sct, and tokio-rustls were unremarkable. I also audited a small diff on wasm-bindgen-shared because it was trivial.
2023-04-03 22:19:23 +00:00
Pat Hickey
83d00fea4a cargo vet remaining dependencies for #5929 (#6125) 2023-03-30 17:30:59 +00:00
Pat Hickey
3d03729fa1 wasi-http supply chain audit (#6121)
* add cargo-deny exception for duplicate versions of windows-sys

* cargo vetting for all new deps introduced by https://github.com/bytecodealliance/wasmtime/pull/5929

The audits are straightforward. The exemptions, as always, need to be justified:

* core-foundation, core-foundation-sys, security-framework, security-framework-sys: these are large crates which are FFI bindings to Mac OS frameworks. As such they contain tons of unsafe code to make these FFI calls and manage memory. These crates are too big to audit.

* schannel: same as the above, except this is a windows component, which I'm also unfamiliar with.

* openssl, openssl-sys: also large FFI bindings which are impractical to audit.

* futures-macro, futures-task: while not as complex as futures-util, these are beyond my personal understanding of futures to vet practically. I've asked Alex to look at auditing these, and he will after he returns from vacation next week.

* futures-util: 25kloc of code, over 149 instances of the substring "unsafe" (case insensitive), this is impractical to audit in the extreme.

* h2, http, httparse, hyper, mio, tokio: this so-called tokio/hyper family are very large and challenging to audit. Bobby Holley has indicated that he is working to get the AWS engineers who maintain these crates to publish their own audits, which we can then import. We expect to exempt these until those imports are available.
2023-03-30 00:29:07 +00:00
Bobby Holley
82fcf3e562 Bump cargo-vet to 0.6.1 (#6110)
* Bump cargo-vet to 0.6.1.

* Add Fuchsia and prune.
2023-03-28 00:07:14 +00:00
Bobby Holley
5ff2824ebb Bump cargo-vet to 0.5. (#6029)
Aside from a few new features (notably automatic registry suggestions), this
release removes the need to import description for criteria that are not
directly used, and adds an explicit version to the cargo-vet instance.
2023-03-15 22:14:38 +00:00
Nick Fitzgerald
5623f7280c Update wasmprinter and wasm-mutate deps (#5983)
* Bump wasm-mutate and wasmprinter deps

* Add wildcard audits for wasmprinter and wasm-mutate

* Add wildcard audit for bumpalo
2023-03-10 20:20:57 +00:00
Bobby Holley
fc45ccc125 Update cargo-vet imports (#5959)
* Switch cargo-vet import to Mozilla's aggregated audit set.

* Import audits from embark studios.

* Import audits from chromeos.

* Import audits from ISRG.
2023-03-08 00:24:56 +00:00
Bobby Holley
8baf645eae Bump cargo-vet to 0.4.0 (#5954)
* Bump cargo-vet to 0.4.0.

* Run `cargo vet prune`.
2023-03-07 19:16:55 +00:00
Pat Hickey
d3fdb5fc2c cargo vet: add audits for criterion upgrade, and its transitive dependencies (#5946) 2023-03-07 00:20:03 +00:00
Alex Crichton
3c9fc3ec8c Update wasm-tools crates (#5945)
This notably updates `wasmparser` for updates to the relaxed-simd
proposal and an implementation of the function-references proposal.
Additionally there are some minor bug fixes being picked up for WIT and
the component model.
2023-03-06 23:47:34 +00:00
Alex Crichton
aad8eaeb5a Add more vets for core dumps (#5894)
Required by #5868
2023-02-28 17:32:59 +00:00
Alex Crichton
fb2cbec34a Add vet entries for coredump support (#5878)
* Update the `num_cpus` crate

Audits for this update provided from our import from Mozilla.

* Add vet entries for coredump support
2023-02-24 18:26:39 +00:00
Jamey Sharp
539c42e590 Audit object crate update to 0.30.3 (#5827)
This audit is needed for #5619. I'm going ahead and updating Cargo.toml
and Cargo.lock at the same time because no source code changes are
required for this update.
2023-02-18 00:36:21 +00:00
Chris Fallin
c15c4ed23d Cranelift: upgrade to regalloc2 0.6.1. (#5799)
* Cranelift: upgrade to regalloc2 0.6.1.

Fixes #5791 by pulling in bytecodealliance/regalloc2#113.

* Add cargo-vet entry for regalloc2 0.6.1.
2023-02-16 03:22:58 +00:00
Alex Crichton
255fd6be0a Update world-selection in bindgen! macro (#5779)
* Update world-selection in `bindgen!` macro

Inspired by bytecodealliance/wit-bindgen#494 specifying a world or
document to bindgen is now optional as it's inferred if there's only one
`default world` in a package's documents.

* Add cargo-vet entry
2023-02-14 20:54:37 +00:00
Alex Crichton
49a89f91e5 Add cargo-vet entries for dependency update (#5778)
This adds vet entries for the updates being performed in #5513
2023-02-14 18:39:33 +00:00
Alex Crichton
49613be393 Update wasm-tools crates (#5757)
* Update wasm-tools crates

Pulls in a new component binary format which should hopefully be the
last update for awhile.

* Update cargo vet configuration
2023-02-10 02:14:53 +00:00
Trevor Elliott
116e5a665f Bump regalloc2 to 0.6.0 (#5742)
* Bump regalloc2
* Certify regalloc2 0.6.0
2023-02-07 15:57:49 -08:00
Pat Hickey
743a40a6c4 Cargo update cap-std family, and audit deps (#5710)
* update cap-std family and its deps, and audit them

* audit base64: append a safe-to-deploy entry

I mistakenly marked it safe-to-run not understanding that safe-to-deploy was required.

* update to fd-lock 3.0.10

eliminates duplicate dep on windows-sys
2023-02-06 10:16:19 -08:00
Chris Fallin
43022c862a Add cargo-vet updates for audit backlog. (#5708) 2023-02-04 01:46:44 +00:00
Pat Hickey
331bc281a1 cargo-vet: audit base64 0.21.0 (#5707) 2023-02-04 01:17:47 +00:00
Alex Crichton
a2a0a9ef5b Update to the latest wit-parser (#5694)
This notably pulls in support in WIT for types-in-worlds.
2023-02-02 19:21:01 +00:00
Nick Fitzgerald
ffcd61b520 Cranelift: Harvest each Souper LHS into its own file (#5649)
* Cranelift: Harvest each Souper LHS into its own file

Souper only handles one input LHS at a time, so this makes it way easier to
script. Don't need to try and parse each LHS.

* Add audit of `arrayref` version 0.3.6

* Add audit of `constant_time_eq` version 0.2.4
2023-01-30 13:24:11 -08:00
Alex Crichton
a7d0d00e57 Update wasm-tools crates (#5631)
Nothing major pulled in here, but wanted to update to the latest
versions which enable tail calls by default. When used in Wasmtime,
however, the feature is disabled without the possibility of being
enabled since it's not implemented.
2023-01-25 16:33:26 +00:00
Szczepan Ćwikliński
86790d36df Fix compile errors on FreeBSD x64/arm64 (#5606)
* Fix compile error on FreeBSD x64

* Fix compile on FreeBSD arm64

* Update Cargo.lock for ittapi

* vet: certify diff for ittapi libraries

Co-authored-by: Andrew Brown <andrew.brown@intel.com>
2023-01-20 18:42:03 +00:00
Alex Crichton
e0d7c3bbe1 Update tokio to resolve dependabot warning (#5607)
This doesn't fully update tokio since the update to the latest version
has quite a few changes I'd prefer to not audit at the moment, but it
updates to a patched version.
2023-01-20 11:56:59 -06:00
Dan Gohman
e260abfce7 Update to rustix 0.36.7. (#5590)
This fixes compilation on armv7-unknown-freebsd, as reported [here].

[here]: https://github.com/bytecodealliance/wasmtime/issues/5499#issuecomment-1383157702
2023-01-18 17:15:50 -08:00
Alex Crichton
247851234b Update WIT tooling used by Wasmtime (#5565)
* Update WIT tooling used by Wasmtime

This commit updates the WIT tooling, namely the wasm-tools family of
crates, with recent updates. Notably:

* bytecodealliance/wasm-tools#867
* bytecodealliance/wasm-tools#871

This updates index spaces in components and additionally bumps the
minimum required version of the component binary format to be consumed
by Wasmtime (because of the index space changes). Additionally WIT
tooling now fully supports `use`.

Note that WIT tooling doesn't, at this time, fully support packages and
depending on remotely defined WIT packages. Currently WIT still needs to
be vendored in the project. It's hoped that future work with `cargo
component` and possible integration here could make the story about
depending on remotely-defined WIT more ergonomic and streamlined.

* Fix `bindgen!` codegen tests

* Add a test for `use` paths an implement support

* Update to crates.io versions of wasm-tools

* Uncomment codegen tests
2023-01-18 15:37:03 +00:00
Alex Crichton
3861f667a2 Update some wasm-tools crates (#5422)
Notably this pulls in
https://github.com/bytecodealliance/wasm-tools/pull/862 which should fix
some fuzz bugs on oss-fuzz.
2022-12-12 18:34:29 -06:00
Alex Crichton
7f53525ad9 Fix built with latest wit-parser crate (#5393)
A mistake was made in the publication of `wit-parser` where a breaking
change was made without bumping its major version, causing build issues
on `main` if `wit-parser` is updated. This commit updates `wit-parser`
to the latest and we'll handle breaking changes better next time.

Closes #5390
2022-12-07 10:47:50 -06:00
Trevor Elliott
ab6c8e1a1a Bump regalloc2 to version 0.5.1 (#5387)
Bump regalloc2 to version 0.5.1.
2022-12-06 15:38:03 -08:00
Alex Crichton
2329ecc341 Add a wasmtime::component::bindgen! macro (#5317)
* Import Wasmtime support from the `wit-bindgen` repo

This commit imports the `wit-bindgen-gen-host-wasmtime-rust` crate from
the `wit-bindgen` repository into the upstream Wasmtime repository. I've
chosen to not import the full history here since the crate is relatively
small and doesn't have a ton of complexity. While the history of the
crate is quite long the current iteration of the crate's history is
relatively short so there's not a ton of import there anyway. The
thinking is that this can now continue to evolve in-tree.

* Refactor `wasmtime-component-macro` a bit

Make room for a `wit_bindgen` macro to slot in.

* Add initial support for a `bindgen` macro

* Add tests for `wasmtime::component::bindgen!`

* Improve error forgetting `async` feature

* Add end-to-end tests for bindgen

* Add an audit of `unicase`

* Add a license to the test-helpers crate

* Add vet entry for `pulldown-cmark`

* Update publish script with new crate

* Try to fix publish script

* Update audits

* Update lock file
2022-12-06 13:06:00 -06:00
Trevor Elliott
f138fc0ed3 Bump regalloc2 to 0.5.0 (#5345)
* Bump the regalloc2 dependency to 0.5.0
* Replace preg_set_from_machine_env with PRegSet::from
* Vet the regalloc2 update
2022-11-29 11:25:35 -08:00
Dan Gohman
d6d3c49972 Update to cap-std 1.0, io-lifetimes 1.0. (#5330)
The main change here is that io-lifetimes 1.0 switches to use the I/O safety
feature in the standard library rather than providing its own copy.

This also updates to windows-sys 0.42.0 and rustix 0.36.
2022-11-28 15:31:18 -08:00
Jamey Sharp
044b57f334 cranelift-isle: Rewrite error reporting (#5318)
There were several issues with ISLE's existing error reporting
implementation.

- When using Miette for more readable error reports, it would panic if
  errors were reported from multiple files in the same run.
- Miette is pretty heavy-weight for what we're doing, with a lot of
  dependencies.
- The `Error::Errors` enum variant led to normalization steps in many
  places, to avoid using that variant to represent a single error.

This commit:
- replaces Miette with codespan-reporting
- gets rid of a bunch of cargo-vet exemptions
- replaces the `Error::Errors` variant with a new `Errors` type
- removes source info from `Error` variants so they're easy to construct
- adds source info only when formatting `Errors`
- formats `Errors` with a custom `Debug` impl
- shares common code between ISLE's callers, islec and cranelift-codegen
- includes a source snippet even with fancy-errors disabled

I tried to make this a series of smaller commits but I couldn't find any
good split points; everything was too entangled with everything else.
2022-11-23 14:20:48 -08:00
Alex Crichton
b305f251fb Update the wasm-tools family of crates (#5310)
Most of the changes here are the updates to the component model which
includes optional URL fields in imports/exports.
2022-11-21 21:37:16 +00:00
Robin Freyler
72eda0c6ef Update wasmi to 0.20.0 in wasmtime-fuzzing (#5256)
* update wasmi to 0.20 in wasmtime-fuzzing

* add cargo-vet entries for wasmi_core 0.5.0 and wasmi 0.20.0
2022-11-14 16:51:48 -06:00
Alex Crichton
0548952319 Update wasm-tools crates (#5248)
No major updates, just keeping up-to-date.
2022-11-10 21:23:20 +00:00
Nick Fitzgerald
3c496d8cdc Update regalloc2 to v0.4.2 (#5169) 2022-11-01 11:18:19 -07:00
Matthew Tamayo-Rios
f082756643 Make WASI-NN classes send and/or sync (#5077)
* Make send and remove wrapper around WasiNnCtx·

This removes the wrapper around WasiNnCtx and no longer requires borrow_mut(). Once send/sync
changes in OpenVINO crate are merged in it will allow·use by frameworks that requires this trait.

* Bump openvino to compatible version.

* BackendExecutionContext should be Send and Sync

* Fix rust format issues.

* Update Cargo.lock for openvino

* Audit changes to openvino crates.
2022-10-27 15:52:23 -07:00
Alex Crichton
bc3285e845 Update wasm-tools crates (#5130)
* Update wasm-tools crates

Mostly just a hygienic update, nothing major here

* Fix fuzz compile

* Fix test expectations
2022-10-26 18:29:10 +00:00