cvs commit: patches/zlib zlib-1.2.1-pax-fPIC-1.patch zlib-1.2.1-pax-glibc-1.patch

tushar at linuxfromscratch.org tushar at linuxfromscratch.org
Sat Mar 27 16:04:18 PST 2004


tushar      04/03/27 17:04:18

  Added:       glibc    glibc-2.3.3-got-fix-1.patch
                        glibc-2.3.3-owl-malloc-unlink-sanity-check-1.patch
  Removed:     gcc      gcc-3.3.1-bounds-checking-1.patch
                        gcc-3.3.2-bounds-checking-1.patch
                        gcc-3.3.2-pie-1.patch gcc-3.3.3-autopie-x86-1.patch
               zlib     zlib-1.2.1-pax-fPIC-1.patch
                        zlib-1.2.1-pax-glibc-1.patch
  Log:
  Added ssp patches
  
  Revision  Changes    Path
  1.1                  patches/glibc/glibc-2.3.3-got-fix-1.patch
  
  Index: glibc-2.3.3-got-fix-1.patch
  ===================================================================
  Submitted By: Robert Connolly <cendres at videotron dot ca> (ashes)
  Date: 2004-02-08
  Initial Package Version: 2.3.3
  Origin: http://dev.gentoo.org/~solar/glibc-2.3.3-got-fix.diff
  Description: This is a bugfix:
  "GOTOFF during linking seems to fail to recognize where main() is because it is
  not visible in the object linked which might not be really legal C but it
  apparently works anyway."
  This bug shows up in bind9's testsuite.
  http://www.gentoo.org/proj/en/hardened/
  http://www.linuxfromscratch.org/~robert/winter/Linux/
  
  --- glibc-2.3.2/sysdeps/i386/elf/start.S	2004-02-05 18:14:37.000000000 +0100
  +++ glibc-2.3.2/sysdeps/i386/elf/start.S	2004-02-05 23:32:16.000000000 +0100
  @@ -73,16 +73,13 @@ _start:
   	addl $_GLOBAL_OFFSET_TABLE_, %ebx
   
   	/* Push address of our own entry points to .fini and .init.  */
  -	leal __libc_csu_fini at GOTOFF(%ebx), %eax
  -	pushl %eax
  -	leal __libc_csu_init at GOTOFF(%ebx), %eax
  -	pushl %eax
  +	pushl __libc_csu_fini at GOT(%ebx)
  +	pushl __libc_csu_init at GOT(%ebx)
   
   	pushl %ecx		/* Push second argument: argv.  */
   	pushl %esi		/* Push first argument: argc.  */
   
  -	leal BP_SYM (main)@GOTOFF(%ebx), %eax
  -	pushl %eax
  +	pushl BP_SYM (main)@GOT(%ebx)
   
   	/* Call the user's main function, and exit with its value.
   	   But let the libc call main.    */
  
  
  
  1.1                  patches/glibc/glibc-2.3.3-owl-malloc-unlink-sanity-check-1.patch
  
  Index: glibc-2.3.3-owl-malloc-unlink-sanity-check-1.patch
  ===================================================================
  Submitted By: Robert Connolly <cendres at videotron dot ca> (ashes)
  Date: 2004-02-26
  Initial Package Version: 2.3.3
  Origin: http://www.openwall.com/Owl/
  http://www.gtlib.cc.gatech.edu/pub/gentoo/gentoo-x86-portage/sys-libs/glibc/\
  	files/2.3.3/glibc-2.3.3-owl-malloc-unlink-sanity-check.diff
  Description: A sanity fix from the Owl Linux Project.
  http://www.linuxfromscratch.org/~robert/winter/
  
  diff -Naur glibc-2.3.3-20040213.orig/malloc/malloc.c glibc-2.3.3-20040213/malloc/malloc.c
  --- glibc-2.3.3-20040213.orig/malloc/malloc.c	2003-12-17 23:31:28.000000000 +0000
  +++ glibc-2.3.3-20040213/malloc/malloc.c	2004-02-26 09:08:49.000000000 +0000
  @@ -315,6 +315,11 @@
   #define assert(x) ((void)0)
   #endif
   
  +/* needed for owl-malloc-unlink-sanity-check */
  +#include <abort-instr.h>
  +#ifndef ABORT_INSTRUCTION
  +#define ABORT_INSTRUCTION
  +#endif
   
   /*
     INTERNAL_SIZE_T is the word-size used for internal bookkeeping
  @@ -1954,6 +1959,14 @@
   #define unlink(P, BK, FD) {                                            \
     FD = P->fd;                                                          \
     BK = P->bk;                                                          \
  +  /* owl-malloc-unlink-sanity-check */                                 \
  +  if (FD->bk != P || BK->fd != P)                                      \
  +  {                                                                    \
  +    ABORT_INSTRUCTION;                                                 \
  +    _exit(127);                                                        \
  +    while (1)                                                          \
  +      ABORT_INSTRUCTION;                                               \
  +  }                                                                    \
     FD->bk = BK;                                                         \
     BK->fd = FD;                                                         \
   }
  
  
  



More information about the patches mailing list