glibc/sunrpc
Adhemerval Zanella 9d7c5cc38e linux: Normalize and return timeout on select (BZ #27651)
The commit 2433d39b69, 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.
2021-04-12 18:38:37 -03:00
..
rpc Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
auth_des.c
auth_none.c
auth_unix.c
authdes_prot.c
authuxprot.c
clnt_gen.c
clnt_perr.c
clnt_raw.c
clnt_simp.c
clnt_tcp.c
clnt_udp.c
clnt_unix.c
create_xid.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
des_crypt.c
des_impl.c
des_soft.c
get_myaddr.c
getrpcport.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
key_call.c
key_prot.c
Makefile sunrpc: tst-svc_register can be a regular test 2021-03-09 21:07:24 +01:00
netname.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
openchild.c
pm_getmaps.c
pm_getport.c
pmap_clnt.c
pmap_prot2.c
pmap_prot.c
pmap_rmt.c
publickey.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
rpc_cmsg.c
rpc_common.c
rpc_dtable.c
rpc_gethostbyname.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
rpc_prot.c
rpc_thread.c
rtime.c
svc_auth.c
svc_authux.c
svc_raw.c
svc_run.c
svc_simple.c
svc_tcp.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
svc_udp.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
svc_unix.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
svc.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
svcauth_des.c linux: Normalize and return timeout on select (BZ #27651) 2021-04-12 18:38:37 -03:00
test-rpcent.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
thrsvc.c
tst-getmyaddr.c
tst-svc_register.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-udp-error.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-udp-garbage.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-udp-nonblocking.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-udp-timeout.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-xdrmem2.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-xdrmem.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Versions
xcrypt.c
xdr_array.c
xdr_float.c
xdr_intXX_t.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
xdr_mem.c
xdr_rec.c
xdr_ref.c
xdr_sizeof.c
xdr_stdio.c
xdr.c sunrpc: Fix typo in xdr_string comment 2021-02-08 13:55:03 +01:00