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

IoControlBlock definition incorrect on big endian architectures. #196

Open
plugwash opened this issue May 6, 2023 · 0 comments
Open

IoControlBlock definition incorrect on big endian architectures. #196

plugwash opened this issue May 6, 2023 · 0 comments

Comments

@plugwash
Copy link

plugwash commented May 6, 2023

While working on the 32-bit tests, I compared the definitions of some data structures with the C originals and noticed that pub struct IoControlBlock had not been correctly translated from the original C code. The original C code contains a macro which re-orders the fields on big endian architectures. I presume that the field in question was originally a 64-bit integer and was later changed to two 32-bit integers.

Nothing in vmm-sys-util itself seems to touch the fields in question. I haven't looked in downstream crates.

patch (mostly untested, doesn't break compilation but there don't seem to be any tests that touch the fields in question) at https://salsa.debian.org/rust-team/debcargo-conf/-/blob/1d296fda82959651ff7358066dcb4425941a2060/src/vmm-sys-util/debian/patches/fix-big-endian.patch

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

No branches or pull requests

1 participant