| Age | Commit message (Collapse) | Author | Lines |
|
- Update system table crc32
- Fix unsound use of Box
- Free exit data
- Code improvements
- Introduce OwnedTable
- Update r-efi to latest version
- Use extended_varargs_abi_support for
install_multiple_protocol_interfaces and
uninstall_multiple_protocol_interfaces
- Fix comments
- Stub out args implementation
Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
|
|
Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
|
|
Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
|
|
Also fix stdio inherit
Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
|
|
Only tested in 2 levels right now. Need args support for 3 levels
Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
|
|
Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
|
|
Implement stderr support in similar fashion.
Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
|
|
Use a custom simple_text_output protocol to capture output.
Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
|
|
Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
|
|
Co-authored-by: Jonas Böttiger <jonasboettiger@icloud.com>
|
|
Note that current_guard is probably not unsafe for future work.
|
|
Editorialize on the wisdom of this as we do.
|
|
This is technically "not necessary", as we will "just" segfault instead
if we e.g. arrive inside the handler fn with the null altstack. However,
it seems incorrect to go about this hoping that segfaulting is okay,
seeing as how our purpose here is to mitigate stack overflow problems.
Make sure NEED_ALTSTACK syncs with PAGE_SIZE when we do.
Co-authored-by: Jonas Böttiger <jonasboettiger@icloud.com>
|
|
sometimes a safety comment is a prayer.
avoid fuzzy provenance casts after deref.
Co-authored-by: Jonas Böttiger <jonasboettiger@icloud.com>
|
|
workingjubilee:actually-break-up-big-ass-stack-overflow-fn, r=joboet
unix: break `stack_overflow::install_main_guard` into smaller fn
This was one big deeply-indented function for no reason. This made it hard to reason about the boundaries of its safety. Or just, y'know, read. Simplify it by splitting it into platform-specific functions, but which are still asked to keep compiling (a desirable property, since all of these OS use a similar API).
This is mostly a whitespace change, so I suggest reviewing it only after setting Files changed -> (the options gear) -> [x] Hide whitespace as that will make it easier to see how the code was actually broken up instead of raw line diffs.
|
|
|
|
Windows: Use futex implementation for `Once`
Keep the queue implementation for win7.
Inspired by PR #121956
<!--
If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.
This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using
r? <reviewer name>
-->
|
|
Prevent double reference in generic futex
In the Windows futex implementation we were a little lax at allowing references to references (i.e. `&&`) which can lead to deadlocks due to reading the wrong memory address. This uses a trait to tighten the constraints and ensure this doesn't happen.
r? libs
|
|
Make more Windows functions `#![deny(unsafe_op_in_unsafe_fn)]`
As part of #127747, I've evaluated some more Windows functions and added `unsafe` blocks where necessary. Some are just trivial wrappers that "inherit" the full unsafety of their function, but for others I've added some safety comments. A few functions weren't actually unsafe at all. I think they were just using `unsafe fn` to avoid an `unsafe {}` block.
I'm not touching `c.rs` yet because that is partially being addressed by another PR and also I have plans to further reduce the number of wrapper functions we have in there.
r? libs
|
|
|
|
This just was a mess.
|
|
This function is purely informative, answering where a stack starts.
This is a safe operation, even if an answer requires unsafe code,
and even if the result is some unsafe code decides to trust the answer.
It also doesn't need to fetch the PAGE_SIZE when its caller just did so!
Let's complicate its signature and in doing so simplify its operation.
This allows sprinkling around #[forbid(unsafe_op_in_unsafe_fn)]
|
|
|
|
|
|
|
|
|
|
r=tgross35
std: Forbid unwrapped unsafe ops in xous and uefi modules
|
|
zkvm: add `#[forbid(unsafe_op_in_unsafe_fn)]` in `stdlib`
This also adds an additional `unsafe` block to address compiler errors.
This PR is intended to address https://github.com/rust-lang/rust/issues/127747 for the zkvm target.
|
|
Use futex.rs for Windows thread parking
If I'm not overlooking anything then the Windows 10+ thread parking implementation is practically the same as the futex.rs implementation. So we may as well use the same implementation for both. The old version is still kept around for Windows 7 support.
r? ````@joboet```` if you wouldn't mind double checking I've not missed something
|
|
std: Use `read_unaligned` for reads from DWARF
There's a lot of... *stuff* going on here. Meanwhile, `read_unaligned` has been available since 1.17.0, so let's just use that.
|
|
Clean up more comments near use declarations
#125443 will reformat all use declarations in the repository. There are a few edge cases involving comments on use declarations that require care. This PR fixes them up so #125443 can go ahead with a simple `x fmt --all`. A follow-up to #126717.
r? ``@cuviper``
|
|
|
|
|
|
This also adds an additional `unsafe` block to address compiler errors.
|
|
There are some comments describing multiple subsequent `use` items. When
the big `use` reformatting happens some of these `use` items will be
reordered, possibly moving them away from the comment. With this
additional level of formatting it's not really feasible to have comments
of this type. This commit removes them in various ways:
- merging separate `use` items when appropriate;
- inserting blank lines between the comment and the first `use` item;
- outright deletion (for comments that are relatively low-value);
- adding a separate "top-level" comment.
We also entirely skip formatting for four library files that contain
nothing but `pub use` re-exports, where reordering would be painful.
|
|
|
|
|
|
Co-authored-by: Jonas Böttiger <jonasboettiger@icloud.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this is redundant, so we can just delete it.
|
|
|
|
These need to get their safety story straight
|
|
|
|
|
|
|