From 5ccf88c235e060c2c61c69011161a31c3873e690 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 15 May 2009 16:47:36 +0200 Subject: rename each .cvsignore file to .gitignore (cherry picked from commit 2e180a26222caf478f29e272c9d1b5d9c6299752) --- .cvsignore | 29 ----------------------------- .gitignore | 29 +++++++++++++++++++++++++++++ assert/.cvsignore | 6 ------ assert/.gitignore | 6 ++++++ csu/.cvsignore | 7 ------- csu/.gitignore | 7 +++++++ ctype/.cvsignore | 6 ------ ctype/.gitignore | 6 ++++++ dirent/.cvsignore | 6 ------ dirent/.gitignore | 6 ++++++ elf/.cvsignore | 6 ------ elf/.gitignore | 6 ++++++ gmon/.cvsignore | 6 ------ gmon/.gitignore | 6 ++++++ gnulib/.cvsignore | 6 ------ gnulib/.gitignore | 6 ++++++ grp/.cvsignore | 6 ------ grp/.gitignore | 6 ++++++ hurd/.cvsignore | 6 ------ hurd/.gitignore | 6 ++++++ inet/.cvsignore | 6 ------ inet/.gitignore | 6 ++++++ intl/.cvsignore | 6 ------ intl/.gitignore | 6 ++++++ io/.cvsignore | 6 ------ io/.gitignore | 6 ++++++ libio/.cvsignore | 8 -------- libio/.gitignore | 8 ++++++++ locale/.cvsignore | 6 ------ locale/.gitignore | 6 ++++++ mach/.cvsignore | 6 ------ mach/.gitignore | 6 ++++++ manual/.cvsignore | 14 -------------- manual/.gitignore | 14 ++++++++++++++ math/.cvsignore | 6 ------ math/.gitignore | 6 ++++++ misc/.cvsignore | 6 ------ misc/.gitignore | 6 ++++++ po/.cvsignore | 2 -- po/.gitignore | 2 ++ posix/.cvsignore | 6 ------ posix/.gitignore | 6 ++++++ pwd/.cvsignore | 6 ------ pwd/.gitignore | 6 ++++++ resolv/.cvsignore | 6 ------ resolv/.gitignore | 6 ++++++ resource/.cvsignore | 6 ------ resource/.gitignore | 6 ++++++ setjmp/.cvsignore | 6 ------ setjmp/.gitignore | 6 ++++++ signal/.cvsignore | 6 ------ signal/.gitignore | 6 ++++++ socket/.cvsignore | 6 ------ socket/.gitignore | 6 ++++++ stdio-common/.cvsignore | 8 -------- stdio-common/.gitignore | 8 ++++++++ stdlib/.cvsignore | 8 -------- stdlib/.gitignore | 8 ++++++++ string/.cvsignore | 6 ------ string/.gitignore | 6 ++++++ sunrpc/.cvsignore | 8 -------- sunrpc/.gitignore | 8 ++++++++ sysdeps/mach/hurd/.cvsignore | 4 ---- sysdeps/mach/hurd/.gitignore | 4 ++++ sysdeps/unix/common/.cvsignore | 4 ---- sysdeps/unix/common/.gitignore | 4 ++++ sysvipc/.cvsignore | 6 ------ sysvipc/.gitignore | 6 ++++++ termios/.cvsignore | 6 ------ termios/.gitignore | 6 ++++++ time/.cvsignore | 6 ------ time/.gitignore | 6 ++++++ wcsmbs/.cvsignore | 6 ------ wcsmbs/.gitignore | 6 ++++++ wctype/.cvsignore | 6 ------ wctype/.gitignore | 6 ++++++ 76 files changed, 260 insertions(+), 260 deletions(-) delete mode 100644 .cvsignore create mode 100644 .gitignore delete mode 100644 assert/.cvsignore create mode 100644 assert/.gitignore delete mode 100644 csu/.cvsignore create mode 100644 csu/.gitignore delete mode 100644 ctype/.cvsignore create mode 100644 ctype/.gitignore delete mode 100644 dirent/.cvsignore create mode 100644 dirent/.gitignore delete mode 100644 elf/.cvsignore create mode 100644 elf/.gitignore delete mode 100644 gmon/.cvsignore create mode 100644 gmon/.gitignore delete mode 100644 gnulib/.cvsignore create mode 100644 gnulib/.gitignore delete mode 100644 grp/.cvsignore create mode 100644 grp/.gitignore delete mode 100644 hurd/.cvsignore create mode 100644 hurd/.gitignore delete mode 100644 inet/.cvsignore create mode 100644 inet/.gitignore delete mode 100644 intl/.cvsignore create mode 100644 intl/.gitignore delete mode 100644 io/.cvsignore create mode 100644 io/.gitignore delete mode 100644 libio/.cvsignore create mode 100644 libio/.gitignore delete mode 100644 locale/.cvsignore create mode 100644 locale/.gitignore delete mode 100644 mach/.cvsignore create mode 100644 mach/.gitignore delete mode 100644 manual/.cvsignore create mode 100644 manual/.gitignore delete mode 100644 math/.cvsignore create mode 100644 math/.gitignore delete mode 100644 misc/.cvsignore create mode 100644 misc/.gitignore delete mode 100644 po/.cvsignore create mode 100644 po/.gitignore delete mode 100644 posix/.cvsignore create mode 100644 posix/.gitignore delete mode 100644 pwd/.cvsignore create mode 100644 pwd/.gitignore delete mode 100644 resolv/.cvsignore create mode 100644 resolv/.gitignore delete mode 100644 resource/.cvsignore create mode 100644 resource/.gitignore delete mode 100644 setjmp/.cvsignore create mode 100644 setjmp/.gitignore delete mode 100644 signal/.cvsignore create mode 100644 signal/.gitignore delete mode 100644 socket/.cvsignore create mode 100644 socket/.gitignore delete mode 100644 stdio-common/.cvsignore create mode 100644 stdio-common/.gitignore delete mode 100644 stdlib/.cvsignore create mode 100644 stdlib/.gitignore delete mode 100644 string/.cvsignore create mode 100644 string/.gitignore delete mode 100644 sunrpc/.cvsignore create mode 100644 sunrpc/.gitignore delete mode 100644 sysdeps/mach/hurd/.cvsignore create mode 100644 sysdeps/mach/hurd/.gitignore delete mode 100644 sysdeps/unix/common/.cvsignore create mode 100644 sysdeps/unix/common/.gitignore delete mode 100644 sysvipc/.cvsignore create mode 100644 sysvipc/.gitignore delete mode 100644 termios/.cvsignore create mode 100644 termios/.gitignore delete mode 100644 time/.cvsignore create mode 100644 time/.gitignore delete mode 100644 wcsmbs/.cvsignore create mode 100644 wcsmbs/.gitignore delete mode 100644 wctype/.cvsignore create mode 100644 wctype/.gitignore diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index 213609fcc7..0000000000 --- a/.cvsignore +++ /dev/null @@ -1,29 +0,0 @@ -*.d *.o *.so *.po *.go *.bo stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz *.bz2 -=* -TODO AUTHORS copyr-* copying.* -glibc-* - -configparms - -sun[43]* i[345]86* hp300* - -ieeetest hppa-sysdeps regex - -gpl2lgpl.sed -distinfo -distinfo - -test-include -analysis -docs -releases - -libc.prj .libc.prcs_aux -libc.proj .snprj - -TODO.html - -autom4te*.cache - -rtkaio diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..213609fcc7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,29 @@ +*.d *.o *.so *.po *.go *.bo stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz *.bz2 +=* +TODO AUTHORS copyr-* copying.* +glibc-* + +configparms + +sun[43]* i[345]86* hp300* + +ieeetest hppa-sysdeps regex + +gpl2lgpl.sed +distinfo +distinfo + +test-include +analysis +docs +releases + +libc.prj .libc.prcs_aux +libc.proj .snprj + +TODO.html + +autom4te*.cache + +rtkaio diff --git a/assert/.cvsignore b/assert/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/assert/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/assert/.gitignore b/assert/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/assert/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/csu/.cvsignore b/csu/.cvsignore deleted file mode 100644 index da6e41b953..0000000000 --- a/csu/.cvsignore +++ /dev/null @@ -1,7 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo -specs diff --git a/csu/.gitignore b/csu/.gitignore new file mode 100644 index 0000000000..da6e41b953 --- /dev/null +++ b/csu/.gitignore @@ -0,0 +1,7 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo +specs diff --git a/ctype/.cvsignore b/ctype/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/ctype/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/ctype/.gitignore b/ctype/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/ctype/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/dirent/.cvsignore b/dirent/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/dirent/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/dirent/.gitignore b/dirent/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/dirent/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/elf/.cvsignore b/elf/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/elf/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/elf/.gitignore b/elf/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/elf/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/gmon/.cvsignore b/gmon/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/gmon/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/gmon/.gitignore b/gmon/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/gmon/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/gnulib/.cvsignore b/gnulib/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/gnulib/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/gnulib/.gitignore b/gnulib/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/gnulib/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/grp/.cvsignore b/grp/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/grp/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/grp/.gitignore b/grp/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/grp/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/hurd/.cvsignore b/hurd/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/hurd/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/hurd/.gitignore b/hurd/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/hurd/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/inet/.cvsignore b/inet/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/inet/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/inet/.gitignore b/inet/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/inet/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/intl/.cvsignore b/intl/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/intl/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/intl/.gitignore b/intl/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/intl/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/io/.cvsignore b/io/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/io/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/io/.gitignore b/io/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/io/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/libio/.cvsignore b/libio/.cvsignore deleted file mode 100644 index 602b74c1ae..0000000000 --- a/libio/.cvsignore +++ /dev/null @@ -1,8 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* - -mpn-copy.mk -distinfo diff --git a/libio/.gitignore b/libio/.gitignore new file mode 100644 index 0000000000..602b74c1ae --- /dev/null +++ b/libio/.gitignore @@ -0,0 +1,8 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* + +mpn-copy.mk +distinfo diff --git a/locale/.cvsignore b/locale/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/locale/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/locale/.gitignore b/locale/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/locale/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/mach/.cvsignore b/mach/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/mach/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/mach/.gitignore b/mach/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/mach/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/manual/.cvsignore b/manual/.cvsignore deleted file mode 100644 index 54abbbb5a4..0000000000 --- a/manual/.cvsignore +++ /dev/null @@ -1,14 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz *.bz2 -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* - -*.dvi* *.info* *.c.texi *.ps *.pdf -*.toc *.aux *.log *.tmp -*.cp *.cps *.fn *.fns *.vr *.vrs *.tp *.tps *.ky *.kys *.pg *.pgs - -texis top-menu.texi chapters.texi summary.texi stamp-* -distinfo dir-add.texinfo dir-add.texi - -libm-err.texi diff --git a/manual/.gitignore b/manual/.gitignore new file mode 100644 index 0000000000..54abbbb5a4 --- /dev/null +++ b/manual/.gitignore @@ -0,0 +1,14 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz *.bz2 +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* + +*.dvi* *.info* *.c.texi *.ps *.pdf +*.toc *.aux *.log *.tmp +*.cp *.cps *.fn *.fns *.vr *.vrs *.tp *.tps *.ky *.kys *.pg *.pgs + +texis top-menu.texi chapters.texi summary.texi stamp-* +distinfo dir-add.texinfo dir-add.texi + +libm-err.texi diff --git a/math/.cvsignore b/math/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/math/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/math/.gitignore b/math/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/math/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/misc/.cvsignore b/misc/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/misc/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/misc/.gitignore b/misc/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/misc/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/po/.cvsignore b/po/.cvsignore deleted file mode 100644 index 37752e3b33..0000000000 --- a/po/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -*.mo -libc.pot.files diff --git a/po/.gitignore b/po/.gitignore new file mode 100644 index 0000000000..37752e3b33 --- /dev/null +++ b/po/.gitignore @@ -0,0 +1,2 @@ +*.mo +libc.pot.files diff --git a/posix/.cvsignore b/posix/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/posix/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/posix/.gitignore b/posix/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/posix/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/pwd/.cvsignore b/pwd/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/pwd/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/pwd/.gitignore b/pwd/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/pwd/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/resolv/.cvsignore b/resolv/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/resolv/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/resolv/.gitignore b/resolv/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/resolv/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/resource/.cvsignore b/resource/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/resource/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/resource/.gitignore b/resource/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/resource/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/setjmp/.cvsignore b/setjmp/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/setjmp/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/setjmp/.gitignore b/setjmp/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/setjmp/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/signal/.cvsignore b/signal/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/signal/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/signal/.gitignore b/signal/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/signal/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/socket/.cvsignore b/socket/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/socket/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/socket/.gitignore b/socket/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/socket/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/stdio-common/.cvsignore b/stdio-common/.cvsignore deleted file mode 100644 index 602b74c1ae..0000000000 --- a/stdio-common/.cvsignore +++ /dev/null @@ -1,8 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* - -mpn-copy.mk -distinfo diff --git a/stdio-common/.gitignore b/stdio-common/.gitignore new file mode 100644 index 0000000000..602b74c1ae --- /dev/null +++ b/stdio-common/.gitignore @@ -0,0 +1,8 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* + +mpn-copy.mk +distinfo diff --git a/stdlib/.cvsignore b/stdlib/.cvsignore deleted file mode 100644 index 602b74c1ae..0000000000 --- a/stdlib/.cvsignore +++ /dev/null @@ -1,8 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* - -mpn-copy.mk -distinfo diff --git a/stdlib/.gitignore b/stdlib/.gitignore new file mode 100644 index 0000000000..602b74c1ae --- /dev/null +++ b/stdlib/.gitignore @@ -0,0 +1,8 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* + +mpn-copy.mk +distinfo diff --git a/string/.cvsignore b/string/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/string/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/string/.gitignore b/string/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/string/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/sunrpc/.cvsignore b/sunrpc/.cvsignore deleted file mode 100644 index b2e79b502b..0000000000 --- a/sunrpc/.cvsignore +++ /dev/null @@ -1,8 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* - -rpcsrc-4.0 -distinfo diff --git a/sunrpc/.gitignore b/sunrpc/.gitignore new file mode 100644 index 0000000000..b2e79b502b --- /dev/null +++ b/sunrpc/.gitignore @@ -0,0 +1,8 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* + +rpcsrc-4.0 +distinfo diff --git a/sysdeps/mach/hurd/.cvsignore b/sysdeps/mach/hurd/.cvsignore deleted file mode 100644 index 1f69fd919a..0000000000 --- a/sysdeps/mach/hurd/.cvsignore +++ /dev/null @@ -1,4 +0,0 @@ -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* diff --git a/sysdeps/mach/hurd/.gitignore b/sysdeps/mach/hurd/.gitignore new file mode 100644 index 0000000000..1f69fd919a --- /dev/null +++ b/sysdeps/mach/hurd/.gitignore @@ -0,0 +1,4 @@ +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* diff --git a/sysdeps/unix/common/.cvsignore b/sysdeps/unix/common/.cvsignore deleted file mode 100644 index 1f69fd919a..0000000000 --- a/sysdeps/unix/common/.cvsignore +++ /dev/null @@ -1,4 +0,0 @@ -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* diff --git a/sysdeps/unix/common/.gitignore b/sysdeps/unix/common/.gitignore new file mode 100644 index 0000000000..1f69fd919a --- /dev/null +++ b/sysdeps/unix/common/.gitignore @@ -0,0 +1,4 @@ +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* diff --git a/sysvipc/.cvsignore b/sysvipc/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/sysvipc/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/sysvipc/.gitignore b/sysvipc/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/sysvipc/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/termios/.cvsignore b/termios/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/termios/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/termios/.gitignore b/termios/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/termios/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/time/.cvsignore b/time/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/time/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/time/.gitignore b/time/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/time/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/wcsmbs/.cvsignore b/wcsmbs/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/wcsmbs/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/wcsmbs/.gitignore b/wcsmbs/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/wcsmbs/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/wctype/.cvsignore b/wctype/.cvsignore deleted file mode 100644 index 3fc9f4cdf1..0000000000 --- a/wctype/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/wctype/.gitignore b/wctype/.gitignore new file mode 100644 index 0000000000..3fc9f4cdf1 --- /dev/null +++ b/wctype/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo -- cgit v1.2.3 From b0a411e5ddb4d0e7e9eca017fd6e8c3c060071cb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 15 May 2009 13:02:02 -0700 Subject: Ignore Emacs backup files. (cherry picked from commit f1342e0be8e222dbca077beca94b5937564e8c4b) --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 213609fcc7..1518b6ab38 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +*~ *.d *.o *.so *.po *.go *.bo stamp.* *.stamp *.ustamp *.udeps *.gz *.Z *.tar *.tgz *.bz2 =* -- cgit v1.2.3 From 85734801890201249fcf5270ca50ae0dbac77c94 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 15 May 2009 19:47:10 -0700 Subject: Cleanup some .gitignore files. (cherry picked from commit 9a1fbe861d8ae41976f926a211d59098a030878f) --- .gitignore | 36 +++++++++++++++++++++++++++++------- manual/.gitignore | 40 +++++++++++++++++++++++++++++----------- 2 files changed, 58 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index 1518b6ab38..d903bc6bd3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,35 @@ *~ -*.d *.o *.so *.po *.go *.bo stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz *.bz2 +*.d +*.o +*.so +*.po +*.go +*.bo +stamp.* +*.stamp +*.ustamp +*.udeps +*.gz +*.Z +*.tar +*.tgz +*.bz2 =* -TODO AUTHORS copyr-* copying.* +TODO +AUTHORS +copyr-* +copying.* glibc-* configparms -sun[43]* i[345]86* hp300* +sun[43]* +i[345]86* +hp300* -ieeetest hppa-sysdeps regex +ieeetest +hppa-sysdeps +regex gpl2lgpl.sed distinfo @@ -20,8 +40,10 @@ analysis docs releases -libc.prj .libc.prcs_aux -libc.proj .snprj +libc.prj +.libc.prcs_aux +libc.proj +.snprj TODO.html diff --git a/manual/.gitignore b/manual/.gitignore index 54abbbb5a4..27f045cc1f 100644 --- a/manual/.gitignore +++ b/manual/.gitignore @@ -1,14 +1,32 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz *.bz2 -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* +*.dvi* +*.info* +*.c.texi +*.ps +*.pdf +*.toc +*.aux +*.log +*.tmp +*.cp +*.cps +*.fn +*.fns +*.vr +*.vrs +*.tp +*.tps +*.ky +*.kys +*.pg +*.pgs -*.dvi* *.info* *.c.texi *.ps *.pdf -*.toc *.aux *.log *.tmp -*.cp *.cps *.fn *.fns *.vr *.vrs *.tp *.tps *.ky *.kys *.pg *.pgs - -texis top-menu.texi chapters.texi summary.texi stamp-* -distinfo dir-add.texinfo dir-add.texi +texis +top-menu.texi +chapters.texi +summary.texi +stamp-* +distinfo +dir-add.texinfo +dir-add.texi libm-err.texi -- cgit v1.2.3 From f84a1e419017b86b4745ae983854b3d57e8c55f1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 15 May 2009 10:12:35 -0700 Subject: No cancel signal in unsafe places. When disabling async cancellation we cannot return from the function call if the thread is canceled. This happens when the cancel bits have been set before async cancel is disabled but the signal hasn't been sent/received yet. Delay for as long as necessary since otherwise the signal might be received in an unsafe context. (cherry picked from commit 1a7f254b4b0590bfab1baa1400705265b1b23b97) --- nptl/ChangeLog | 6 ++++++ nptl/cancellation.c | 14 +++++++++++++- nptl/libc-cancellation.c | 14 +++++++++++++- 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/nptl/ChangeLog b/nptl/ChangeLog index b83dfd0c9d..74a2a73666 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,9 @@ +2009-05-15 Ulrich Drepper + + * cancellation.c (__pthread_disable_asynccancel): Don't return if + thread is canceled. + * libc-cancellation.c (__libc_disable_asynccancel): Likewise. + 2009-04-27 Ulrich Drepper * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND diff --git a/nptl/cancellation.c b/nptl/cancellation.c index 81134a679a..4d528cfc2f 100644 --- a/nptl/cancellation.c +++ b/nptl/cancellation.c @@ -70,15 +70,17 @@ __pthread_disable_asynccancel (int oldtype) return; struct pthread *self = THREAD_SELF; + int newval; #ifdef THREAD_ATOMIC_AND THREAD_ATOMIC_AND (self, cancelhandling, ~CANCELTYPE_BITMASK); + newval = THREAD_GETMEM (self, cancelhandling); #else int oldval = THREAD_GETMEM (self, cancelhandling); while (1) { - int newval = oldval & ~CANCELTYPE_BITMASK; + newval = oldval & ~CANCELTYPE_BITMASK; if (newval == oldval) break; @@ -92,4 +94,14 @@ __pthread_disable_asynccancel (int oldtype) oldval = curval; } #endif + + /* We cannot return when we are being canceled. Upon return the + thread might be things which would have to be undone. The + following loop should loop until the cancellation signal is + delivered. */ + while (__builtin_expect (newval & CANCELED_BITMASK, 0)) + { + lll_futex_wait (&self->cancelhandling, newval, LLL_PRIVATE); + newval = THREAD_GETMEM (self, cancelhandling); + } } diff --git a/nptl/libc-cancellation.c b/nptl/libc-cancellation.c index cf24f1c0f2..35ac82b3d1 100644 --- a/nptl/libc-cancellation.c +++ b/nptl/libc-cancellation.c @@ -86,15 +86,17 @@ __libc_disable_asynccancel (int oldtype) return; struct pthread *self = THREAD_SELF; + int newval; #ifdef THREAD_ATOMIC_AND THREAD_ATOMIC_AND (self, cancelhandling, ~CANCELTYPE_BITMASK); + newval = THREAD_GETMEM (self, cancelhandling); #else int oldval = THREAD_GETMEM (self, cancelhandling); while (1) { - int newval = oldval & ~CANCELTYPE_BITMASK; + newval = oldval & ~CANCELTYPE_BITMASK; if (newval == oldval) break; @@ -108,6 +110,16 @@ __libc_disable_asynccancel (int oldtype) oldval = curval; } #endif + + /* We cannot return when we are being canceled. Upon return the + thread might be things which would have to be undone. The + following loop should loop until the cancellation signal is + delivered. */ + while (__builtin_expect (newval & CANCELED_BITMASK, 0)) + { + lll_futex_wait (&self->cancelhandling, newval, LLL_PRIVATE); + newval = THREAD_GETMEM (self, cancelhandling); + } } -- cgit v1.2.3 From 6b23316e66ec3d2f1417896e1fa25c24a8ae32d3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 15 May 2009 20:42:36 -0700 Subject: Fix change to prevent cancel signal in unsafe places. The bits tested to decide when to delay the return when switching off async cancel mode were wrong. Fix that. Also close a race condition in pthread_cancel where the bit indicating the cancellation is unconditionally set even if the cancel type might have changed. (cherry picked from commit 9437b427cec6266abd303983848549a5c4ba0d0a) --- nptl/ChangeLog | 6 ++++++ nptl/cancellation.c | 8 ++------ nptl/libc-cancellation.c | 8 ++------ nptl/pthread_cancel.c | 8 ++++++-- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 74a2a73666..f3bd32f577 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,5 +1,11 @@ 2009-05-15 Ulrich Drepper + * cancellation.c (__pthread_disable_asynccancel): Correct the bits + to test when deciding on the delay. + * libc-cancellation.c (__libc_disable_asynccancel): Likewise. + * pthread_cancel.c: Close race between deciding on sending a signal + and setting the CANCELING_BIT bit. + * cancellation.c (__pthread_disable_asynccancel): Don't return if thread is canceled. * libc-cancellation.c (__libc_disable_asynccancel): Likewise. diff --git a/nptl/cancellation.c b/nptl/cancellation.c index 4d528cfc2f..2a6f83d28a 100644 --- a/nptl/cancellation.c +++ b/nptl/cancellation.c @@ -72,10 +72,6 @@ __pthread_disable_asynccancel (int oldtype) struct pthread *self = THREAD_SELF; int newval; -#ifdef THREAD_ATOMIC_AND - THREAD_ATOMIC_AND (self, cancelhandling, ~CANCELTYPE_BITMASK); - newval = THREAD_GETMEM (self, cancelhandling); -#else int oldval = THREAD_GETMEM (self, cancelhandling); while (1) @@ -93,13 +89,13 @@ __pthread_disable_asynccancel (int oldtype) /* Prepare the next round. */ oldval = curval; } -#endif /* We cannot return when we are being canceled. Upon return the thread might be things which would have to be undone. The following loop should loop until the cancellation signal is delivered. */ - while (__builtin_expect (newval & CANCELED_BITMASK, 0)) + while (__builtin_expect ((newval & (CANCELING_BITMASK | CANCELED_BITMASK)) + == CANCELING_BITMASK, 0)) { lll_futex_wait (&self->cancelhandling, newval, LLL_PRIVATE); newval = THREAD_GETMEM (self, cancelhandling); diff --git a/nptl/libc-cancellation.c b/nptl/libc-cancellation.c index 35ac82b3d1..cada464d2b 100644 --- a/nptl/libc-cancellation.c +++ b/nptl/libc-cancellation.c @@ -88,10 +88,6 @@ __libc_disable_asynccancel (int oldtype) struct pthread *self = THREAD_SELF; int newval; -#ifdef THREAD_ATOMIC_AND - THREAD_ATOMIC_AND (self, cancelhandling, ~CANCELTYPE_BITMASK); - newval = THREAD_GETMEM (self, cancelhandling); -#else int oldval = THREAD_GETMEM (self, cancelhandling); while (1) @@ -109,13 +105,13 @@ __libc_disable_asynccancel (int oldtype) /* Prepare the next round. */ oldval = curval; } -#endif /* We cannot return when we are being canceled. Upon return the thread might be things which would have to be undone. The following loop should loop until the cancellation signal is delivered. */ - while (__builtin_expect (newval & CANCELED_BITMASK, 0)) + while (__builtin_expect ((newval & (CANCELING_BITMASK | CANCELED_BITMASK)) + == CANCELING_BITMASK, 0)) { lll_futex_wait (&self->cancelhandling, newval, LLL_PRIVATE); newval = THREAD_GETMEM (self, cancelhandling); diff --git a/nptl/pthread_cancel.c b/nptl/pthread_cancel.c index a13af56b37..55bb0da922 100644 --- a/nptl/pthread_cancel.c +++ b/nptl/pthread_cancel.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -44,6 +44,7 @@ pthread_cancel (th) int newval; do { + again: oldval = pd->cancelhandling; newval = oldval | CANCELING_BITMASK | CANCELED_BITMASK; @@ -59,7 +60,10 @@ pthread_cancel (th) if (CANCEL_ENABLED_AND_CANCELED_AND_ASYNCHRONOUS (newval)) { /* Mark the cancellation as "in progress". */ - atomic_bit_set (&pd->cancelhandling, CANCELING_BIT); + if (atomic_compare_and_exchange_bool_acq (&pd->cancelhandling, + oldval | CANCELING_BITMASK, + oldval)) + goto again; /* The cancellation handler will take care of marking the thread as canceled. */ -- cgit v1.2.3 From 6dca80c9c771c5c4728a8c335861300bce93f8a0 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 15 May 2009 20:48:08 -0700 Subject: Don't try to cleanup libselinux and libaudit. Because we are not shutting down the other threads first another thread might work on a query before the process shuts down. In this case the now uninitialized libselinux and libaudit might be used. Just don't free the resources. It's not necessary anyway because the process is about to terminate. (cherry picked from commit 9e471dad8e173806cbbfb704875d5ae40e36fa34) (fixed ChangeLog entry by pasky) --- ChangeLog | 7 +++++++ nscd/nscd.c | 4 ---- nscd/selinux.c | 13 +------------ nscd/selinux.h | 5 +---- 4 files changed, 9 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index e3afa8543c..3f41c66542 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-05-14 Jakub Jelinek + + * nscd/selinux.c (nscd_avc_destroy): Removed. + * nscd/selinux.h (nscd_avc_destroy): Likewise. + * nscd/nscd.c (termination_handler): Don't call + nscd_avc_destroy. + 2009-05-10 Ulrich Drepper * version.h (VERSION): Bump to 2.10.1. diff --git a/nscd/nscd.c b/nscd/nscd.c index 3265ea8973..b9035f2131 100644 --- a/nscd/nscd.c +++ b/nscd/nscd.c @@ -488,10 +488,6 @@ termination_handler (int signum) msync (dbs[cnt].head, dbs[cnt].memsize, MS_ASYNC); } - /* Shutdown the SELinux AVC. */ - if (selinux_enabled) - nscd_avc_destroy (); - _exit (EXIT_SUCCESS); } diff --git a/nscd/selinux.c b/nscd/selinux.c index 9a167ec14d..e07a454bf8 100644 --- a/nscd/selinux.c +++ b/nscd/selinux.c @@ -1,5 +1,5 @@ /* SELinux access controls for nscd. - Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Matthew Rickard , 2004. @@ -418,15 +418,4 @@ nscd_avc_print_stats (struct avc_cache_stats *cstats) cstats->cav_probes, cstats->cav_misses); } - -/* Clean up the AVC before exiting. */ -void -nscd_avc_destroy (void) -{ - avc_destroy (); -#ifdef HAVE_LIBAUDIT - audit_close (audit_fd); -#endif -} - #endif /* HAVE_SELINUX */ diff --git a/nscd/selinux.h b/nscd/selinux.h index 27afcd6e86..67d981bb06 100644 --- a/nscd/selinux.h +++ b/nscd/selinux.h @@ -1,5 +1,5 @@ /* Header for nscd SELinux access controls. - Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 2004, 2006, 2007, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Matthew Rickard , 2004. @@ -35,8 +35,6 @@ struct avc_cache_stats; /* Initialize the userspace AVC. */ extern void nscd_avc_init (void); -/* Destroy the userspace AVC. */ -extern void nscd_avc_destroy (void); /* Determine if we are running on an SELinux kernel. */ extern void nscd_selinux_enabled (int *selinux_enabled); /* Check if the client has permission for the request type. */ @@ -55,7 +53,6 @@ extern void install_real_capabilities (cap_t new_caps); #else # define selinux_enabled 0 # define nscd_avc_init() (void) 0 -# define nscd_avc_destroy() (void) 0 # define nscd_selinux_enabled(selinux_enabled) (void) 0 # define nscd_request_avc_has_perm(fd, req) 0 # define nscd_avc_cache_stats(cstats) (void) 0 -- cgit v1.2.3 From f27dc66bb946b74df6817768758b1de49d4be887 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 15 May 2009 21:08:55 -0700 Subject: Avoid double definition of catomic_compare_and_exchange_val_acq. (cherry picked from commit 3b1b533bc3239ef6df1e40e0088e7270ac060be6) --- ChangeLog | 6 ++++++ include/atomic.h | 19 ++++++++++--------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3f41c66542..b584ec669d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-05-12 Jakub Jelinek + + * include/atomic.h: Formatting. + (catomic_compare_and_exchange_val_acq): Don't define if already + defined by bits/atomic.h. + 2009-05-14 Jakub Jelinek * nscd/selinux.c (nscd_avc_destroy): Removed. diff --git a/include/atomic.h b/include/atomic.h index 7c0548b004..9366f78734 100644 --- a/include/atomic.h +++ b/include/atomic.h @@ -95,14 +95,15 @@ #endif -#if !defined catomic_compare_and_exchange_val_acq \ - && defined __arch_c_compare_and_exchange_val_32_acq -# define catomic_compare_and_exchange_val_acq(mem, newval, oldval) \ +#ifndef catomic_compare_and_exchange_val_acq +# ifdef __arch_c_compare_and_exchange_val_32_acq +# define catomic_compare_and_exchange_val_acq(mem, newval, oldval) \ __atomic_val_bysize (__arch_c_compare_and_exchange_val,acq, \ mem, newval, oldval) -#else -# define catomic_compare_and_exchange_val_acq(mem, newval, oldval) \ +# else +# define catomic_compare_and_exchange_val_acq(mem, newval, oldval) \ atomic_compare_and_exchange_val_acq (mem, newval, oldval) +# endif #endif @@ -125,8 +126,8 @@ # define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \ __atomic_bool_bysize (__arch_compare_and_exchange_bool,acq, \ mem, newval, oldval) -# else -# define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \ +# else +# define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \ ({ /* Cannot use __oldval here, because macros later in this file might \ call this macro with __oldval argument. */ \ __typeof (oldval) __atg3_old = (oldval); \ @@ -142,8 +143,8 @@ # define catomic_compare_and_exchange_bool_acq(mem, newval, oldval) \ __atomic_bool_bysize (__arch_c_compare_and_exchange_bool,acq, \ mem, newval, oldval) -# else -# define catomic_compare_and_exchange_bool_acq(mem, newval, oldval) \ +# else +# define catomic_compare_and_exchange_bool_acq(mem, newval, oldval) \ ({ /* Cannot use __oldval here, because macros later in this file might \ call this macro with __oldval argument. */ \ __typeof (oldval) __atg4_old = (oldval); \ -- cgit v1.2.3 From b9e0df9847f3460c67e27e631af8662e7906ed6b Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 15 May 2009 21:17:08 -0700 Subject: Robustify libc-side nscd database reader. The nscd database mapped in processes can change at any time. We have to be more vigilant when it comes to using that memory. Test the data entries are valid in their entire size, don't read data again from memory once we verified it, and make sure the trailing pointer is not going off the deep end. (cherry picked from commit cfe1fc1013d0e7e4863c974fa0e78891cc0a2ed2) --- ChangeLog | 25 +++++++++++++++++++------ nscd/nscd-client.h | 5 +++-- nscd/nscd_getai.c | 5 +++-- nscd/nscd_getgr_r.c | 5 +++-- nscd/nscd_gethst_r.c | 6 ++++-- nscd/nscd_getpw_r.c | 5 +++-- nscd/nscd_getserv_r.c | 5 +++-- nscd/nscd_helper.c | 27 +++++++++++++++++++-------- nscd/nscd_initgroups.c | 5 +++-- 9 files changed, 60 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index b584ec669d..a672e153bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,16 +1,29 @@ -2009-05-12 Jakub Jelinek - - * include/atomic.h: Formatting. - (catomic_compare_and_exchange_val_acq): Don't define if already - defined by bits/atomic.h. - 2009-05-14 Jakub Jelinek + * nscd/nscd_helper.c: Include stddef.h. + (__nscd_cache_search): Add datalen argument. Use atomic_forced_read + in a couple of places. Return NULL if trail is not less than + datasize, don't consider dataheads with length smaller than + offsetof (struct datahead, data) + datalen. + * nscd/nscd_client.h (__nscd_cache_search): Adjust prototype. + * nscd/nscd_gethst_r.c (nscd_gethst_r): Adjust callers. + * nscd/nscd_getpw_r.c (nscd_getpw_r): Likewise. + * nscd/nscd_getgr_r.c (nscd_getgr_r): Likewise. + * nscd/nscd_getai.c (__nscd_getai): Likewise. + * nscd/nscd_initgroups.c (__nscd_getgrouplist): Likewise. + * nscd/nscd_getserv_r.c (nscd_getserv_r): Likewise. + * nscd/selinux.c (nscd_avc_destroy): Removed. * nscd/selinux.h (nscd_avc_destroy): Likewise. * nscd/nscd.c (termination_handler): Don't call nscd_avc_destroy. +2009-05-12 Jakub Jelinek + + * include/atomic.h: Formatting. + (catomic_compare_and_exchange_val_acq): Don't define if already + defined by bits/atomic.h. + 2009-05-10 Ulrich Drepper * version.h (VERSION): Bump to 2.10.1. diff --git a/nscd/nscd-client.h b/nscd/nscd-client.h index 3c9688fd30..f66a658d2a 100644 --- a/nscd/nscd-client.h +++ b/nscd/nscd-client.h @@ -1,4 +1,4 @@ -/* Copyright (c) 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2007 +/* Copyright (c) 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1998. @@ -329,7 +329,8 @@ static inline int __nscd_drop_map_ref (struct mapped_database *map, extern struct datahead *__nscd_cache_search (request_type type, const char *key, size_t keylen, - const struct mapped_database *mapped); + const struct mapped_database *mapped, + size_t datalen); /* Wrappers around read, readv and write that only read/write less than LEN bytes on error or EOF. */ diff --git a/nscd/nscd_getai.c b/nscd/nscd_getai.c index 674a5e7514..d1c5cd14e9 100644 --- a/nscd/nscd_getai.c +++ b/nscd/nscd_getai.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2004. @@ -75,7 +76,7 @@ __nscd_getai (const char *key, struct nscd_ai_result **result, int *h_errnop) if (mapped != NO_MAPPING) { struct datahead *found = __nscd_cache_search (GETAI, key, keylen, - mapped); + mapped, sizeof ai_resp); if (found != NULL) { respdata = (char *) (&found->data[0].aidata + 1); diff --git a/nscd/nscd_getgr_r.c b/nscd/nscd_getgr_r.c index b84b06b3ce..c2d204c3c8 100644 --- a/nscd/nscd_getgr_r.c +++ b/nscd/nscd_getgr_r.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2000, 2002-2005, 2006, 2007 +/* Copyright (C) 1998-2000, 2002-2005, 2006, 2007, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1998. @@ -107,7 +107,8 @@ nscd_getgr_r (const char *key, size_t keylen, request_type type, if (mapped != NO_MAPPING) { - struct datahead *found = __nscd_cache_search (type, key, keylen, mapped); + struct datahead *found = __nscd_cache_search (type, key, keylen, mapped, + sizeof gr_resp); if (found != NULL) { len = (const uint32_t *) (&found->data[0].grdata + 1); diff --git a/nscd/nscd_gethst_r.c b/nscd/nscd_gethst_r.c index aea8288594..70631fa961 100644 --- a/nscd/nscd_gethst_r.c +++ b/nscd/nscd_gethst_r.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1998-2005, 2006, 2007, 2008 Free Software Foundation, Inc. +/* Copyright (C) 1998-2005, 2006, 2007, 2008, 2009 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -137,7 +138,8 @@ nscd_gethst_r (const char *key, size_t keylen, request_type type, if (mapped != NO_MAPPING) { /* No const qualifier, as it can change during garbage collection. */ - struct datahead *found = __nscd_cache_search (type, key, keylen, mapped); + struct datahead *found = __nscd_cache_search (type, key, keylen, mapped, + sizeof hst_resp); if (found != NULL) { h_name = (char *) (&found->data[0].hstdata + 1); diff --git a/nscd/nscd_getpw_r.c b/nscd/nscd_getpw_r.c index 21f792bb4e..8a4449d186 100644 --- a/nscd/nscd_getpw_r.c +++ b/nscd/nscd_getpw_r.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2003, 2004, 2005, 2007 +/* Copyright (C) 1998, 1999, 2003, 2004, 2005, 2007, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1998. @@ -104,7 +104,8 @@ nscd_getpw_r (const char *key, size_t keylen, request_type type, if (mapped != NO_MAPPING) { - struct datahead *found = __nscd_cache_search (type, key, keylen, mapped); + struct datahead *found = __nscd_cache_search (type, key, keylen, mapped, + sizeof pw_resp); if (found != NULL) { pw_name = (const char *) (&found->data[0].pwdata + 1); diff --git a/nscd/nscd_getserv_r.c b/nscd/nscd_getserv_r.c index b1ad7e2e43..dce4165482 100644 --- a/nscd/nscd_getserv_r.c +++ b/nscd/nscd_getserv_r.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2007 Free Software Foundation, Inc. +/* Copyright (C) 2007, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2007. @@ -104,7 +104,8 @@ nscd_getserv_r (const char *crit, size_t critlen, const char *proto, if (mapped != NO_MAPPING) { - struct datahead *found = __nscd_cache_search (type, key, keylen, mapped); + struct datahead *found = __nscd_cache_search (type, key, keylen, mapped, + sizeof serv_resp); if (found != NULL) { diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c index cd3fa24196..db247962b9 100644 --- a/nscd/nscd_helper.c +++ b/nscd/nscd_helper.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -472,18 +473,20 @@ __nscd_get_map_ref (request_type type, const char *name, garbage collection. */ struct datahead * __nscd_cache_search (request_type type, const char *key, size_t keylen, - const struct mapped_database *mapped) + const struct mapped_database *mapped, size_t datalen) { unsigned long int hash = __nis_hash (key, keylen) % mapped->head->module; size_t datasize = mapped->datasize; ref_t trail = mapped->head->array[hash]; + trail = atomic_forced_read (trail); ref_t work = trail; int tick = 0; while (work != ENDREF && work + sizeof (struct hashentry) <= datasize) { struct hashentry *here = (struct hashentry *) (mapped->data + work); + ref_t here_key, here_packet; #ifndef _STRING_ARCH_unaligned /* Although during garbage collection when moving struct hashentry @@ -498,13 +501,14 @@ __nscd_cache_search (request_type type, const char *key, size_t keylen, if (type == here->type && keylen == here->len - && here->key + keylen <= datasize - && memcmp (key, mapped->data + here->key, keylen) == 0 - && here->packet + sizeof (struct datahead) <= datasize) + && (here_key = atomic_forced_read (here->key)) + keylen <= datasize + && memcmp (key, mapped->data + here_key, keylen) == 0 + && ((here_packet = atomic_forced_read (here->packet)) + + sizeof (struct datahead) <= datasize)) { /* We found the entry. Increment the appropriate counter. */ struct datahead *dh - = (struct datahead *) (mapped->data + here->packet); + = (struct datahead *) (mapped->data + here_packet); #ifndef _STRING_ARCH_unaligned if ((uintptr_t) dh & (__alignof__ (*dh) - 1)) @@ -513,11 +517,14 @@ __nscd_cache_search (request_type type, const char *key, size_t keylen, /* See whether we must ignore the entry or whether something is wrong because garbage collection is in progress. */ - if (dh->usable && here->packet + dh->allocsize <= datasize) + if (dh->usable + && here_packet + dh->allocsize <= datasize + && (here_packet + offsetof (struct datahead, data) + datalen + <= datasize)) return dh; } - work = here->next; + work = atomic_forced_read (here->next); /* Prevent endless loops. This should never happen but perhaps the database got corrupted, accidentally or deliberately. */ if (work == trail) @@ -532,7 +539,11 @@ __nscd_cache_search (request_type type, const char *key, size_t keylen, if ((uintptr_t) trailelem & (__alignof__ (*trailelem) - 1)) return NULL; #endif - trail = trailelem->next; + + if (trail + sizeof (struct hashentry) > datasize) + return NULL; + + trail = atomic_forced_read (trailelem->next); } tick = 1 - tick; } diff --git a/nscd/nscd_initgroups.c b/nscd/nscd_initgroups.c index 866455a96c..5ff60c080c 100644 --- a/nscd/nscd_initgroups.c +++ b/nscd/nscd_initgroups.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2004. @@ -55,7 +55,8 @@ __nscd_getgrouplist (const char *user, gid_t group, long int *size, if (mapped != NO_MAPPING) { struct datahead *found = __nscd_cache_search (INITGROUPS, user, - userlen, mapped); + userlen, mapped, + sizeof initgr_resp); if (found != NULL) { respdata = (char *) (&found->data[0].initgrdata + 1); -- cgit v1.2.3 From 4c7cb20430af51ddebf270b423d5c4aec3b9f770 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 15 May 2009 21:33:43 -0700 Subject: Further robustify nscd database lookup. We can compute an absolute maximum for the number of elements which can fit into the currently mapped database. Stop after that many iterations. (cherry picked from commit 831a40494d44045c0caaf8085ab1d35c0da23140) --- ChangeLog | 9 +++++++++ nscd/nscd-client.h | 7 ++++++- nscd/nscd.h | 5 ----- nscd/nscd_helper.c | 3 ++- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index a672e153bc..9001fb73c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-05-15 Ulrich Drepper + + * nscd/nscd.h: Move Definition for BLOCK_ALIGN_LOG, BLOCK_ALIGN, and + BLOCK_ALIGN_M1 to ... + * nscd/nscd-client.h: ...here. + * nscd/nscd_helper.c (__nscd_cache_search): Introduce loop counter. + Use it if we absolutely cannot reach any more correct list elements + because that many do not fit into the currently mapped database. + 2009-05-14 Jakub Jelinek * nscd/nscd_helper.c: Include stddef.h. diff --git a/nscd/nscd-client.h b/nscd/nscd-client.h index f66a658d2a..81ca3d56b9 100644 --- a/nscd/nscd-client.h +++ b/nscd/nscd-client.h @@ -44,9 +44,14 @@ /* Path for the configuration file. */ #define _PATH_NSCDCONF "/etc/nscd.conf" -/* Maximu allowed length for the key. */ +/* Maximum allowed length for the key. */ #define MAXKEYLEN 1024 +/* Maximum alignment requirement we will encounter. */ +#define BLOCK_ALIGN_LOG 3 +#define BLOCK_ALIGN (1 << BLOCK_ALIGN_LOG) +#define BLOCK_ALIGN_M1 (BLOCK_ALIGN - 1) + /* Available services. */ typedef enum diff --git a/nscd/nscd.h b/nscd/nscd.h index 3279b85432..632bf58dc5 100644 --- a/nscd/nscd.h +++ b/nscd/nscd.h @@ -111,11 +111,6 @@ struct database_dyn /* Path used when not using persistent storage. */ #define _PATH_NSCD_XYZ_DB_TMP "/var/run/nscd/dbXXXXXX" -/* Maximum alignment requirement we will encounter. */ -#define BLOCK_ALIGN_LOG 3 -#define BLOCK_ALIGN (1 << BLOCK_ALIGN_LOG) -#define BLOCK_ALIGN_M1 (BLOCK_ALIGN - 1) - /* Default value for the maximum size of the database files. */ #define DEFAULT_MAX_DB_SIZE (32 * 1024 * 1024) diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c index db247962b9..80ee3e1dd9 100644 --- a/nscd/nscd_helper.c +++ b/nscd/nscd_helper.c @@ -481,6 +481,7 @@ __nscd_cache_search (request_type type, const char *key, size_t keylen, ref_t trail = mapped->head->array[hash]; trail = atomic_forced_read (trail); ref_t work = trail; + size_t loop_cnt = datasize / (offsetof (struct datahead, data) + datalen); int tick = 0; while (work != ENDREF && work + sizeof (struct hashentry) <= datasize) @@ -527,7 +528,7 @@ __nscd_cache_search (request_type type, const char *key, size_t keylen, work = atomic_forced_read (here->next); /* Prevent endless loops. This should never happen but perhaps the database got corrupted, accidentally or deliberately. */ - if (work == trail) + if (work == trail || loop_cnt-- > 0) break; if (tick) { -- cgit v1.2.3 From 223e614dafc55a14889355e95367e216d2fd320e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 16 May 2009 10:10:32 -0700 Subject: Fix exit condition. The patch to bound the search in the nscd caches used a wrong exit condition. Fixed now. (cherry picked from commit 95410b7ba23c44f6a038285d9c38ee84129e4cd6) --- ChangeLog | 5 +++++ nscd/nscd_helper.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9001fb73c4..7d551881ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-05-16 Ulrich Drepper + + * nscd/nscd_helper.c (__nscd_cache_search): Fix exit condition in last + patch. + 2009-05-15 Ulrich Drepper * nscd/nscd.h: Move Definition for BLOCK_ALIGN_LOG, BLOCK_ALIGN, and diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c index 80ee3e1dd9..c09f00859e 100644 --- a/nscd/nscd_helper.c +++ b/nscd/nscd_helper.c @@ -528,7 +528,7 @@ __nscd_cache_search (request_type type, const char *key, size_t keylen, work = atomic_forced_read (here->next); /* Prevent endless loops. This should never happen but perhaps the database got corrupted, accidentally or deliberately. */ - if (work == trail || loop_cnt-- > 0) + if (work == trail || loop_cnt-- == 0) break; if (tick) { -- cgit v1.2.3 From e856702a047ee2cf4e7d3153d6adc8b740803770 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 16 May 2009 10:29:43 -0700 Subject: Move BLOCK_ALIGN* macros back. The move to nscd-client.h was only needed for some interim version of the patch. The final version doesn't need it. Undo the change. (cherry picked from commit fa546abe9d0346d5d87b8fe19884993408476d77) --- ChangeLog | 3 --- nscd/nscd-client.h | 5 ----- nscd/nscd.h | 5 +++++ 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7d551881ba..eceae0be38 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,9 +5,6 @@ 2009-05-15 Ulrich Drepper - * nscd/nscd.h: Move Definition for BLOCK_ALIGN_LOG, BLOCK_ALIGN, and - BLOCK_ALIGN_M1 to ... - * nscd/nscd-client.h: ...here. * nscd/nscd_helper.c (__nscd_cache_search): Introduce loop counter. Use it if we absolutely cannot reach any more correct list elements because that many do not fit into the currently mapped database. diff --git a/nscd/nscd-client.h b/nscd/nscd-client.h index 81ca3d56b9..c6c09cbddd 100644 --- a/nscd/nscd-client.h +++ b/nscd/nscd-client.h @@ -47,11 +47,6 @@ /* Maximum allowed length for the key. */ #define MAXKEYLEN 1024 -/* Maximum alignment requirement we will encounter. */ -#define BLOCK_ALIGN_LOG 3 -#define BLOCK_ALIGN (1 << BLOCK_ALIGN_LOG) -#define BLOCK_ALIGN_M1 (BLOCK_ALIGN - 1) - /* Available services. */ typedef enum diff --git a/nscd/nscd.h b/nscd/nscd.h index 632bf58dc5..3279b85432 100644 --- a/nscd/nscd.h +++ b/nscd/nscd.h @@ -111,6 +111,11 @@ struct database_dyn /* Path used when not using persistent storage. */ #define _PATH_NSCD_XYZ_DB_TMP "/var/run/nscd/dbXXXXXX" +/* Maximum alignment requirement we will encounter. */ +#define BLOCK_ALIGN_LOG 3 +#define BLOCK_ALIGN (1 << BLOCK_ALIGN_LOG) +#define BLOCK_ALIGN_M1 (BLOCK_ALIGN - 1) + /* Default value for the maximum size of the database files. */ #define DEFAULT_MAX_DB_SIZE (32 * 1024 * 1024) -- cgit v1.2.3 From 94c11628f5d077da7ce5372019ab3af73efb67f3 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 16 May 2009 11:39:39 -0700 Subject: Unify __WAIT_INT definition in stdlib.h and sys/wait.h. This fixes BZ #10159. The stdlib.