Skip to content

linux_like(android,linux): remove af_alg_iv unsound implementations in extra_traits feature - #5443

Merged
tgross35 merged 1 commit into
rust-lang:libc-0.2from
dybucc:libc-0.2
Sep 1, 2026
Merged

linux_like(android,linux): remove af_alg_iv unsound implementations in extra_traits feature#5443
tgross35 merged 1 commit into
rust-lang:libc-0.2from
dybucc:libc-0.2

Conversation

@dybucc

@dybucc dybucc commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Description

Closes #1501. See that issue for details on the
unsoundness report. That was fixed a while ago on main but the patch
would have broken stable, so a deprecation warning was applied instead.
Follows a brief discussion at
#1501 (comment).

Note the automatically-derived implementations for Debug and Clone
for this type seem odd now. The last member is a FAM upstream, so I
think Debug can just live with that, but Clone wouldn't feel right
to provide without some word of warning to users about the "extended"
length beyond the trailing struct member not being copied over to
the new instance of the type. I guess downstream users can then use a
newtype to implement Clone as they see fit; The fields on af_alg_iv
are public, after all.

Checklist

  • Relevant tests in libc-test/semver have been updated
  • Commit messages permalink to headers for added or changed API
  • Placeholder or unstable values like *LAST or *MAX have the
    standard doc comment
  • Tested locally (cargo test -p libc-test --target mytarget);
    especially relevant for platforms that may not be checked in CI

@rustbot label +stable-nominated

@rustbot

rustbot commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in an Android module

cc @maurer

@rustbot rustbot added O-android O-linux O-linux-like O-unix S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Aug 28, 2026
@rustbot

rustbot commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

⚠️ Warning ⚠️

  • Pull requests are usually filed against the main branch for this repo, but this one is against libc-0.2. Please double check that you specified the right target!

@tgross35 tgross35 removed the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Aug 31, 2026

@tgross35 tgross35 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! Will merge as part of the next release's backports

View changes since this review

@tgross35

Copy link
Copy Markdown
Member

No need to update this but for future reference, if you mention a commit sha in a commit message it's good to include a abcd12345678 ("Title of the commit") to hint what it's about, and to help the message survive any unlikely but possible force pushes. (Mentioned at https://docs.kernel.org/process/submitting-patches.html#describe-your-changes, I usually do the 12 characters.)

Remove `extra_traits` implementations for `af_alg_iv` in stable to solve
the soundness issue reported at rust-lang#1501. This was already
deprecated on `main` in rust-lang#1703, and removed in
rust-lang/libc@0c9b044.

This patch ports those changes to the next stable release as it's been
quite some time since then.
@rustbot

rustbot commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different libc-0.2 commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@tgross35
tgross35 enabled auto-merge August 31, 2026 21:47
@tgross35
tgross35 added this pull request to the merge queue Aug 31, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 31, 2026
@tgross35
tgross35 added this pull request to the merge queue Sep 1, 2026
Merged via the queue into rust-lang:libc-0.2 with commit 444db44 Sep 1, 2026
55 checks passed
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.

3 participants