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

Fix p{read,write}v{,v2}'s encoding of the offset argument on Linux. (… #898

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

sunfishcode
Copy link
Member

#896)

Unlike with p{read,write}, Linux's p{read,write}v syscall's offset argument is not passed in an endian-specific order. And, the expectation is for syscall wrappers to always pass both the high and low halves of the offset as separate arguments, even though on 64-bit architectures the low half is passed throgh as a 64-bit value containing the full offset and the kernel doesn't mask it.

And p{read,write}v2 follow the behavior of p{read,write}.

@sunfishcode sunfishcode force-pushed the 0.36-updates branch 3 times, most recently from c3478c4 to 1fc3822 Compare October 25, 2023 16:08
…896)

Unlike with `p{read,write}`, Linux's `p{read,write}v` syscall's offset
argument is not passed in an endian-specific order. And, the expectation is
for syscall wrappers to always pass both the high and low halves of the
offset as separate arguments, even though on 64-bit architectures the low
half is passed throgh as a 64-bit value containing the full offset and the
kernel doesn't mask it.

And `p{read,write}v2` follow the behavior of `p{read,write}`.
@sunfishcode sunfishcode merged commit 1c6013a into 0.36 Oct 25, 2023
37 checks passed
@sunfishcode sunfishcode deleted the 0.36-updates branch October 25, 2023 17:24
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.

1 participant