CVS log for src/tests/lib/libc/sys/t_select.c
Up to [cvs.NetBSD.org] / src / tests / lib / libc / sys
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.4.16.1: download - view: text, markup, annotated - select for diffs
Wed Nov 20 14:09:10 2024 UTC (2 months ago) by martin
Branches: netbsd-9
Diff to: previous 1.4: preferred, colored; next MAIN 1.5: preferred, colored
Changes since revision 1.4: +39 -6
lines
Pull up following revision(s) (requested by riastradh in ticket #1926):
sys/kern/sys_select.c: revision 1.67 (patch)
tests/lib/libc/sys/t_select.c: revision 1.5 (patch)
PR kern/57504 : Check all fds passed in to select
If an application passes in a huge fd_set (select(BIG, ...))
then check every bit in the fd_sets provided, to make sure
they are valid.
If BIG is too big (cannot possibly represent an open fd for
this process, under any circumstances: ie: not just because
that many are not currently open) return EINVAL.
Otherwise, check every set bit to make sure it is valid. Any
fd bits set above the applications current highest open fd
automatically generate EBADF and quick(ish) exit.
fd's that are within the plausible range are then checked as
they always were (it is possible for there to be a few there
above the max open fd - as everything in select is done in
multiples of __FDBITS (fd_mask) but the max open fd is not so
constrained. Those always were checked, continue using the
same mechanism.
This should have zero impact on any sane application which
uses the highest fd for which it set a bit, +1, as the first
arg to select. However, if there are any broken applications
that were relying upon the previous behaviour of simply ignoring
any fd_masks that started beyond the max number of open files,
then they might (if they happen to have any bits set) now fail.
tests/lib/libc/sys/t_select: Test select on bad file descriptors.
This should immediately fail, not hang, even if the bad fd is
high-numbered.
PR kern/57504: select with large enough bogus fd number set hangs
instead of failing with EBADF
Revision 1.4.28.1: download - view: text, markup, annotated - select for diffs
Mon Nov 18 18:16:52 2024 UTC (2 months ago) by martin
Branches: netbsd-10
CVS tags: netbsd-10-1-RELEASE
Diff to: previous 1.4: preferred, colored; next MAIN 1.5: preferred, colored
Changes since revision 1.4: +39 -6
lines
Pull up following revision(s) (requested by riastradh in ticket #1011):
sys/kern/sys_select.c: revision 1.67
tests/lib/libc/sys/t_select.c: revision 1.5
PR kern/57504 : Check all fds passed in to select
If an application passes in a huge fd_set (select(BIG, ...))
then check every bit in the fd_sets provided, to make sure
they are valid.
If BIG is too big (cannot possibly represent an open fd for
this process, under any circumstances: ie: not just because
that many are not currently open) return EINVAL.
Otherwise, check every set bit to make sure it is valid. Any
fd bits set above the applications current highest open fd
automatically generate EBADF and quick(ish) exit.
fd's that are within the plausible range are then checked as
they always were (it is possible for there to be a few there
above the max open fd - as everything in select is done in
multiples of __FDBITS (fd_mask) but the max open fd is not so
constrained. Those always were checked, continue using the
same mechanism.
This should have zero impact on any sane application which
uses the highest fd for which it set a bit, +1, as the first
arg to select. However, if there are any broken applications
that were relying upon the previous behaviour of simply ignoring
any fd_masks that started beyond the max number of open files,
then they might (if they happen to have any bits set) now fail.
tests/lib/libc/sys/t_select: Test select on bad file descriptors.
This should immediately fail, not hang, even if the bad fd is
high-numbered.
PR kern/57504: select with large enough bogus fd number set hangs
instead of failing with EBADF
Revision 1.5: download - view: text, markup, annotated - select for diffs
Fri Oct 18 16:39:41 2024 UTC (3 months ago) by riastradh
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +39 -6
lines
tests/lib/libc/sys/t_select: Test select on bad file descriptors.
This should immediately fail, not hang, even if the bad fd is
high-numbered.
PR kern/57504: select with large enough bogus fd number set hangs
instead of failing with EBADF
Revision 1.3.14.1: download - view: text, markup, annotated - select for diffs
Mon Mar 20 06:57:59 2017 UTC (7 years, 10 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.3: preferred, colored; next MAIN 1.4: preferred, colored
Changes since revision 1.3: +6 -4
lines
Sync with HEAD
Revision 1.4: download - view: text, markup, annotated - select for diffs
Fri Jan 13 21:18:33 2017 UTC (8 years ago) by christos
Branches: MAIN
CVS tags: thorpej-futex2-base,
thorpej-futex2,
thorpej-futex-base,
thorpej-futex,
prg-localcount2-base3,
prg-localcount2-base2,
prg-localcount2-base1,
prg-localcount2-base,
prg-localcount2,
phil-wifi-base,
phil-wifi-20200421,
phil-wifi-20200411,
phil-wifi-20200406,
phil-wifi-20191119,
phil-wifi-20190609,
phil-wifi,
pgoyette-localcount-20170426,
pgoyette-localcount-20170320,
pgoyette-compat-merge-20190127,
pgoyette-compat-base,
pgoyette-compat-20190127,
pgoyette-compat-20190118,
pgoyette-compat-1226,
pgoyette-compat-1126,
pgoyette-compat-1020,
pgoyette-compat-0930,
pgoyette-compat-0906,
pgoyette-compat-0728,
pgoyette-compat-0625,
pgoyette-compat-0521,
pgoyette-compat-0502,
pgoyette-compat-0422,
pgoyette-compat-0415,
pgoyette-compat-0407,
pgoyette-compat-0330,
pgoyette-compat-0322,
pgoyette-compat-0315,
pgoyette-compat,
perseant-stdc-iso10646-base,
perseant-stdc-iso10646,
perseant-exfatfs-base-20240630,
perseant-exfatfs-base,
perseant-exfatfs,
netbsd-9-base,
netbsd-9-4-RELEASE,
netbsd-9-3-RELEASE,
netbsd-9-2-RELEASE,
netbsd-9-1-RELEASE,
netbsd-9-0-RELEASE,
netbsd-9-0-RC2,
netbsd-9-0-RC1,
netbsd-8-base,
netbsd-8-3-RELEASE,
netbsd-8-2-RELEASE,
netbsd-8-1-RELEASE,
netbsd-8-1-RC1,
netbsd-8-0-RELEASE,
netbsd-8-0-RC2,
netbsd-8-0-RC1,
netbsd-8,
netbsd-10-base,
netbsd-10-0-RELEASE,
netbsd-10-0-RC6,
netbsd-10-0-RC5,
netbsd-10-0-RC4,
netbsd-10-0-RC3,
netbsd-10-0-RC2,
netbsd-10-0-RC1,
matt-nb8-mediatek-base,
matt-nb8-mediatek,
is-mlppp-base,
is-mlppp,
cjep_sun2x-base1,
cjep_sun2x-base,
cjep_sun2x,
cjep_staticlib_x-base1,
cjep_staticlib_x-base,
cjep_staticlib_x,
bouyer-socketcan-base1,
bouyer-socketcan-base,
bouyer-socketcan
Branch point for: netbsd-9,
netbsd-10
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +6 -4
lines
PR/51861: Ngie Cooper: Sprinkle __unused, mark __dead, _exit().
Revision 1.1.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:09:12 2012 UTC (12 years, 9 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1: +3 -5
lines
sync with head
Revision 1.3: download - view: text, markup, annotated - select for diffs
Sun Mar 18 07:00:52 2012 UTC (12 years, 10 months ago) by jruoho
Branches: MAIN
CVS tags: yamt-pagecache-base9,
yamt-pagecache-base8,
yamt-pagecache-base7,
yamt-pagecache-base6,
yamt-pagecache-base5,
yamt-pagecache-base4,
tls-maxphys-base,
tls-maxphys,
tls-earlyentropy-base,
tls-earlyentropy,
riastradh-xf86-video-intel-2-7-1-pre-2-21-15,
riastradh-drm2-base3,
riastradh-drm2-base2,
riastradh-drm2-base1,
riastradh-drm2-base,
riastradh-drm2,
pgoyette-localcount-base,
pgoyette-localcount-20170107,
pgoyette-localcount-20161104,
pgoyette-localcount-20160806,
pgoyette-localcount-20160726,
netbsd-7-nhusb-base-20170116,
netbsd-7-nhusb-base,
netbsd-7-nhusb,
netbsd-7-base,
netbsd-7-2-RELEASE,
netbsd-7-1-RELEASE,
netbsd-7-1-RC2,
netbsd-7-1-RC1,
netbsd-7-1-2-RELEASE,
netbsd-7-1-1-RELEASE,
netbsd-7-1,
netbsd-7-0-RELEASE,
netbsd-7-0-RC3,
netbsd-7-0-RC2,
netbsd-7-0-RC1,
netbsd-7-0-2-RELEASE,
netbsd-7-0-1-RELEASE,
netbsd-7-0,
netbsd-7,
localcount-20160914,
agc-symver-base,
agc-symver
Branch point for: pgoyette-localcount
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +2 -4
lines
Move the references to PRs from code comments to the test description. Once
ATF has the ability to output the metadata in the HTML reports, it should be
easy to traverse between releng and gnats -reports via links.
Revision 1.2: download - view: text, markup, annotated - select for diffs
Mon Dec 12 10:56:46 2011 UTC (13 years, 1 month ago) by skrll
Branches: MAIN
CVS tags: netbsd-6-base,
netbsd-6-1-RELEASE,
netbsd-6-1-RC4,
netbsd-6-1-RC3,
netbsd-6-1-RC2,
netbsd-6-1-RC1,
netbsd-6-1-5-RELEASE,
netbsd-6-1-4-RELEASE,
netbsd-6-1-3-RELEASE,
netbsd-6-1-2-RELEASE,
netbsd-6-1-1-RELEASE,
netbsd-6-1,
netbsd-6-0-RELEASE,
netbsd-6-0-RC2,
netbsd-6-0-RC1,
netbsd-6-0-6-RELEASE,
netbsd-6-0-5-RELEASE,
netbsd-6-0-4-RELEASE,
netbsd-6-0-3-RELEASE,
netbsd-6-0-2-RELEASE,
netbsd-6-0-1-RELEASE,
netbsd-6-0,
netbsd-6,
matt-nb6-plus-nbase,
matt-nb6-plus-base,
matt-nb6-plus
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +2 -2
lines
Give the child more time to timeout, etc.
Revision 1.1: download - view: text, markup, annotated - select for diffs
Thu Jul 7 06:57:54 2011 UTC (13 years, 6 months ago) by jruoho
Branches: MAIN
CVS tags: yamt-pagecache-base3,
yamt-pagecache-base2,
yamt-pagecache-base
Branch point for: yamt-pagecache
Add the syscall tests back. Couple of files and tests were also renamed for
consistency. All of these now mimic the libc structure.
CVSweb <webmaster@jp.NetBSD.org>