***** glibc-2.6-hardened-inittls-nosysenter.patch ***** ======================================================= PATCH COMMAND: patch -p0 -g0 -E --no-backup-if-mismatch < /usr/portage/sys-libs/glibc/files/2.6/glibc-2.6-hardened-inittls-nosysenter.patch ======================================================= patching file csu/libc-start.c Hunk #3 FAILED at 144. 1 out of 3 hunks FAILED -- saving rejects to file csu/libc-start.c.rej patching file csu/libc-tls.c patching file misc/sbrk.c patching file sysdeps/unix/sysv/linux/i386/brk.c patching file sysdeps/unix/sysv/linux/i386/sysdep.h ======================================================= PATCH COMMAND: patch -p1 -g0 -E --no-backup-if-mismatch < /usr/portage/sys-libs/glibc/files/2.6/glibc-2.6-hardened-inittls-nosysenter.patch ======================================================= can't find file to patch at input line 33 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |When building glibc PIE (which is not something upstream support), |several modifications are necessary to the glibc build process. | |First, any syscalls in PIEs must be of the PIC variant, otherwise |textrels ensue. Then, any syscalls made before the initialisation |of the TLS will fail on i386, as the sysenter variant on i386 uses |the TLS, giving rise to a chicken-and-egg situation. This patch |defines a PIC syscall variant that doesn't use sysenter, even when the sysenter |version is normally used, and uses the non-sysenter version for the brk |syscall that is performed by the TLS initialisation. Further, the TLS |initialisation is moved in this case prior to the initialisation of |dl_osversion, as that requires further syscalls. | |csu/libc-start.c: Move initial TLS initialization to before the |initialisation of dl_osversion, when INTERNAL_SYSCALL_NOSYSENTER is defined | |csu/libc-tls.c: Use the no-sysenter version of sbrk when |INTERNAL_SYSCALL_NOSYSENTER is defined. | |misc/sbrk.c: Define a no-sysenter version of sbrk, using the no-sysenter |version of brk - if INTERNAL_SYSCALL_NOSYSENTER is defined. | |misc/brk.c: Define a no-sysenter version of brk if |INTERNAL_SYSCALL_NOSYSENTER is defined. | |sysdeps/unix/sysv/linux/i386/sysdep.h: Define INTERNAL_SYSCALL_NOSYSENTER |Make INTERNAL_SYSCALL always use the PIC variant, even if not SHARED. | |Patch by Kevin F. Quinn | |--- csu/libc-start.c |+++ csu/libc-start.c -------------------------- No file to patch. Skipping patch. 3 out of 3 hunks ignored can't find file to patch at input line 68 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- csu/libc-tls.c |+++ csu/libc-tls.c -------------------------- No file to patch. Skipping patch. 3 out of 3 hunks ignored can't find file to patch at input line 116 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- misc/sbrk.c |+++ misc/sbrk.c -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored can't find file to patch at input line 162 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- sysdeps/unix/sysv/linux/i386/brk.c |+++ sysdeps/unix/sysv/linux/i386/brk.c -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 195 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- sysdeps/unix/sysv/linux/i386/sysdep.h |+++ sysdeps/unix/sysv/linux/i386/sysdep.h -------------------------- No file to patch. Skipping patch. 5 out of 5 hunks ignored ======================================================= PATCH COMMAND: patch -p2 -g0 -E --no-backup-if-mismatch < /usr/portage/sys-libs/glibc/files/2.6/glibc-2.6-hardened-inittls-nosysenter.patch ======================================================= missing header for unified diff at line 33 of patch can't find file to patch at input line 33 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |When building glibc PIE (which is not something upstream support), |several modifications are necessary to the glibc build process. | |First, any syscalls in PIEs must be of the PIC variant, otherwise |textrels ensue. Then, any syscalls made before the initialisation |of the TLS will fail on i386, as the sysenter variant on i386 uses |the TLS, giving rise to a chicken-and-egg situation. This patch |defines a PIC syscall variant that doesn't use sysenter, even when the sysenter |version is normally used, and uses the non-sysenter version for the brk |syscall that is performed by the TLS initialisation. Further, the TLS |initialisation is moved in this case prior to the initialisation of |dl_osversion, as that requires further syscalls. | |csu/libc-start.c: Move initial TLS initialization to before the |initialisation of dl_osversion, when INTERNAL_SYSCALL_NOSYSENTER is defined | |csu/libc-tls.c: Use the no-sysenter version of sbrk when |INTERNAL_SYSCALL_NOSYSENTER is defined. | |misc/sbrk.c: Define a no-sysenter version of sbrk, using the no-sysenter |version of brk - if INTERNAL_SYSCALL_NOSYSENTER is defined. | |misc/brk.c: Define a no-sysenter version of brk if |INTERNAL_SYSCALL_NOSYSENTER is defined. | |sysdeps/unix/sysv/linux/i386/sysdep.h: Define INTERNAL_SYSCALL_NOSYSENTER |Make INTERNAL_SYSCALL always use the PIC variant, even if not SHARED. | |Patch by Kevin F. Quinn | |--- csu/libc-start.c |+++ csu/libc-start.c -------------------------- No file to patch. Skipping patch. 3 out of 3 hunks ignored missing header for unified diff at line 68 of patch can't find file to patch at input line 68 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- csu/libc-tls.c |+++ csu/libc-tls.c -------------------------- No file to patch. Skipping patch. 3 out of 3 hunks ignored missing header for unified diff at line 116 of patch can't find file to patch at input line 116 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- misc/sbrk.c |+++ misc/sbrk.c -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored can't find file to patch at input line 162 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- sysdeps/unix/sysv/linux/i386/brk.c |+++ sysdeps/unix/sysv/linux/i386/brk.c -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 195 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- sysdeps/unix/sysv/linux/i386/sysdep.h |+++ sysdeps/unix/sysv/linux/i386/sysdep.h -------------------------- No file to patch. Skipping patch. 5 out of 5 hunks ignored ======================================================= PATCH COMMAND: patch -p3 -g0 -E --no-backup-if-mismatch < /usr/portage/sys-libs/glibc/files/2.6/glibc-2.6-hardened-inittls-nosysenter.patch ======================================================= missing header for unified diff at line 33 of patch can't find file to patch at input line 33 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |When building glibc PIE (which is not something upstream support), |several modifications are necessary to the glibc build process. | |First, any syscalls in PIEs must be of the PIC variant, otherwise |textrels ensue. Then, any syscalls made before the initialisation |of the TLS will fail on i386, as the sysenter variant on i386 uses |the TLS, giving rise to a chicken-and-egg situation. This patch |defines a PIC syscall variant that doesn't use sysenter, even when the sysenter |version is normally used, and uses the non-sysenter version for the brk |syscall that is performed by the TLS initialisation. Further, the TLS |initialisation is moved in this case prior to the initialisation of |dl_osversion, as that requires further syscalls. | |csu/libc-start.c: Move initial TLS initialization to before the |initialisation of dl_osversion, when INTERNAL_SYSCALL_NOSYSENTER is defined | |csu/libc-tls.c: Use the no-sysenter version of sbrk when |INTERNAL_SYSCALL_NOSYSENTER is defined. | |misc/sbrk.c: Define a no-sysenter version of sbrk, using the no-sysenter |version of brk - if INTERNAL_SYSCALL_NOSYSENTER is defined. | |misc/brk.c: Define a no-sysenter version of brk if |INTERNAL_SYSCALL_NOSYSENTER is defined. | |sysdeps/unix/sysv/linux/i386/sysdep.h: Define INTERNAL_SYSCALL_NOSYSENTER |Make INTERNAL_SYSCALL always use the PIC variant, even if not SHARED. | |Patch by Kevin F. Quinn | |--- csu/libc-start.c |+++ csu/libc-start.c -------------------------- No file to patch. Skipping patch. 3 out of 3 hunks ignored missing header for unified diff at line 68 of patch can't find file to patch at input line 68 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- csu/libc-tls.c |+++ csu/libc-tls.c -------------------------- No file to patch. Skipping patch. 3 out of 3 hunks ignored missing header for unified diff at line 116 of patch can't find file to patch at input line 116 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- misc/sbrk.c |+++ misc/sbrk.c -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored can't find file to patch at input line 162 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- sysdeps/unix/sysv/linux/i386/brk.c |+++ sysdeps/unix/sysv/linux/i386/brk.c -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 195 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- sysdeps/unix/sysv/linux/i386/sysdep.h |+++ sysdeps/unix/sysv/linux/i386/sysdep.h -------------------------- No file to patch. Skipping patch. 5 out of 5 hunks ignored ======================================================= PATCH COMMAND: patch -p4 -g0 -E --no-backup-if-mismatch < /usr/portage/sys-libs/glibc/files/2.6/glibc-2.6-hardened-inittls-nosysenter.patch ======================================================= missing header for unified diff at line 33 of patch can't find file to patch at input line 33 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |When building glibc PIE (which is not something upstream support), |several modifications are necessary to the glibc build process. | |First, any syscalls in PIEs must be of the PIC variant, otherwise |textrels ensue. Then, any syscalls made before the initialisation |of the TLS will fail on i386, as the sysenter variant on i386 uses |the TLS, giving rise to a chicken-and-egg situation. This patch |defines a PIC syscall variant that doesn't use sysenter, even when the sysenter |version is normally used, and uses the non-sysenter version for the brk |syscall that is performed by the TLS initialisation. Further, the TLS |initialisation is moved in this case prior to the initialisation of |dl_osversion, as that requires further syscalls. | |csu/libc-start.c: Move initial TLS initialization to before the |initialisation of dl_osversion, when INTERNAL_SYSCALL_NOSYSENTER is defined | |csu/libc-tls.c: Use the no-sysenter version of sbrk when |INTERNAL_SYSCALL_NOSYSENTER is defined. | |misc/sbrk.c: Define a no-sysenter version of sbrk, using the no-sysenter |version of brk - if INTERNAL_SYSCALL_NOSYSENTER is defined. | |misc/brk.c: Define a no-sysenter version of brk if |INTERNAL_SYSCALL_NOSYSENTER is defined. | |sysdeps/unix/sysv/linux/i386/sysdep.h: Define INTERNAL_SYSCALL_NOSYSENTER |Make INTERNAL_SYSCALL always use the PIC variant, even if not SHARED. | |Patch by Kevin F. Quinn | |--- csu/libc-start.c |+++ csu/libc-start.c -------------------------- No file to patch. Skipping patch. 3 out of 3 hunks ignored missing header for unified diff at line 68 of patch can't find file to patch at input line 68 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- csu/libc-tls.c |+++ csu/libc-tls.c -------------------------- No file to patch. Skipping patch. 3 out of 3 hunks ignored missing header for unified diff at line 116 of patch can't find file to patch at input line 116 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- misc/sbrk.c |+++ misc/sbrk.c -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored can't find file to patch at input line 162 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- sysdeps/unix/sysv/linux/i386/brk.c |+++ sysdeps/unix/sysv/linux/i386/brk.c -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 195 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- sysdeps/unix/sysv/linux/i386/sysdep.h |+++ sysdeps/unix/sysv/linux/i386/sysdep.h -------------------------- No file to patch. Skipping patch. 5 out of 5 hunks ignored