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. #896

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

sunfishcode
Copy link
Member

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 sunfishcode/preadv2-offsets branch 2 times, most recently from d1fac5e to f749983 Compare October 25, 2023 14:15
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 1ab21e6 into main Oct 25, 2023
43 checks passed
@sunfishcode sunfishcode deleted the sunfishcode/preadv2-offsets branch October 25, 2023 15:31
sunfishcode added a commit that referenced this pull request Oct 25, 2023
…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 added a commit that referenced this pull request Oct 25, 2023
…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 added a commit that referenced this pull request Oct 25, 2023
…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 added a commit that referenced this pull request Oct 25, 2023
…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 added a commit that referenced this pull request Oct 25, 2023
…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 added a commit that referenced this pull request Oct 25, 2023
…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 added a commit that referenced this pull request Oct 25, 2023
…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 added a commit that referenced this pull request Oct 25, 2023
…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 added a commit that referenced this pull request Oct 25, 2023
…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 added a commit that referenced this pull request Oct 25, 2023
…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 added a commit that referenced this pull request Oct 25, 2023
…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 added a commit that referenced this pull request Oct 25, 2023
…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 added a commit that referenced this pull request Oct 25, 2023
…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 added a commit that referenced this pull request Oct 25, 2023
…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 added a commit that referenced this pull request Oct 25, 2023
…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 added a commit that referenced this pull request Oct 25, 2023
…896) (#897)

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 added a commit that referenced this pull request Oct 25, 2023
…896) (#898)

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 added a commit that referenced this pull request Oct 25, 2023
…896) (#899)

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
Copy link
Member Author

This is now released in rustix 0.38.21.

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