Skip to content

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

Merged
sunfishcode merged 1 commit into0.37from
0.37-updates
Oct 25, 2023
Merged

Fix p{read,write}v{,v2}'s encoding of the offset argument on Linux. (…#897
sunfishcode merged 1 commit into0.37from
0.37-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.37-updates branch 3 times, most recently from 2bf58c9 to 751e06e 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 a2d9c8e into 0.37 Oct 25, 2023
@sunfishcode sunfishcode deleted the 0.37-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