| Age | Commit message (Collapse) | Author | Lines |
|
remove HermitCore leftovers from sys/unix
HermitCore support is already moved to the directory "sys/hermit". => remove leftovers
|
|
|
|
protect creation of destructors by a mutex
- add on HermitCore an additional lock to protect static data
|
|
Revert #65134
To stop giving people on nightly reasons to `allow(improper_ctypes)` while tweaks to the lint are being prepared.
cc #66220
|
|
davidtwco:issue-19834-improper-ctypes-in-extern-C-fn, r=rkruppe"
This reverts commit 3f0e16473de5ec010f44290a8c3ea1d90e0ad7a2, reversing
changes made to 61a551b4939ec1d5596e585351038b8fbd0124ba.
|
|
rename cfg(rustdoc) into cfg(doc)
Needed by https://github.com/rust-lang/rust/pull/61351
r? @QuietMisdreavus
|
|
|
|
add on HermizCore an additional lock to protect static data
|
|
|
|
r=rkruppe
improper_ctypes: `extern "C"` fns
cc #19834. Fixes #65867.
This pull request implements the change [described in this comment](https://github.com/rust-lang/rust/issues/19834#issuecomment-466671572).
cc @rkruppe @varkor @shepmaster
|
|
Use KERN_ARND syscall for random numbers on NetBSD, same as FreeBSD.
This system call is present on all supported NetBSD versions and provides an endless stream of non-blocking random data from the kernel's ChaCha20-based CSPRNG. It doesn't require a file like `/dev/urandom` to be opened.
The system call is documented here (under kern.arandom):
https://netbsd.gw.com/cgi-bin/man-cgi?sysctl+7+NetBSD-7.0
And defined here:
https://nxr.netbsd.org/xref/src/sys/sys/sysctl.h#273
The semantics are the same as FreeBSD so reading 256 bytes per call is fine.
Similar change for getrandom crate: rust-random/getrandom#115
|
|
Implemented the home_dir for VxWorks
Use HOME's value if it is set;
otherwise return NONE.
|
|
Signed-off-by: David Wood <david@davidtw.co>
|
|
[doc] fixes for unix/vxworks `OpenOptionsExt::mode`
|
|
|
|
This system call is present on all supported NetBSD versions and
provides an endless stream of non-blocking random data from the
kernel's ChaCha20-based CSPRNG. It doesn't require a file descriptor
to be opened.
The system call is documented here (under kern.arandom):
https://netbsd.gw.com/cgi-bin/man-cgi?sysctl+7+NetBSD-7.0
And defined here:
https://nxr.netbsd.org/xref/src/sys/sys/sysctl.h#273
The semantics are the same as FreeBSD so reading 256 bytes per call
is fine.
Similar change for getrandom crate: rust-random/getrandom#115
|
|
|
|
vxWorks
|
|
|
|
|
|
Redesign the interface to the unikernel HermitCore
We are developing the unikernel HermitCore, where the kernel is written in Rust and is already part of the Rust Standard Library. The interface between the standard library and the kernel based on a small C library. With this pull request, we remove completely the dependency to C and use lld as linker. Currently, the kernel will be linked to the application as static library, which is published at https://github.com/hermitcore/libhermit-rs.
We don’t longer support the C interface to the kernel. Consequently, we remove this part from the Rust Standard Library.
|
|
SGX: Clear additional flag on enclave entry
An attacker could set both the AC flag in CR0 as in rflags. This causes the enclave to perform an AEX upon a misaligned memory access, and an attacker learns some information about the internal enclave state.
The AC flag in rflags is copied from userspace upon an enclave entry. Upon AEX it is copied and later restored. This patch forces the rflag.AC bit to be reset right after an enter.
|
|
|
|
|
|
|
|
Fix check of `statx` and handle EPERM
Should fix #65662
https://github.com/rust-lang/rust/issues/65662#issuecomment-544593939
> I think a reasonable solution might be to do something like try to stat AT_CWD initially and if that fails with EPERM or ENOSYS we disable the syscall entirely, otherwise it's cached as always good to use.
r? @alexcrichton
|
|
|
|
More Clippy fixes for alloc, core and std
Continuation of https://github.com/rust-lang/rust/pull/63805
|
|
Fix WASI sleep impl
Closes #65607
@sunfishcode
Is it fine to use 0 for the `identifier` field? What is this field used for?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
=> simplifies the maintenance of the interface
|
|
|
|
Update libc to 0.2.64
Passed local tests.
cc potentially interested people: @gnzlbg @tlively
|
|
|
|
|
|
|
|
make File::try_clone produce non-inheritable handles on Windows
~**NOT READY FOR REVIEW.** This PR is currently mainly to trigger CI so that I can see what happens. (Is there a better way to trigger CI?) I don't know whether this change makes sense yet.~ (Edit: @Mark-Simulacrum clarified that CI doesn't currently run on Windows.)
---
File handles shouldn't be inheritable in general.
`std::process::Command` takes care of making them inheritable when child
processes are spawned, and the `CREATE_PROCESS_LOCK` protects against
races in that section on Windows. But `File::try_clone` has been
creating inheritable file descriptors outside of that lock, which could
be leaking into other child processes unintentionally.
See also https://github.com/rust-lang/rust/pull/31069#discussion_r334117665.
|
|
|
|
- Compatible with Emscripten 1.38.46-upstream or later upstream.
- Refactors the Emscripten target spec to share code with other wasm
targets.
- Replaces the old incorrect wasm32 C call ABI with the correct one,
preserving the old one as wasm32_bindgen_compat for wasm-bindgen
compatibility.
- Updates the varargs ABI used by Emscripten and deletes the old one.
- Removes the obsolete wasm32-experimental-emscripten target.
- Uses EMCC_CFLAGS on CI to avoid the timeout problems with #63649.
|
|
vxWorks: implement get_path() and get_mode() for File fmt::Debug
|
|
File handles shouldn't be inheritable in general.
`std::process::Command` takes care of making them inheritable when child
processes are spawned, and the `CREATE_PROCESS_LOCK` protects against
races in that section on Windows. But `File::try_clone` has been
creating inheritable file descriptors outside of that lock, which could
be leaking into other child processes unintentionally.
See also https://github.com/rust-lang/rust/pull/31069#discussion_r334117665.
|
|
|
|
|
|
|