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

Backport #298 to kvm-ioctls 0.19 and prepare 0.19.1 release #300

Merged

Conversation

ShadowCurse
Copy link
Collaborator

Summary of the PR

Backport #298 from main and prepare new 0.19.1 release.

Requirements

Before submitting your PR, please make sure you addressed the following
requirements:

  • All commits in this PR have Signed-Off-By trailers (with
    git commit -s), and the commit message has max 60 characters for the
    summary and max 75 characters for each description line.
  • All added/changed functionality has a corresponding unit/integration
    test.
  • All added/changed public-facing functionality has entries in the "Upcoming
    Release" section of CHANGELOG.md (if no such section exists, please create one).
  • Any newly added unsafe code is properly documented.

Use `ioctl_with_mut_ref` instead of `ioctl_with_ref`
in the `create_device` method as it needs to write to the
`kvm_create_device` struct passed to it. This incorrect
usage of `ioctl_with_ref` causes newer versions of Rust compiler
(1.82 and above) to treat the `kvm_create_device` struct as read-only
and bypass following reads from it. This optimization lead to incorrect
value being passed to the `File::from_raw_fd` call.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
Copy link
Collaborator

@roypat roypat left a comment

Choose a reason for hiding this comment

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

(CI won't pass, as the custom pipeline came in with the monorepo. It only contains kvm-bindings specific tests, so that's fine)

@roypat roypat changed the title Backport #298 to 0.19 Backport #298 to 0.19 and prepare 0.19.1 release Dec 10, 2024
@roypat roypat changed the title Backport #298 to 0.19 and prepare 0.19.1 release Backport #298 to kvm-ioclts 0.19 and prepare 0.19.1 release Dec 10, 2024
@roypat roypat changed the title Backport #298 to kvm-ioclts 0.19 and prepare 0.19.1 release Backport #298 to kvm-ioctls 0.19 and prepare 0.19.1 release Dec 10, 2024
Copy link
Member

@stefano-garzarella stefano-garzarella left a comment

Choose a reason for hiding this comment

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

I'd suggest including the hash of the main commit while backporting (e.g. git cherry-pick -x...), but I'd not block this PR since it's really a single commit. Up to you ;-)

@ShadowCurse ShadowCurse merged commit 3556da9 into rust-vmm:kvm-ioctls-v0.19.1 Dec 10, 2024
22 of 24 checks passed
@ShadowCurse ShadowCurse deleted the kvm-ioctls-v0.19.1-local branch December 10, 2024 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants