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

Move all seccomp consts and structs into top-level mod #3343

Merged
merged 1 commit into from Jan 4, 2024

Conversation

boustrophedon
Copy link
Contributor

Move all seccomp consts and structs into top-level mod

Seccomp constants and structs were partially defined in the top-level mod.rs for linux and partially outside. This commit moves everything into the top-level mod and adds missing entries as of linux 6.4.12.

Resolves #3342 and rust-vmm/seccompiler#57

I couldn't get main to run libc-test cargo test (even without my changes) with either gcc 13.2.1 or clang 16.0.6. They failed with different errors/warnings.

@rustbot
Copy link
Collaborator

rustbot commented Sep 7, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@boustrophedon
Copy link
Contributor Author

style check is failing but I get

$ rustc ci/style.rs && ./style src
good style!

It looks like it was some indentation issue. Either way, I fixed it.

@boustrophedon
Copy link
Contributor Author

The linux failures are coming from SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV which was added last year torvalds/linux@c2aa2df

Looks like it was available in about 5.19 or so, and the docker image this is running in is ubuntu-22.04 which is running 5.15 according to this page.

I'm not sure what to do here.

@boustrophedon
Copy link
Contributor Author

Hi, anyone have any suggestions for what to do here?

The issue is that the version of the Linux kernel in CI does not support some newer constants for the seccomp syscall, and so CI fails when checking whether the constants exist in the corresponding C headers.

However, the version in CI is also newer than the minimum supported version of the linux kernel so in theory this crate may already have constants that are not supported by the minimum version but do happen to be supported by the version in CI.

@JohnTitor
Copy link
Member

Could you try to do a rebase? We recently updated the Ubuntu image on CI to 23.10, which uses Linux v6.5.

@boustrophedon
Copy link
Contributor Author

@JohnTitor Thanks, it looks like everything is passing now!

@JohnTitor
Copy link
Member

Cool! One concern is that our musl toolchain is quite old and might fail, but let's see if that's the case.
If fails, you can ignore tests like:

libc/libc-test/build.rs

Lines 3503 to 3506 in 240de1f

// FIXME: requires >= 5.4.1 kernel headers
"pgn_t" if musl => true,
"priority_t" if musl => true,
"name_t" if musl => true,

@bors r+

@bors
Copy link
Contributor

bors commented Nov 3, 2023

📌 Commit 6621f07 has been approved by JohnTitor

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Nov 3, 2023

⌛ Testing commit 6621f07 with merge 13ffd24...

bors added a commit that referenced this pull request Nov 3, 2023
Move all seccomp consts and structs into top-level mod

Move all seccomp consts and structs into top-level mod

Seccomp constants and structs were partially defined in the top-level mod.rs for linux and partially outside. This commit moves everything into the top-level mod and adds missing entries as of linux 6.4.12.

Resolves #3342 and [rust-vmm/seccompiler#57](rust-vmm/seccompiler#57)

I couldn't get main to run libc-test cargo test (even without my changes) with either gcc 13.2.1 or clang 16.0.6. They failed with different errors/warnings.
@bors
Copy link
Contributor

bors commented Nov 3, 2023

💔 Test failed - checks-actions

@boustrophedon
Copy link
Contributor Author

Yeah, it looks like it's failing on musl with stuff like

cargo:warning=/checkout/target/aarch64-unknown-linux-musl/debug/build/libc-test-dd9ce03b4e008979/out/main.c: In function '__test_field_type_seccomp_notif_sizes_seccomp_data':

  cargo:warning=/checkout/target/aarch64-unknown-linux-musl/debug/build/libc-test-dd9ce03b4e008979/out/main.c:21349:30: error: invalid use of undefined type 'struct seccomp_notif_sizes'
  cargo:warning=/checkout/target/aarch64-unknown-linux-musl/debug/build/libc-test-dd9ce03b4e008979/out/main.c:21700:38: error: invalid use of undefined type 'struct seccomp_notif_addfd'

Could I help out with upgrading musl? If you think it's too much work I'm fine with just adding the exceptions for the failing types and constants.

@JohnTitor
Copy link
Member

Could I help out with upgrading musl? If you think it's too much work I'm fine with just adding the exceptions for the failing types and constants.

Sadly it's quite hard. We have to upgrade musl from v1.1.24 to v1.2 or higher, but it would break the compatibility. See #3068 for ongoing work. I'd recommend just skipping tests for now.

@boustrophedon
Copy link
Contributor Author

I'm not sure if I'm able to trigger a bors run to test the tier2 targets.

@JohnTitor
Copy link
Member

tier2 targets are only run on bors (otherwise it consumes a lot of GHA budget on the org), @bors r+

@bors
Copy link
Contributor

bors commented Nov 4, 2023

📌 Commit 9c92649 has been approved by JohnTitor

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Nov 4, 2023

💔 Test failed - checks-actions

@boustrophedon
Copy link
Contributor Author

boustrophedon commented Nov 4, 2023

So I'm trying to reproduce the failure locally and the first issue I ran into was

+ cargo test --no-default-features --manifest-path libc-test/Cargo.toml --target mips-unknown-linux-gnu
    Updating crates.io index
error: failed to write /checkout/Cargo.lock

Caused by:
  failed to open: /checkout/Cargo.lock  

Caused by:
  Read-only file system (os error 30)

but the docker run command is https://github.com/rust-lang/libc/blob/main/ci/run-docker.sh#L48
which contains

      --volume "$(rustc --print sysroot)":/rust:ro \
      --volume "$(pwd)":/checkout:ro \

so I changed them to rw and execution could continue. Now I'm getting

+ cargo test --no-default-features --manifest-path libc-test/Cargo.toml --target mips-unknown-linux-gnu
    Updating crates.io index
 Downloading crates ...
  Downloaded rustc_version v0.4.0
error: failed to download replaced source registry `crates-io`

Caused by:
  failed to create directory `/cargo/registry/cache/index.crates.io-6f17d22bba15001f`

Caused by:
  Permission denied (os error 13)

and I don't immediately see how to fix this. I'm not sure if the docker user is supposed to be root or something or if something else is wrong with the docker bindmounts.

@boustrophedon
Copy link
Contributor Author

boustrophedon commented Nov 4, 2023

Just for reference, the failure in CI looks like

PASSED 20 tests
     Running test/linux_strerror_r.rs (target/mips-unknown-linux-gnu/debug/deps/linux_strerror_r-cbe4f10440c1c52a)
RUNNING ALL TESTS
PASSED 1 tests
     Running test/linux_termios.rs (target/mips-unknown-linux-gnu/debug/deps/linux_termios-16515f471baa64e5)
RUNNING ALL TESTS
PASSED 50 tests
     Running test/main.rs (target/mips-unknown-linux-gnu/debug/deps/main-bf0b31ae08956b48)
RUNNING ALL TESTS
rust[4] = 0 != 4 (C): Rust "seccomp_notif_sizes" -> C
rust[5] = 0 != 5 (C): Rust "seccomp_notif_sizes" -> C
thread 'main' panicked at 'some tests failed', /checkout/target/mips-unknown-linux-gnu/debug/build/libc-test-b013fc4656104f6c/out/main.rs:12:21

Earlier in the docker run, it does say

#6 7.161 Get:111 http://archive.ubuntu.com/ubuntu mantic-updates/main amd64 linux-headers-6.5.0-10 all 6.5.0-10.10 [13.4 MB]

so it's not like there are old headers or anything. Here's the definition of seccomp_notif_sizes: https://github.com/torvalds/linux/blob/master/include/uapi/linux/seccomp.h#L69

@boustrophedon
Copy link
Contributor Author

boustrophedon commented Nov 6, 2023

Aha, I took another look at the docker command:

    docker run \
      --rm \
      --user "$(id -u)":"$(id -g)" \

this is probably expecting that the docker command is run by root so that $(id -u) and -g evaluate to 0. I don't really think this makes sense since ideally your local user and docker user have no relationship to each other.

So after I changed them to be 0 for root, I'm getting simply that it appears the mips target isn't installed.

error[E0463]: can't find crate for `core`
  |
  = note: the `mips-unknown-linux-gnu` target may not be installed
  = help: consider downloading the target with `rustup target add mips-unknown-linux-gnu`

so I'll do some more digging. Maybe I just need to delete the image and restart or something

(edit: deleted some stuff about the --rm flag.)

@JohnTitor
Copy link
Member

So, we have to build the target using -Zbuild-std now, as rust-lang/compiler-team#648 dropped the support. As it's now a tier 3 target, we could downgrade our CI support for MIPS instead. Let me do that, one sec.

@boustrophedon
Copy link
Contributor Author

@JohnTitor Does docker CI run locally for you? It might be an issue with my environment just not matching what the scripts want.

@Arnavion
Copy link
Contributor

Arnavion commented Nov 12, 2023

Does docker CI run locally for you?

Yes it works fine.

printf '[toolchain]\nchannel = "nightly"\n' >rust-toolchain.toml
rustup target add mips-unknown-linux-gnu
cargo generate-lockfile
./ci/run-docker.sh mips-unknown-linux-gnu

(Replace mips-unknown-linux-gnu with whatever target you want to test.)

+ cargo test --no-default-features --manifest-path libc-test/Cargo.toml --target mips-unknown-linux-gnu
    Updating crates.io index
error: failed to write /checkout/Cargo.lock

Caused by:
  failed to open: /checkout/Cargo.lock  

Caused by:
  Read-only file system (os error 30)

This is because you didn't run cargo generate-lockfile

I don't really think this makes sense since ideally your local user and docker user have no relationship to each other.

No, it expects the user running the script to be in the docker group, which is a standard thing to do.

So after I changed them to be 0 for root, I'm getting simply that it appears the mips target isn't installed.

This is because you didn't run rustup target add

@Arnavion
Copy link
Contributor

Anyway I rebased your branch on main and test all the targets except mips and android for you and they all pass. So if you rebase and ask JohnTitor to rerun CI it should be fine.

Seccomp constants and structs were partially defined in the top-level
mod.rs for linux and partially outside. This commit moves everything
into the top-level mod and adds missing entries as of linux 6.4.12.

Signed-off-by: Harry Stern <harry@harrystern.net>
@boustrophedon
Copy link
Contributor Author

I rebased, thanks for helping out with this! @JohnTitor could you re-try CI please?

It might be nice to add instructions in the ci/ directory on how to run everything. I also am not sure if the solution to the uid and bindmount ro/rw stuff is to just run the scripts as root locally, which seems not ideal, or if there's a better way besides modifying the scripts.

@Arnavion
Copy link
Contributor

I also am not sure if the solution to the uid and bindmount ro/rw stuff is to just run the scripts as root locally, which seems not ideal, or if there's a better way besides modifying the scripts.

As I said, add yourself to the docker group.

@boustrophedon
Copy link
Contributor Author

Sorry, I forgot to mention my user is in the docker group!

@boustrophedon
Copy link
Contributor Author

Hi again, sorry to bother, @JohnTitor could you re-run the CI tests when you have a chance? Thank you!

@JohnTitor
Copy link
Member

Sorry for the long delay! I missed this. @bors r+

@bors
Copy link
Contributor

bors commented Jan 4, 2024

📌 Commit 466516d has been approved by JohnTitor

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jan 4, 2024

⌛ Testing commit 466516d with merge d3238e0...

@bors
Copy link
Contributor

bors commented Jan 4, 2024

☀️ Test successful - checks-actions, checks-cirrus-freebsd-13, checks-cirrus-freebsd-14
Approved by: JohnTitor
Pushing d3238e0 to main...

@bors bors merged commit d3238e0 into rust-lang:main Jan 4, 2024
11 checks passed
@boustrophedon
Copy link
Contributor Author

Thank you!

gwilymk added a commit to agbrs/agb that referenced this pull request Jan 7, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [libc](https://togithub.com/rust-lang/libc) | dependencies | patch |
`0.2.151` -> `0.2.152` |

---

### Release Notes

<details>
<summary>rust-lang/libc (libc)</summary>

###
[`v0.2.152`](https://togithub.com/rust-lang/libc/releases/tag/0.2.152)

[Compare
Source](https://togithub.com/rust-lang/libc/compare/0.2.151...0.2.152)

##### What's Changed

- openbsd: syscall() has been removed in upcoming OpenBSD 7.5 by
[@&#8203;semarie](https://togithub.com/semarie) in
[rust-lang/libc#3479
- adding tcp_info to openbsd by
[@&#8203;devnexen](https://togithub.com/devnexen) in
[rust-lang/libc#3481
- iadding yser_fpxregs_struct data to linux/musl i686. by
[@&#8203;devnexen](https://togithub.com/devnexen) in
[rust-lang/libc#3477
- strftime\* api for \*BSD by
[@&#8203;devnexen](https://togithub.com/devnexen) in
[rust-lang/libc#3483
- strftime_l for Linux glibc/musl by
[@&#8203;devnexen](https://togithub.com/devnexen) in
[rust-lang/libc#3484
- adding iocb data for io_submit syscall for linux/glibc. by
[@&#8203;devnexen](https://togithub.com/devnexen) in
[rust-lang/libc#3486
- Re-enable `i686-pc-windows-gnu` CI by
[@&#8203;JohnTitor](https://togithub.com/JohnTitor) in
[rust-lang/libc#3489
- Stop testing on FreeBSD 12 by
[@&#8203;asomers](https://togithub.com/asomers) in
[rust-lang/libc#3475
- Add `ifreq`, `ifconf` and related constants to Android by
[@&#8203;arctic-alpaca](https://togithub.com/arctic-alpaca) in
[rust-lang/libc#3487
- Add waitid function for OpenBSD by
[@&#8203;lcheylus](https://togithub.com/lcheylus) in
[rust-lang/libc#3490
- adding SOMAXCONN to redox by
[@&#8203;devnexen](https://togithub.com/devnexen) in
[rust-lang/libc#3491
- Fix typos in comments by
[@&#8203;asomers](https://togithub.com/asomers) in
[rust-lang/libc#3492
- fix typos in libc by
[@&#8203;Takashiidobe](https://togithub.com/Takashiidobe) in
[rust-lang/libc#3496
- apple adding tcp_connection_info struct by
[@&#8203;devnexen](https://togithub.com/devnexen) in
[rust-lang/libc#3482
- Improve the version parser of Emscripten by
[@&#8203;kleisauke](https://togithub.com/kleisauke) in
[rust-lang/libc#3498
- Add constants from \<include/linux/sched.h> by
[@&#8203;GuillaumeGomez](https://togithub.com/GuillaumeGomez) in
[rust-lang/libc#3505
- Define `TFD_TIMER_*` constants on FreeBSD. by
[@&#8203;sunfishcode](https://togithub.com/sunfishcode) in
[rust-lang/libc#3506
- Add support for posix_spawn on OpenBSD by
[@&#8203;nuudlman](https://togithub.com/nuudlman) in
[rust-lang/libc#3502
- clock_nanosleep for dragonflybsd, moving constants freebsd only too.
by [@&#8203;devnexen](https://togithub.com/devnexen) in
[rust-lang/libc#3509
- solarish add fcntl's O_DIRECT constant. by
[@&#8203;devnexen](https://togithub.com/devnexen) in
[rust-lang/libc#3503
- Unpin cc dependency version by
[@&#8203;JohnTitor](https://togithub.com/JohnTitor) in
[rust-lang/libc#3511
- redox: add openpty, login_tty, TIOCSCTTY, and organize functions by
[@&#8203;jackpot51](https://togithub.com/jackpot51) in
[rust-lang/libc#3512
- Move all seccomp consts and structs into top-level mod by
[@&#8203;boustrophedon](https://togithub.com/boustrophedon) in
[rust-lang/libc#3343
- freebsd 15 support proposal. by
[@&#8203;devnexen](https://togithub.com/devnexen) in
[rust-lang/libc#3508
- Prepare workflow for merge queue by
[@&#8203;JohnTitor](https://togithub.com/JohnTitor) in
[rust-lang/libc#3514
- Allow dead_code on `clockid_t` by
[@&#8203;JohnTitor](https://togithub.com/JohnTitor) in
[rust-lang/libc#3516
- Add more items from `include/linux/sched.h` header by
[@&#8203;GuillaumeGomez](https://togithub.com/GuillaumeGomez) in
[rust-lang/libc#3515
- fix typo by [@&#8203;shuoer86](https://togithub.com/shuoer86) in
[rust-lang/libc#3517
- Add sigsuspend to more targets: bsd, haiku, and solarish by
[@&#8203;asomers](https://togithub.com/asomers) in
[rust-lang/libc#3518
- Tweak libc-0.2 CI by
[@&#8203;JohnTitor](https://togithub.com/JohnTitor) in
[rust-lang/libc#3519
- fuchsia adding pthread_set/getname_np by
[@&#8203;devnexen](https://togithub.com/devnexen) in
[rust-lang/libc#3520
- Prepare docs for libc v0.3 by
[@&#8203;JohnTitor](https://togithub.com/JohnTitor) in
[rust-lang/libc#3510
- Merge main into libc-0.2 by
[@&#8203;JohnTitor](https://togithub.com/JohnTitor) in
[rust-lang/libc#3521
- Prepare release for v0.2.152 by
[@&#8203;JohnTitor](https://togithub.com/JohnTitor) in
[rust-lang/libc#3522

##### New Contributors

- [@&#8203;Takashiidobe](https://togithub.com/Takashiidobe) made their
first contribution in
[rust-lang/libc#3496
- [@&#8203;nuudlman](https://togithub.com/nuudlman) made their first
contribution in
[rust-lang/libc#3502
- [@&#8203;boustrophedon](https://togithub.com/boustrophedon) made their
first contribution in
[rust-lang/libc#3343
- [@&#8203;shuoer86](https://togithub.com/shuoer86) made their first
contribution in
[rust-lang/libc#3517

**Full Changelog**:
rust-lang/libc@0.2.151...0.2.152

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log [here](https://developer.mend.io/github/agbrs/agb).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEyMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->
bors added a commit to rust-lang/cargo that referenced this pull request Feb 5, 2024
chore(deps): update compatible

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [anstream](https://togithub.com/rust-cli/anstyle) | workspace.dependencies | patch | `0.6.5` -> `0.6.11` |
| [anstyle](https://togithub.com/rust-cli/anstyle) | workspace.dependencies | patch | `1.0.4` -> `1.0.6` |
| [base64](https://togithub.com/marshallpierce/rust-base64) | workspace.dependencies | patch | `0.21.5` -> `0.21.7` |
| [clap](https://togithub.com/clap-rs/clap) | workspace.dependencies | patch | `4.4.12` -> `4.4.18` |
| [curl-sys](https://togithub.com/alexcrichton/curl-rust) | workspace.dependencies | patch | `0.4.70` -> `0.4.71+curl-8` |
| [handlebars](https://togithub.com/sunng87/handlebars-rust) | workspace.dependencies | minor | `5.0.0` -> `5.1.0` |
| [ignore](https://togithub.com/BurntSushi/ripgrep/tree/master/crates/ignore) ([source](https://togithub.com/BurntSushi/ripgrep/tree/HEAD/crates/ignore)) | workspace.dependencies | patch | `0.4.21` -> `0.4.22` |
| [itertools](https://togithub.com/rust-itertools/itertools) | workspace.dependencies | patch | `0.12.0` -> `0.12.1` |
| [libc](https://togithub.com/rust-lang/libc) | workspace.dependencies | patch | `0.2.151` -> `0.2.153` |
| [pkg-config](https://togithub.com/rust-lang/pkg-config-rs) | workspace.dependencies | patch | `0.3.28` -> `0.3.29` |
| [regex](https://togithub.com/rust-lang/regex) | workspace.dependencies | patch | `1.10.2` -> `1.10.3` |
| [semver](https://togithub.com/dtolnay/semver) | workspace.dependencies | patch | `1.0.20` -> `1.0.21` |
| [serde](https://serde.rs) ([source](https://togithub.com/serde-rs/serde)) | workspace.dependencies | patch | `1.0.194` -> `1.0.196` |
| [serde-untagged](https://togithub.com/dtolnay/serde-untagged) | workspace.dependencies | patch | `0.1.4` -> `0.1.5` |
| [serde_ignored](https://togithub.com/dtolnay/serde-ignored) | workspace.dependencies | patch | `0.1.9` -> `0.1.10` |
| [serde_json](https://togithub.com/serde-rs/json) | workspace.dependencies | patch | `1.0.110` -> `1.0.113` |
| [snapbox](https://togithub.com/assert-rs/trycmd/tree/main/crates/snapbox) ([source](https://togithub.com/assert-rs/trycmd)) | workspace.dependencies | patch | `0.4.15` -> `0.4.16` |
| [tracing](https://tokio.rs) ([source](https://togithub.com/tokio-rs/tracing)) | workspace.dependencies | patch | `0.1.37` -> `0.1.40` |

---

### Release Notes

<details>
<summary>rust-cli/anstyle (anstream)</summary>

### [`v0.6.11`](https://togithub.com/rust-cli/anstyle/compare/anstream-v0.6.10...anstream-v0.6.11)

[Compare Source](https://togithub.com/rust-cli/anstyle/compare/anstream-v0.6.10...anstream-v0.6.11)

### [`v0.6.10`](https://togithub.com/rust-cli/anstyle/compare/anstream-v0.6.9...anstream-v0.6.10)

[Compare Source](https://togithub.com/rust-cli/anstyle/compare/anstream-v0.6.9...anstream-v0.6.10)

### [`v0.6.9`](https://togithub.com/rust-cli/anstyle/compare/anstream-v0.6.8...anstream-v0.6.9)

[Compare Source](https://togithub.com/rust-cli/anstyle/compare/anstream-v0.6.8...anstream-v0.6.9)

### [`v0.6.8`](https://togithub.com/rust-cli/anstyle/compare/anstream-v0.6.7...anstream-v0.6.8)

[Compare Source](https://togithub.com/rust-cli/anstyle/compare/anstream-v0.6.7...anstream-v0.6.8)

### [`v0.6.7`](https://togithub.com/rust-cli/anstyle/compare/anstream-v0.6.6...anstream-v0.6.7)

[Compare Source](https://togithub.com/rust-cli/anstyle/compare/anstream-v0.6.6...anstream-v0.6.7)

### [`v0.6.6`](https://togithub.com/rust-cli/anstyle/compare/anstream-v0.6.5...anstream-v0.6.6)

[Compare Source](https://togithub.com/rust-cli/anstyle/compare/anstream-v0.6.5...anstream-v0.6.6)

</details>

<details>
<summary>marshallpierce/rust-base64 (base64)</summary>

### [`v0.21.7`](https://togithub.com/marshallpierce/rust-base64/blob/HEAD/RELEASE-NOTES.md#0217)

[Compare Source](https://togithub.com/marshallpierce/rust-base64/compare/v0.21.6...v0.21.7)

-   Support getting an alphabet's contents as a str via `Alphabet::as_str()`

### [`v0.21.6`](https://togithub.com/marshallpierce/rust-base64/blob/HEAD/RELEASE-NOTES.md#0216)

[Compare Source](https://togithub.com/marshallpierce/rust-base64/compare/v0.21.5...v0.21.6)

-   Improved introductory documentation and example

</details>

<details>
<summary>clap-rs/clap (clap)</summary>

### [`v4.4.18`](https://togithub.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#4418---2024-01-16)

[Compare Source](https://togithub.com/clap-rs/clap/compare/v4.4.17...v4.4.18)

##### Fixes

-   *(error)* When lacking `usage` feature, ensure the list of required arguments is unique

### [`v4.4.17`](https://togithub.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#4417---2024-01-15)

[Compare Source](https://togithub.com/clap-rs/clap/compare/v4.4.16...v4.4.17)

##### Fixes

-   Fix `panic!` when mixing `args_conflicts_with_subcommands` with `ArgGroup` (which is implicit with `derive`) introduced in 4.4.15

### [`v4.4.16`](https://togithub.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#4416---2024-01-12)

[Compare Source](https://togithub.com/clap-rs/clap/compare/v4.4.15...v4.4.16)

##### Fixes

-   Ensure invalid escape sequences in user-defined strings are correctly stripped when terminal doesn't support color

### [`v4.4.15`](https://togithub.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#4415---2024-01-11)

[Compare Source](https://togithub.com/clap-rs/clap/compare/v4.4.14...v4.4.15)

##### Fixes

-   Improve error for `args_conflicts_with_subcommands`
-   Ensure we error for `args_conflicts_with_subcommands` when using subcommand short and long flags

### [`v4.4.14`](https://togithub.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#4414---2024-01-08)

[Compare Source](https://togithub.com/clap-rs/clap/compare/v4.4.13...v4.4.14)

##### Documentation

-   Fix `find` cookbook entry to allow repeats of flags/options

##### Features

-   Allow `num_args(0)` on options which allows making them emulate being a flag for position-tracking flags

### [`v4.4.13`](https://togithub.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#4413---2024-01-04)

[Compare Source](https://togithub.com/clap-rs/clap/compare/v4.4.12...v4.4.13)

##### Documentation

-   Fix link to structopt migration guide

</details>

<details>
<summary>alexcrichton/curl-rust (curl-sys)</summary>

### [`v0.4.71+curl-8.6.0`](https://togithub.com/alexcrichton/curl-rust/compare/curl-sys-0.4.70...curl-sys-0.4.71)

[Compare Source](https://togithub.com/alexcrichton/curl-rust/compare/curl-sys-0.4.70...curl-sys-0.4.71)

</details>

<details>
<summary>sunng87/handlebars-rust (handlebars)</summary>

### [`v5.1.0`](https://togithub.com/sunng87/handlebars-rust/blob/HEAD/CHANGELOG.md#510---2024-01-17)

[Compare Source](https://togithub.com/sunng87/handlebars-rust/compare/v5.0.0...v5.1.0)

-   \[Added] Chained `else if` block support \[[#&#8203;629](https://togithub.com/sunng87/handlebars-rust/issues/629)]

</details>

<details>
<summary>BurntSushi/ripgrep (ignore)</summary>

### [`v0.4.22`](https://togithub.com/BurntSushi/ripgrep/compare/ignore-0.4.21...ignore-0.4.22)

[Compare Source](https://togithub.com/BurntSushi/ripgrep/compare/ignore-0.4.21...ignore-0.4.22)

</details>

<details>
<summary>rust-itertools/itertools (itertools)</summary>

### [`v0.12.1`](https://togithub.com/rust-itertools/itertools/blob/HEAD/CHANGELOG.md#0121)

[Compare Source](https://togithub.com/rust-itertools/itertools/compare/v0.12.0...v0.12.1)

##### Added

-   Documented iteration order guarantee for `Itertools::[tuple_]combinations` ([#&#8203;822](https://togithub.com/rust-itertools/itertools/issues/822))
-   Documented possible panic in `iterate` ([#&#8203;842](https://togithub.com/rust-itertools/itertools/issues/842))
-   Implemented `Clone` and `Debug` for `Diff` ([#&#8203;845](https://togithub.com/rust-itertools/itertools/issues/845))
-   Implemented `Debug` for `WithPosition` ([#&#8203;859](https://togithub.com/rust-itertools/itertools/issues/859))
-   Implemented `Eq` for `MinMaxResult` ([#&#8203;838](https://togithub.com/rust-itertools/itertools/issues/838))
-   Implemented `From<EitherOrBoth<A, B>>` for `Option<Either<A, B>>` ([#&#8203;843](https://togithub.com/rust-itertools/itertools/issues/843))
-   Implemented `PeekingNext` for `RepeatN` ([#&#8203;855](https://togithub.com/rust-itertools/itertools/issues/855))

##### Changed

-   Made `CoalesceBy` lazy ([#&#8203;801](https://togithub.com/rust-itertools/itertools/issues/801))
-   Optimized `Filter[Map]Ok::next`, `Itertools::partition`, `Unique[By]::next[_back]` ([#&#8203;818](https://togithub.com/rust-itertools/itertools/issues/818))
-   Optimized `Itertools::find_position` ([#&#8203;837](https://togithub.com/rust-itertools/itertools/issues/837))
-   Optimized `Positions::next[_back]` ([#&#8203;816](https://togithub.com/rust-itertools/itertools/issues/816))
-   Optimized `ZipLongest::fold` ([#&#8203;854](https://togithub.com/rust-itertools/itertools/issues/854))
-   Relaxed `Debug` bounds for `GroupingMapBy` ([#&#8203;860](https://togithub.com/rust-itertools/itertools/issues/860))
-   Specialized `ExactlyOneError::fold` ([#&#8203;826](https://togithub.com/rust-itertools/itertools/issues/826))
-   Specialized `Interleave[Shortest]::fold` ([#&#8203;849](https://togithub.com/rust-itertools/itertools/issues/849))
-   Specialized `MultiPeek::fold` ([#&#8203;820](https://togithub.com/rust-itertools/itertools/issues/820))
-   Specialized `PadUsing::[r]fold` ([#&#8203;825](https://togithub.com/rust-itertools/itertools/issues/825))
-   Specialized `PeekNth::fold` ([#&#8203;824](https://togithub.com/rust-itertools/itertools/issues/824))
-   Specialized `Positions::[r]fold` ([#&#8203;813](https://togithub.com/rust-itertools/itertools/issues/813))
-   Specialized `PutBackN::fold` ([#&#8203;823](https://togithub.com/rust-itertools/itertools/issues/823))
-   Specialized `RepeatN::[r]fold` ([#&#8203;821](https://togithub.com/rust-itertools/itertools/issues/821))
-   Specialized `TakeWhileInclusive::fold` ([#&#8203;851](https://togithub.com/rust-itertools/itertools/issues/851))
-   Specialized `ZipLongest::rfold` ([#&#8203;848](https://togithub.com/rust-itertools/itertools/issues/848))

##### Notable Internal Changes

-   Added test coverage in CI ([#&#8203;847](https://togithub.com/rust-itertools/itertools/issues/847), [#&#8203;856](https://togithub.com/rust-itertools/itertools/issues/856))
-   Added semver check in CI ([#&#8203;784](https://togithub.com/rust-itertools/itertools/issues/784))
-   Enforced `clippy` in CI ([#&#8203;740](https://togithub.com/rust-itertools/itertools/issues/740))
-   Enforced `rustdoc` in CI ([#&#8203;840](https://togithub.com/rust-itertools/itertools/issues/840))
-   Improved specialization tests ([#&#8203;807](https://togithub.com/rust-itertools/itertools/issues/807))
-   More specialization benchmarks ([#&#8203;806](https://togithub.com/rust-itertools/itertools/issues/806))

</details>

<details>
<summary>rust-lang/libc (libc)</summary>

### [`v0.2.153`](https://togithub.com/rust-lang/libc/releases/tag/0.2.153)

[Compare Source](https://togithub.com/rust-lang/libc/compare/0.2.152...0.2.153)

#### What's Changed

-   Add SOMAXCONN to vita on 0.2 (to fix std) by [`@&#8203;pheki](https://togithub.com/pheki)` in [rust-lang/libc#3552
-   Fix CI for v0.2 by [`@&#8203;JohnTitor](https://togithub.com/JohnTitor)` in [rust-lang/libc#3557
-   \[Backport [#&#8203;3548](https://togithub.com/rust-lang/libc/issues/3548)] Add ioctl FS_IOC\_{G,S}{ETVERSION,ETFLAGS} for LoongArch64 by [`@&#8203;heiher](https://togithub.com/heiher)` in [rust-lang/libc#3570
-   Add MFD_NOEXEC_SEAL and MFD_EXEC by [`@&#8203;rusty-snake](https://togithub.com/rusty-snake)` in [rust-lang/libc#3553
-   Backport of [#&#8203;3546](https://togithub.com/rust-lang/libc/issues/3546) and update crate version to 0.2.153 by [`@&#8203;GuillaumeGomez](https://togithub.com/GuillaumeGomez)` in [rust-lang/libc#3554

#### New Contributors

-   [`@&#8203;rusty-snake](https://togithub.com/rusty-snake)` made their first contribution in [rust-lang/libc#3553

**Full Changelog**: rust-lang/libc@0.2.152...0.2.153

### [`v0.2.152`](https://togithub.com/rust-lang/libc/releases/tag/0.2.152)

[Compare Source](https://togithub.com/rust-lang/libc/compare/0.2.151...0.2.152)

#### What's Changed

-   openbsd: syscall() has been removed in upcoming OpenBSD 7.5 by [`@&#8203;semarie](https://togithub.com/semarie)` in [rust-lang/libc#3479
-   adding tcp_info to openbsd by [`@&#8203;devnexen](https://togithub.com/devnexen)` in [rust-lang/libc#3481
-   iadding yser_fpxregs_struct data to linux/musl i686. by [`@&#8203;devnexen](https://togithub.com/devnexen)` in [rust-lang/libc#3477
-   strftime\* api for \*BSD by [`@&#8203;devnexen](https://togithub.com/devnexen)` in [rust-lang/libc#3483
-   strftime_l for Linux glibc/musl by [`@&#8203;devnexen](https://togithub.com/devnexen)` in [rust-lang/libc#3484
-   adding iocb data for io_submit syscall for linux/glibc. by [`@&#8203;devnexen](https://togithub.com/devnexen)` in [rust-lang/libc#3486
-   Re-enable `i686-pc-windows-gnu` CI by [`@&#8203;JohnTitor](https://togithub.com/JohnTitor)` in [rust-lang/libc#3489
-   Stop testing on FreeBSD 12 by [`@&#8203;asomers](https://togithub.com/asomers)` in [rust-lang/libc#3475
-   Add `ifreq`, `ifconf` and related constants to Android by [`@&#8203;arctic-alpaca](https://togithub.com/arctic-alpaca)` in [rust-lang/libc#3487
-   Add waitid function for OpenBSD by [`@&#8203;lcheylus](https://togithub.com/lcheylus)` in [rust-lang/libc#3490
-   adding SOMAXCONN to redox by [`@&#8203;devnexen](https://togithub.com/devnexen)` in [rust-lang/libc#3491
-   Fix typos in comments by [`@&#8203;asomers](https://togithub.com/asomers)` in [rust-lang/libc#3492
-   fix typos in libc by [`@&#8203;Takashiidobe](https://togithub.com/Takashiidobe)` in [rust-lang/libc#3496
-   apple adding tcp_connection_info struct by [`@&#8203;devnexen](https://togithub.com/devnexen)` in [rust-lang/libc#3482
-   Improve the version parser of Emscripten by [`@&#8203;kleisauke](https://togithub.com/kleisauke)` in [rust-lang/libc#3498
-   Add constants from \<include/linux/sched.h> by [`@&#8203;GuillaumeGomez](https://togithub.com/GuillaumeGomez)` in [rust-lang/libc#3505
-   Define `TFD_TIMER_*` constants on FreeBSD. by [`@&#8203;sunfishcode](https://togithub.com/sunfishcode)` in [rust-lang/libc#3506
-   Add support for posix_spawn on OpenBSD by [`@&#8203;nuudlman](https://togithub.com/nuudlman)` in [rust-lang/libc#3502
-   clock_nanosleep for dragonflybsd, moving constants freebsd only too. by [`@&#8203;devnexen](https://togithub.com/devnexen)` in [rust-lang/libc#3509
-   solarish add fcntl's O_DIRECT constant. by [`@&#8203;devnexen](https://togithub.com/devnexen)` in [rust-lang/libc#3503
-   Unpin cc dependency version by [`@&#8203;JohnTitor](https://togithub.com/JohnTitor)` in [rust-lang/libc#3511
-   redox: add openpty, login_tty, TIOCSCTTY, and organize functions by [`@&#8203;jackpot51](https://togithub.com/jackpot51)` in [rust-lang/libc#3512
-   Move all seccomp consts and structs into top-level mod by [`@&#8203;boustrophedon](https://togithub.com/boustrophedon)` in [rust-lang/libc#3343
-   freebsd 15 support proposal. by [`@&#8203;devnexen](https://togithub.com/devnexen)` in [rust-lang/libc#3508
-   Prepare workflow for merge queue by [`@&#8203;JohnTitor](https://togithub.com/JohnTitor)` in [rust-lang/libc#3514
-   Allow dead_code on `clockid_t` by [`@&#8203;JohnTitor](https://togithub.com/JohnTitor)` in [rust-lang/libc#3516
-   Add more items from `include/linux/sched.h` header by [`@&#8203;GuillaumeGomez](https://togithub.com/GuillaumeGomez)` in [rust-lang/libc#3515
-   fix typo by [`@&#8203;shuoer86](https://togithub.com/shuoer86)` in [rust-lang/libc#3517
-   Add sigsuspend to more targets: bsd, haiku, and solarish by [`@&#8203;asomers](https://togithub.com/asomers)` in [rust-lang/libc#3518
-   Tweak libc-0.2 CI by [`@&#8203;JohnTitor](https://togithub.com/JohnTitor)` in [rust-lang/libc#3519
-   fuchsia adding pthread_set/getname_np by [`@&#8203;devnexen](https://togithub.com/devnexen)` in [rust-lang/libc#3520
-   Prepare docs for libc v0.3 by [`@&#8203;JohnTitor](https://togithub.com/JohnTitor)` in [rust-lang/libc#3510
-   Merge main into libc-0.2 by [`@&#8203;JohnTitor](https://togithub.com/JohnTitor)` in [rust-lang/libc#3521
-   Prepare release for v0.2.152 by [`@&#8203;JohnTitor](https://togithub.com/JohnTitor)` in [rust-lang/libc#3522

#### New Contributors

-   [`@&#8203;Takashiidobe](https://togithub.com/Takashiidobe)` made their first contribution in [rust-lang/libc#3496
-   [`@&#8203;nuudlman](https://togithub.com/nuudlman)` made their first contribution in [rust-lang/libc#3502
-   [`@&#8203;boustrophedon](https://togithub.com/boustrophedon)` made their first contribution in [rust-lang/libc#3343
-   [`@&#8203;shuoer86](https://togithub.com/shuoer86)` made their first contribution in [rust-lang/libc#3517

**Full Changelog**: rust-lang/libc@0.2.151...0.2.152

</details>

<details>
<summary>rust-lang/pkg-config-rs (pkg-config)</summary>

### [`v0.3.29`](https://togithub.com/rust-lang/pkg-config-rs/blob/HEAD/CHANGELOG.md#0329---2024-01-17)

[Compare Source](https://togithub.com/rust-lang/pkg-config-rs/compare/0.3.28...0.3.29)

##### Fixed

-   Detection and usage of Windows static libraries ([#&#8203;154](https://togithub.com/rust-lang/pkg-config-rs/issues/154)).

-   Passing `-Wl,-u` to the linker if specified in the pkg-config file ([#&#8203;154](https://togithub.com/rust-lang/pkg-config-rs/issues/154)).

</details>

<details>
<summary>rust-lang/regex (regex)</summary>

### [`v1.10.3`](https://togithub.com/rust-lang/regex/blob/HEAD/CHANGELOG.md#1103-2024-01-21)

[Compare Source](https://togithub.com/rust-lang/regex/compare/1.10.2...1.10.3)

\===================
This is a new patch release that fixes the feature configuration of optional
dependencies, and fixes an unsound use of bounds check elision.

Bug fixes:

-   [BUG #&#8203;1147](https://togithub.com/rust-lang/regex/issues/1147):
    Set `default-features=false` for the `memchr` and `aho-corasick` dependencies.
-   [BUG #&#8203;1154](https://togithub.com/rust-lang/regex/pull/1154):
    Fix unsound bounds check elision.

</details>

<details>
<summary>dtolnay/semver (semver)</summary>

### [`v1.0.21`](https://togithub.com/dtolnay/semver/releases/tag/1.0.21)

[Compare Source](https://togithub.com/dtolnay/semver/compare/1.0.20...1.0.21)

-   Update proc-macro2 to fix caching issue when using a rustc-wrapper such as sccache

</details>

<details>
<summary>serde-rs/serde (serde)</summary>

### [`v1.0.196`](https://togithub.com/serde-rs/serde/releases/tag/v1.0.196)

[Compare Source](https://togithub.com/serde-rs/serde/compare/v1.0.195...v1.0.196)

-   Improve formatting of "invalid type" error messages involving floats ([#&#8203;2682](https://togithub.com/serde-rs/serde/issues/2682))

### [`v1.0.195`](https://togithub.com/serde-rs/serde/releases/tag/v1.0.195)

[Compare Source](https://togithub.com/serde-rs/serde/compare/v1.0.194...v1.0.195)

-   Prevent remote definitions of tuple struct or tuple variant from triggering dead_code warning ([#&#8203;2671](https://togithub.com/serde-rs/serde/issues/2671))

</details>

<details>
<summary>dtolnay/serde-untagged (serde-untagged)</summary>

### [`v0.1.5`](https://togithub.com/dtolnay/serde-untagged/releases/tag/0.1.5)

[Compare Source](https://togithub.com/dtolnay/serde-untagged/compare/0.1.4...0.1.5)

-   Update proc-macro2 to fix caching issue when using a rustc-wrapper such as sccache

</details>

<details>
<summary>dtolnay/serde-ignored (serde_ignored)</summary>

### [`v0.1.10`](https://togithub.com/dtolnay/serde-ignored/releases/tag/0.1.10)

[Compare Source](https://togithub.com/dtolnay/serde-ignored/compare/0.1.9...0.1.10)

-   Update proc-macro2 to fix caching issue when using a rustc-wrapper such as sccache

</details>

<details>
<summary>serde-rs/json (serde_json)</summary>

### [`v1.0.113`](https://togithub.com/serde-rs/json/releases/tag/v1.0.113)

[Compare Source](https://togithub.com/serde-rs/json/compare/v1.0.112...v1.0.113)

-   Add `swap_remove` and `shift_remove` methods on Map ([#&#8203;1109](https://togithub.com/serde-rs/json/issues/1109))

### [`v1.0.112`](https://togithub.com/serde-rs/json/releases/tag/v1.0.112)

[Compare Source](https://togithub.com/serde-rs/json/compare/v1.0.111...v1.0.112)

-   Improve formatting of "invalid type" error messages involving floats ([#&#8203;1107](https://togithub.com/serde-rs/json/issues/1107))

### [`v1.0.111`](https://togithub.com/serde-rs/json/releases/tag/v1.0.111)

[Compare Source](https://togithub.com/serde-rs/json/compare/v1.0.110...v1.0.111)

-   Improve floating point parsing performance on loongarch64 ([#&#8203;1100](https://togithub.com/serde-rs/json/issues/1100), thanks [`@&#8203;heiher](https://togithub.com/heiher))`

</details>

<details>
<summary>assert-rs/trycmd (snapbox)</summary>

### [`v0.4.16`](https://togithub.com/assert-rs/trycmd/compare/snapbox-v0.4.15...snapbox-v0.4.16)

[Compare Source](https://togithub.com/assert-rs/trycmd/compare/snapbox-v0.4.15...snapbox-v0.4.16)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 5am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/rust-lang/cargo).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNTMuMiIsInVwZGF0ZWRJblZlciI6IjM3LjE3My4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->
boustrophedon added a commit to boustrophedon/seccompiler that referenced this pull request Mar 4, 2024
Now that rust-lang/libc/pull/3343 is merged and released, switch to
using libc's constants.

SECCOMP_RET_MASK does not exist anymore and appears to have not existed
for a while. SECCOMP_RET_DATA is exactly the same mask value, and the
usage here is in line with the man page.

Fixes rust-vmm#60
boustrophedon added a commit to boustrophedon/seccompiler that referenced this pull request Mar 4, 2024
Use libc constants now that rust-lang/libc/pull/3343 is merged and
released.

SECCOMP_RET_MASK does not exist anymore and appears to have not existed
for a while. SECCOMP_RET_DATA is exactly the same mask value, and the
usage here is in line with the man page.

Completes rust-vmm#60

Signed-off-by: Harry Stern <harry@harrystern.net>
boustrophedon added a commit to boustrophedon/seccompiler that referenced this pull request Mar 5, 2024
Use libc constants now that rust-lang/libc/pull/3343 is merged and
released.

SECCOMP_RET_MASK does not exist anymore and appears to have not existed
for a while. SECCOMP_RET_DATA is exactly the same mask value, and the
usage here is in line with the man page.

Completes rust-vmm#60

Signed-off-by: Harry Stern <harry@harrystern.net>
alindima pushed a commit to rust-vmm/seccompiler that referenced this pull request Mar 18, 2024
Use libc constants now that rust-lang/libc/pull/3343 is merged and
released.

SECCOMP_RET_MASK does not exist anymore and appears to have not existed
for a while. SECCOMP_RET_DATA is exactly the same mask value, and the
usage here is in line with the man page.

Completes #60

Signed-off-by: Harry Stern <harry@harrystern.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix seccomp constants on musl/all linux platforms
5 participants