-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 6 pull requests #91692
Rollup of 6 pull requests #91692
Conversation
As a security measure, Windows 11 introduces a new temporary directory API, GetTempPath2. When the calling process is running as SYSTEM, a separate temporary directory will be returned inaccessible to non-SYSTEM processes. For non-SYSTEM processes the behavior will be the same as before.
Windows Server 2022 is a different version from Win11, breaking precent
The tracking issue for this is rust-lang#87555.
Also restricts r8-r14 from being used on Thumb1 targets as per rust-lang#90736.
Some projects (e.g. the `bootimage` crate) may require the user to install the `llvm-tools-preview` rustup component. However, this cannot be easily done with a locally built toolchain. To allow a local toolchain to be used a drop-in replacement for a normal rustup toolchain in more cases, this PR copies the built LLVM tools to the sysoot. From the perspective a tool looking at the sysroot, this is equivalent to installing `llvm-tools-preview`.
…acrum Implement concat_bytes! This implements the unstable `concat_bytes!` macro, which has tracking issue rust-lang#87555. It can be used like: ```rust #![feature(concat_bytes)] fn main() { assert_eq!(concat_bytes!(), &[]); assert_eq!(concat_bytes!(b'A', b"BC", [68, b'E', 70]), b"ABCDEF"); } ``` If strings or characters are used where byte strings or byte characters are required, it suggests adding a `b` prefix. If a number is used outside of an array it suggests arrayifying it. If a boolean is used it suggests replacing it with the numeric value of that number. Doubly nested arrays of bytes are disallowed.
Update std::env::temp_dir to use GetTempPath2 on Windows when available. As a security measure, Windows 11 introduces a new temporary directory API, GetTempPath2. When the calling process is running as SYSTEM, a separate temporary directory will be returned inaccessible to non-SYSTEM processes. For non-SYSTEM processes the behavior will be the same as before. This can help mitigate against attacks such as this one: https://medium.com/csis-techblog/cve-2020-1088-yet-another-arbitrary-delete-eop-a00b97d8c3e2 Compatibility risk: Software which relies on temporary files to communicate between SYSTEM and non-SYSTEM processes may be affected by this change. In many cases, such patterns may be vulnerable to the very attacks the new API was introduced to harden against. I'm unclear on the Rust project's tolerance for such change-of-behavior in the standard library. If anything, this PR is meant to raise awareness of the issue and hopefully start the conversation. How tested: Taking the example code from the documentation and running it through psexec (from SysInternals) on Win10 and Win11. On Win10: C:\test>psexec -s C:\test\main.exe <...> Temporary directory: C:\WINDOWS\TEMP\ On Win11: C:\test>psexec -s C:\test\main.exe <...> Temporary directory: C:\Windows\SystemTemp\
…plett Remove the reg_thumb register class for asm! on ARM Also restricts r8-r14 from being used on Thumb1 targets as per rust-lang#90736. cc ``@Lokathor`` r? ``@joshtriplett``
Use Vec extend instead of repeated pushes on several places Inspired by rust-lang#90813, I tried to use a simple regex (`for .*in.*\{\n.*push\(.*\);\n\s+}`) to search for more places that would use `Vec::push` in a loop and replace them with `Vec::extend`. These probably won't have as much perf. impact as the original PR (if any), but it would probably be better to do a perf run to see if there are not any regressions.
…ant-ice, r=nagisa Do not attempt to suggest help for overly malformed struct/function call This fixes: rust-lang#91461
…k-Simulacrum Install llvm tools to sysroot when assembling local toolchain Some projects (e.g. the `bootimage` crate) may require the user to install the `llvm-tools-preview` rustup component. However, this cannot be easily done with a locally built toolchain. To allow a local toolchain to be used a drop-in replacement for a normal rustup toolchain in more cases, this PR copies the built LLVM tools to the sysoot. From the perspective a tool looking at the sysroot, this is equivalent to installing `llvm-tools-preview`.
@bors r+ rollup=never p=6 |
📌 Commit ab92eca has been approved by |
#91042 already merged |
☀️ Test successful - checks-actions |
Finished benchmarking commit (600820d): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
Successful merges:
Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup