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

Add svm_flags field to sockaddr_vm #2449

Closed
wants to merge 1 commit into from

Conversation

rtzoeller
Copy link
Contributor

@rtzoeller rtzoeller commented Oct 15, 2021

Testing libc on Fedora 34 emits the following error:

bad field offset svm_zero of sockaddr_vm: rust: 12 (0xc) != c 13 (0xd)
bad field size svm_zero of sockaddr_vm: rust: 4 (0x4) != c 3 (0x3)
bad field type svm_zero of sockaddr_vm: rust: 0x7ffe56b1165c != c 0x7ffe56b1165d

Kernel version:

$ uname -r
5.14.9-200.fc34.x86_64

torvalds/linux@dc8eeef
introduced the svm_flags field, to which VMADDR_FLAG_TO_HOST can be applied.
@rust-highfive
Copy link

r? @JohnTitor

(rust-highfive has picked a reviewer for you, use r? to override)

@rtzoeller
Copy link
Contributor Author

I'm guessing the Linux kernel on the CI instances is older than the change this corresponds to, otherwise it would have been detected previously. I'm not sure this can be submitted quite yet as a result.

@JohnTitor
Copy link
Member

This would be a breaking change, should follow this: https://github.com/rust-lang/libc/blob/master/CONTRIBUTING.md#breaking-change-policy

@rtzoeller
Copy link
Contributor Author

This would be a breaking change, should follow this: https://github.com/rust-lang/libc/blob/master/CONTRIBUTING.md#breaking-change-policy

Can you provide an example of what you're expecting for this type of change?

The example in that document makes sense for me if libc were to remove an item, but it's less clear what the expectation is for an in-place breaking change.

@JohnTitor
Copy link
Member

Adding a new public feild to a struct is a breaking change and we should tell users that we're going to do it, otherwise user code would be broken suddenly.

@james-callahan
Copy link

Has there been any followup to this?
Without the svm_flags field you can no longer use e.g. nitro enclaves on AWS.

See also rust-vsock/vsock-rs#29

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.

4 participants