Skip to content

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

Merged
sunfishcode merged 1 commit into0.35from
0.35-updates
Oct 25, 2023
Merged

Fix p{read,write}v{,v2}'s encoding of the offset argument on Linux. (…#899
sunfishcode merged 1 commit into0.35from
0.35-updates

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.35-updates branch 3 times, most recently from 7997819 to 5084246 Compare October 25, 2023 16:09
…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 f1b336e into 0.35 Oct 25, 2023
@sunfishcode sunfishcode deleted the 0.35-updates branch October 25, 2023 17:23
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