Skip to content
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 10 pull requests #105525

Merged
merged 29 commits into from
Dec 10, 2022
Merged

Rollup of 10 pull requests #105525

merged 29 commits into from
Dec 10, 2022

Commits on Jun 22, 2022

  1. std: rewrite SGX thread parker

    joboet committed Jun 22, 2022
    Configuration menu
    Copy the full SHA
    9678cec View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    633d46d View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2022

  1. Configuration menu
    Copy the full SHA
    a40d300 View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2022

  1. Set download-ci-llvm = "if-available" by default when `channel = "d…

    …ev"`
    
    See rust-lang/compiler-team#566.
    The motivation for changing the default is to avoid downloading and building LLVM when someone runs `x build` before running `x setup`.
    The motivation for only doing it on `channel = "dev"` is to avoid breaking distros or users installing from source. It works because `dev` is also the default channel.
    
    The diff looks larger than it is; most of it is moving the `llvm` branch below the `rust` so `config.channel` is set.
    jyn514 committed Nov 20, 2022
    Configuration menu
    Copy the full SHA
    ac67262 View commit details
    Browse the repository at this point in the history

Commits on Nov 25, 2022

  1. Configuration menu
    Copy the full SHA
    7700595 View commit details
    Browse the repository at this point in the history

Commits on Nov 30, 2022

  1. Configuration menu
    Copy the full SHA
    6259028 View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2022

  1. Implement masking in FileType hashing on Unix

    Commit 7700595 implemented masking of
    FileType to fix an issue[^1] in the semantic of FileType comparison.
    This commit introduces masking to Hash to maintain the invariant that
    x == y => hash(x) == hash(y).
    
    [^1]: rust-lang#104900
    krtab committed Dec 6, 2022
    Configuration menu
    Copy the full SHA
    4198d29 View commit details
    Browse the repository at this point in the history

Commits on Dec 7, 2022

  1. Configuration menu
    Copy the full SHA
    b45b948 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b0dcadf View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    57b7226 View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2022

  1. Configuration menu
    Copy the full SHA
    7d23e29 View commit details
    Browse the repository at this point in the history
  2. Fix Async Generator ABI

    This change was missed when making async generators implement `Future` directly.
    It did not cause any problems in codegen so far, as `GeneratorState<(), Output>`
    happens to have the same ABI as `Poll<Output>`.
    Swatinem committed Dec 8, 2022
    Configuration menu
    Copy the full SHA
    ecf8127 View commit details
    Browse the repository at this point in the history

Commits on Dec 9, 2022

  1. Add LLVM KCFI support to the Rust compiler

    This commit adds LLVM Kernel Control Flow Integrity (KCFI) support to
    the Rust compiler. It initially provides forward-edge control flow
    protection for operating systems kernels for Rust-compiled code only by
    aggregating function pointers in groups identified by their return and
    parameter types. (See llvm/llvm-project@cff5bef.)
    
    Forward-edge control flow protection for C or C++ and Rust -compiled
    code "mixed binaries" (i.e., for when C or C++ and Rust -compiled code
    share the same virtual address space) will be provided in later work as
    part of this project by identifying C char and integer type uses at the
    time types are encoded (see Type metadata in the design document in the
    tracking issue rust-lang#89653).
    
    LLVM KCFI can be enabled with -Zsanitizer=kcfi.
    
    Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com>
    rcvalle and bjorn3 committed Dec 9, 2022
    Configuration menu
    Copy the full SHA
    65698ae View commit details
    Browse the repository at this point in the history
  2. Add documentation for LLVM KCFI support

    This commit adds initial documentation for LLVM Kernel Control Flow
    Integrity (KCFI) support to the Rust compiler (see rust-lang#105109 and rust-lang#89653).
    
    Co-authored-by: Miguel Ojeda <ojeda@users.noreply.github.com>
    rcvalle and ojeda committed Dec 9, 2022
    Configuration menu
    Copy the full SHA
    e1741ba View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    24cd863 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    84a4635 View commit details
    Browse the repository at this point in the history
  5. Introduce Span::is_visible

    estebank committed Dec 9, 2022
    Configuration menu
    Copy the full SHA
    b9da55a View commit details
    Browse the repository at this point in the history

Commits on Dec 10, 2022

  1. Update cargo

    2 commits in f6e737b1e3386adb89333bf06a01f68a91ac5306..70898e522116f6c23971e2a554b2dc85fd4c84cd
    2022-12-02 20:21:24 +0000 to 2022-12-05 19:43:44 +0000
    - Rename `generate_units` -&gt; `generate_root_units` (rust-lang/cargo#11458)
    - Implements cargo file locking using fcntl on Solaris. (rust-lang/cargo#11439)
    weihanglo committed Dec 10, 2022
    Configuration menu
    Copy the full SHA
    ac90c9b View commit details
    Browse the repository at this point in the history
  2. Correct wrong note for short circuiting operators

    They *are* representable by traits, even if the short-circuiting
    behaviour requires a different approach than the non-short-circuiting
    operators. For an example proposal, see the postponed RFC 2722.
    As it is not accurate, reword the note.
    est31 committed Dec 10, 2022
    Configuration menu
    Copy the full SHA
    f069e71 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#98391 - joboet:sgx_parker, r=m-ou-se

    Reimplement std's thread parker on top of events on SGX
    
    Mutex and Condvar are being replaced by more efficient implementations, which need thread parking themselves (see rust-lang#93740). Therefore, the generic `Parker` needs to be replaced on all platforms where the new lock implementation will be used.
    
    SGX enclaves have a per-thread event state, which allows waiting for and setting specific bits. This is already used by the current mutex implementation. The thread parker can however be much more efficient, as it only needs to store the `TCS` address of one thread. This address is stored in a state variable, which can also be set to indicate the thread was already notified.
    
    `park_timeout` does not guard against spurious wakeups like the current condition variable does. This is allowed by the API of `Parker`, and I think it is better to let users handle these wakeups themselves as the guarding is quite expensive and might not be necessary.
    
    `@jethrogb` as you wrote the initial SGX support for `std`, I assume you are the target maintainer? Could you help me test this, please? Lacking a x86_64 chip, I can't run SGX.
    matthiaskrgr authored Dec 10, 2022
    Configuration menu
    Copy the full SHA
    ae8794c View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#104019 - compiler-errors:print-generator-si…

    …zes, r=wesleywiser
    
    Compute generator sizes with `-Zprint_type_sizes`
    
    Fixes rust-lang#103887
    r? `@pnkfelix`
    matthiaskrgr authored Dec 10, 2022
    Configuration menu
    Copy the full SHA
    0f5d3ba View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#104512 - jyn514:download-ci-llvm-default, r…

    …=Mark-Simulacrum
    
    Set `download-ci-llvm = "if-available"` by default when `channel = dev`
    
    See rust-lang/compiler-team#566. The motivation for changing the default is to avoid downloading and building LLVM when someone runs `x build` before running `x setup`. The motivation for only doing it on `channel = "dev"` is to avoid breaking distros or users installing from source. It works because `dev` is also the default channel.
    
    The diff looks larger than it is; most of it is moving the `llvm` branch below the `rust` so `config.channel` is set.
    
    r? `@Mark-Simulacrum` cc `@oli-obk` `@bjorn3` `@cuviper`
    matthiaskrgr authored Dec 10, 2022
    Configuration menu
    Copy the full SHA
    1ce18d2 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#104901 - krtab:filetype_compare, r=the8472

    Implement masking in FileType comparison on Unix
    
    Fixes: rust-lang#104900
    matthiaskrgr authored Dec 10, 2022
    Configuration menu
    Copy the full SHA
    eb1159c View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#105082 - Swatinem:async-abi, r=compiler-errors

    Fix Async Generator ABI
    
    This change was missed when making async generators implement `Future` directly.
    It did not cause any problems in codegen so far, as `GeneratorState<(), Output>`
    happens to have the same ABI as `Poll<Output>`.
    matthiaskrgr authored Dec 10, 2022
    Configuration menu
    Copy the full SHA
    020d7af View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#105109 - rcvalle:rust-kcfi, r=bjorn3

    Add LLVM KCFI support to the Rust compiler
    
    This PR adds LLVM Kernel Control Flow Integrity (KCFI) support to the Rust compiler. It initially provides forward-edge control flow protection for operating systems kernels for Rust-compiled code only by aggregating function pointers in groups identified by their return and parameter types. (See llvm/llvm-project@cff5bef.)
    
    Forward-edge control flow protection for C or C++ and Rust -compiled code "mixed binaries" (i.e., for when C or C++ and Rust -compiled code share the same virtual address space) will be provided in later work as part of this project by identifying C char and integer type uses at the time types are encoded (see Type metadata in the design document in the tracking issue rust-lang#89653).
    
    LLVM KCFI can be enabled with -Zsanitizer=kcfi.
    
    Thank you again, `@bjorn3,` `@eddyb,` `@nagisa,` and `@ojeda,` for all the help!
    matthiaskrgr authored Dec 10, 2022
    Configuration menu
    Copy the full SHA
    947fe7e View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#105505 - WaffleLapkin:yeet_unused_parens_li…

    …nt, r=fee1-dead
    
    Don't warn about unused parens when they are used by yeet expr
    
    Don't even get me started on how I've found this.
    matthiaskrgr authored Dec 10, 2022
    Configuration menu
    Copy the full SHA
    9e87dd9 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#105514 - estebank:is_visible, r=oli-obk

    Introduce `Span::is_visible`
    
    r? `@oli-obk`
    matthiaskrgr authored Dec 10, 2022
    Configuration menu
    Copy the full SHA
    cf84006 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#105516 - weihanglo:update-cargo, r=weihanglo

    Update cargo
    
    2 commits in f6e737b1e3386adb89333bf06a01f68a91ac5306..70898e522116f6c23971e2a554b2dc85fd4c84cd 2022-12-02 20:21:24 +0000 to 2022-12-05 19:43:44 +0000
    
    - Rename `generate_units` -&gt; `generate_root_units` (rust-lang/cargo#11458)
    - Implements cargo file locking using fcntl on Solaris. (rust-lang/cargo#11439)
    
    r? `@ghost`
    matthiaskrgr authored Dec 10, 2022
    Configuration menu
    Copy the full SHA
    6d7e3df View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#105522 - est31:remove_or_and_note, r=scottmcm

    Remove wrong note for short circuiting operators
    
    They *are* representable by traits, even if the short-circuiting behaviour requires a different approach than the non-short-circuiting operators. For an example proposal, see the postponed [RFC 2722](rust-lang/rfcs#2722). As it is not accurate, remove most of the note.
    matthiaskrgr authored Dec 10, 2022
    Configuration menu
    Copy the full SHA
    f6c2add View commit details
    Browse the repository at this point in the history