diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-03-31 13:53:34 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-04-01 16:10:28 -0300 |
commit | cdc31409bd4f878577059e70dbd52a28643ec609 (patch) | |
tree | ff2fe4173a71f4cbcbff72680002bf40ea916b02 /NEWS | |
parent | a4dceb2684dfe63748e1f18ac2d6acd39e2f27c3 (diff) | |
download | glibc-cdc31409bd4f878577059e70dbd52a28643ec609.tar.gz |
linux: Normalize and return timeout on select (BZ #27651)azanella/bz27651-select
The commit 2433d39b697, which added time64 support to select, changed
the function to use __NR_pselect6 (or __NR_pelect6_time64) on all
architectures. However, on architectures where the symbol was
implemented with __NR_select the kernel normalizes the passed timeout
instead of return EINVAL. For instance, the input timeval
{ 0, 5000000 } is interpreted as { 5, 0 }.
And as indicated by BZ #27651, this semantic seems to be expected
and changing it results in some performance issues (most likely
the program does not check the return code and keeps issuing
select with unormalized tv_usec argument).
To avoid a different semantic depending whether which syscall the
architecture used to issue, select now always normalize the timeout
input. This is a slight change for some ABIs (for instance aarch64).
Checked on x86_64-linux-gnu and i686-linux-gnu.
Diffstat (limited to 'NEWS')
0 files changed, 0 insertions, 0 deletions