I tried out the patch. It applies, and newly installed /usr/local/glibc2/include/bits/poll2.h is properly patched, but still gcc -I/usr/local/glibc2/include/ -march=i686 -m32 -O -g -D_FORTIFY_SOURCE=2 -c poll.c tries to use raw ppoll(), not __ppoll64(). Am I missing something? Output of gcc -I/usr/local/glibc2/include/ -march=i686 -m32 -O -g -D_FORTIFY_SOURCE=2 -E poll.c is attached. Platform: i586-redhat-linux (running on x64_64 kernel, i686 userland) https://sourceware.org/bugzilla/show_bug.cgi?id=29746 adhemerval.zanella@linaro.org sed in <20221104193424.567103-1-adhemerval.zanella@linaro.org> >> Similar to ppoll, the poll.h header needs to redirect the poll call >> to a proper fortified ppoll with 64 bit time_t support. >> >> The implementation is straightforward, just need to add a similar >> check as __poll_chk and call the 64 bit time_t ppoll version. The >> debug fortify tests are also extended to cover 64 bit time_t for >> affected ABIs. >> >> Unfortunately it requires an aditional symbol, which makes backport >> tricky. One possibility is to add a static inline version if compiler >> supports is and call abort instead of __chk_fail, so fortified version >> will call __poll64 in the end. >> >> Checked on i686-linux-gnu. >> --- >> debug/Makefile | 39 ++++++++++++----- >> include/sys/poll.h | 10 ++++- >> io/bits/poll2.h | 25 +++++++++++ >> sysdeps/unix/sysv/linux/Versions | 5 +++ >> sysdeps/unix/sysv/linux/arm/be/libc.abilist | 1 + >> sysdeps/unix/sysv/linux/arm/le/libc.abilist | 1 + >> sysdeps/unix/sysv/linux/csky/libc.abilist | 1 + >> sysdeps/unix/sysv/linux/hppa/libc.abilist | 1 + >> sysdeps/unix/sysv/linux/i386/libc.abilist | 1 + >> .../sysv/linux/m68k/coldfire/libc.abilist | 1 + >> .../unix/sysv/linux/m68k/m680x0/libc.abilist | 1 + >> .../sysv/linux/microblaze/be/libc.abilist | 1 + >> .../sysv/linux/microblaze/le/libc.abilist | 1 + >> .../sysv/linux/mips/mips32/fpu/libc.abilist | 1 + >> .../sysv/linux/mips/mips32/nofpu/libc.abilist | 1 + >> .../sysv/linux/mips/mips64/n32/libc.abilist | 1 + >> sysdeps/unix/sysv/linux/nios2/libc.abilist | 1 + >> .../linux/powerpc/powerpc32/fpu/libc.abilist | 1 + >> .../powerpc/powerpc32/nofpu/libc.abilist | 1 + >> sysdeps/unix/sysv/linux/ppoll_chk.c | 42 +++++++++++++++++++ >> .../unix/sysv/linux/s390/s390-32/libc.abilist | 1 + >> sysdeps/unix/sysv/linux/sh/be/libc.abilist | 1 + >> sysdeps/unix/sysv/linux/sh/le/libc.abilist | 1 + >> .../sysv/linux/sparc/sparc32/libc.abilist | 1 + >> 24 files changed, 128 insertions(+), 12 deletions(-) >> create mode 100644 sysdeps/unix/sysv/linux/ppoll_chk.c >> >> diff --git a/debug/Makefile b/debug/Makefile >> index 99cdf3221b..9424f0348b 100644 >> --- a/debug/Makefile >> +++ b/debug/Makefile