about summary refs log tree commit diff
path: root/src/libstd/sys
AgeCommit message (Collapse)AuthorLines
2019-11-20Rollup merge of #66553 - hermitcore:hermit, r=rkruppeMazdak Farrokhzad-1/+1
remove HermitCore leftovers from sys/unix HermitCore support is already moved to the directory "sys/hermit". => remove leftovers
2019-11-19HermitCore support is moved to sys/hermit, remove obsolete statement in sys/unixStefan Lankes-1/+1
2019-11-15Rollup merge of #66350 - hermitcore:hermit, r=rkruppeMazdak Farrokhzad-0/+3
protect creation of destructors by a mutex - add on HermitCore an additional lock to protect static data
2019-11-14Auto merge of #66378 - rkruppe:revert-pr-65134, r=pnkfelixbors-4/+0
Revert #65134 To stop giving people on nightly reasons to `allow(improper_ctypes)` while tweaks to the lint are being prepared. cc #66220
2019-11-13Revert "Auto merge of #65134 - ↵Robin Kruppe-4/+0
davidtwco:issue-19834-improper-ctypes-in-extern-C-fn, r=rkruppe" This reverts commit 3f0e16473de5ec010f44290a8c3ea1d90e0ad7a2, reversing changes made to 61a551b4939ec1d5596e585351038b8fbd0124ba.
2019-11-13Rollup merge of #66166 - GuillaumeGomez:rename-rustdoc-to-doc, r=QuietMisdreavusYuki Okushi-17/+17
rename cfg(rustdoc) into cfg(doc) Needed by https://github.com/rust-lang/rust/pull/61351 r? @QuietMisdreavus
2019-11-13Merge remote-tracking branch 'rust-lang/master' into hermitStefan Lankes-2/+8
2019-11-13protect creation of destructors by a mutexStefan Lankes-0/+3
add on HermizCore an additional lock to protect static data
2019-11-06rename cfg(rustdoc) into cfg(doc)Guillaume Gomez-17/+17
2019-11-06Auto merge of #65134 - davidtwco:issue-19834-improper-ctypes-in-extern-C-fn, ↵bors-0/+4
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
2019-11-06Rollup merge of #66092 - niacat:master, r=nagisaMazdak Farrokhzad-1/+2
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
2019-11-05Rollup merge of #66091 - Wind-River:master_xyz, r=cramertjPietro Albini-1/+2
Implemented the home_dir for VxWorks Use HOME's value if it is set; otherwise return NONE.
2019-11-05libstd: allow `improper_ctypes` in `sys/sgx`David Wood-0/+4
Signed-off-by: David Wood <david@davidtw.co>
2019-11-05Rollup merge of #65905 - cuviper:doc-unix-mode, r=Dylan-DPCPietro Albini-4/+4
[doc] fixes for unix/vxworks `OpenOptionsExt::mode`
2019-11-04Use any() in code shared between FreeBSD and NetBSDnia-1/+1
2019-11-04Use KERN_ARND syscall for random numbers on NetBSD, same as FreeBSD.nia-1/+2
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
2019-11-04Implemented the home_dir for VxWorksUmesh Kalappa-1/+2
2019-10-29vxWorks: remove all code related to UNIX socket as it is not supported by ↵BaoshanPang-1828/+60
vxWorks
2019-10-28[doc] fix the reference to using `OpenOptions::open`Josh Stone-2/+2
2019-10-28[doc] add a possessive apostrophe in `OpenOptionsExt::mode`Josh Stone-2/+2
2019-10-26Auto merge of #65167 - hermitcore:rusty-hermit, r=alexcrichtonbors-30/+2255
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.
2019-10-26Rollup merge of #65810 - raoulstrackx:ac_mitigation, r=nagisaYuki Okushi-1/+7
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.
2019-10-25forgot pushfq/popqfq: fixedRaoul Strackx-0/+2
2019-10-25cleaning up codeRaoul Strackx-9/+4
2019-10-25removed unnecessary pushRaoul Strackx-1/+0
2019-10-25Rollup merge of #65685 - oxalica:statx-eperm, r=alexcrichtonMazdak Farrokhzad-42/+55
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
2019-10-25Merge branch 'master' into rusty-hermit, resolve conflictsStefan Lankes-14/+13
2019-10-23Rollup merge of #64178 - mati865:clippy, r=scottmcmMazdak Farrokhzad-10/+9
More Clippy fixes for alloc, core and std Continuation of https://github.com/rust-lang/rust/pull/63805
2019-10-23Rollup merge of #65617 - newpavlov:patch-2, r=alexcrichtonYuki Okushi-4/+4
Fix WASI sleep impl Closes #65607 @sunfishcode Is it fine to use 0 for the `identifier` field? What is this field used for?
2019-10-23Some tweaksoxalica-49/+44
2019-10-22Apply clippy::while_let_on_iterator suggestionsMateusz Mikuła-2/+1
2019-10-22Apply clippy::needless_return suggestionsMateusz Mikuła-8/+8
2019-10-22Merge branch 'master' into rusty-hermitStefan Lankes-34/+2
2019-10-22Fix check of `statx`oxalica-16/+34
2019-10-21fixed ac vulnerabilityRaoul Strackx-0/+10
2019-10-20Merge branch 'master' into rusty-hermitStefan Lankes-18/+239
2019-10-20move interface to the unikernel in the crate hermit-abiStefan Lankes-113/+54
=> simplifies the maintenance of the interface
2019-10-20fix WASI sleep implArtyom Pavlov-4/+4
2019-10-20Auto merge of #65469 - mati865:libc, r=alexcrichtonbors-34/+2
Update libc to 0.2.64 Passed local tests. cc potentially interested people: @gnzlbg @tlively
2019-10-18Fix cast of stx_btime.tv_nsecoxalica-1/+1
2019-10-18Fix cfgs for current libcoxalica-89/+139
2019-10-18Prefer statx on linux if availableoxalica-7/+164
2019-10-17Rollup merge of #65316 - oconnor663:noninheritable, r=alexcrichtonMazdak Farrokhzad-1/+1
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.
2019-10-17Update emscripten functions declarationsMateusz Mikuła-34/+2
2019-10-16Upgrade Emscripten targets to use upstream LLVM backendThomas Lively-1/+2
- 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.
2019-10-13Rollup merge of #65246 - Wind-River:real_master_2, r=kennytmMazdak Farrokhzad-6/+20
vxWorks: implement get_path() and get_mode() for File fmt::Debug
2019-10-11make File::try_clone produce non-inheritable handles on WindowsJack O'Connor-1/+1
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.
2019-10-10vxWorks: implement get_path() and get_mode() for File fmt::DebugBaoshanPang-6/+20
2019-10-08add checking (r == 0)Baoshan Pang-1/+1
2019-10-06minor changes to follow the Rust's style guidelinesStefan Lankes-5/+10