longjmp_chk.patch 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. diff -Nur glibc-2.11.orig/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S glibc-2.11/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S
  2. --- glibc-2.11.orig/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S 2009-10-30 18:17:08.000000000 +0100
  3. +++ glibc-2.11/sysdeps/unix/sysv/linux/i386/____longjmp_chk.S 2010-02-19 08:06:22.000000000 +0100
  4. @@ -33,10 +33,10 @@
  5. cfi_register(%ebx,%ecx); \
  6. LOAD_PIC_REG (bx); \
  7. leal longjmp_msg@GOTOFF(%ebx), %eax; \
  8. - call __GI___fortify_fail@PLT
  9. + call HIDDEN_JUMPTARGET(__fortify_fail)
  10. #else
  11. # define CALL_FAIL movl $longjmp_msg, %eax; \
  12. - call __fortify_fail
  13. + call HIDDEN_JUMPTARGET(__fortify_fail)
  14. #endif
  15. diff -Nur glibc-2.11.orig/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S glibc-2.11/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S
  16. --- glibc-2.11.orig/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S 2009-10-30 18:17:08.000000000 +0100
  17. +++ glibc-2.11/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S 2010-02-19 08:06:22.000000000 +0100
  18. @@ -30,19 +30,13 @@
  19. #define __longjmp ____longjmp_chk
  20. -#ifdef PIC
  21. -# define CALL_FAIL __GI___fortify_fail
  22. -#else
  23. -# define CALL_FAIL __fortify_fail
  24. -#endif
  25. -
  26. #define CHECK_RSP(reg) \
  27. cmp.ltu p0, p8 = reg, r12; \
  28. (p8) br.cond.dpnt .Lok;; \
  29. addl r28 = @ltoffx(longjmp_msg#), r1;; \
  30. ld8.mov r28 = [r28], longjmp_msg#;; \
  31. ld8 out0 = [r28]; \
  32. - br.call.sptk.many b0 = CALL_FAIL#;; \
  33. + br.call.sptk.many b0 = HIDDEN_JUMPTARGET(__fortify_fail)#;; \
  34. .Lok:
  35. #include "__longjmp.S"
  36. diff -Nur glibc-2.11.orig/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S glibc-2.11/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S
  37. --- glibc-2.11.orig/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S 2009-10-30 18:17:08.000000000 +0100
  38. +++ glibc-2.11/sysdeps/unix/sysv/linux/x86_64/____longjmp_chk.S 2010-02-19 08:06:22.000000000 +0100
  39. @@ -31,10 +31,10 @@
  40. #ifdef PIC
  41. # define CALL_FAIL leaq longjmp_msg(%rip), %rdi; \
  42. - call __GI___fortify_fail
  43. + call HIDDEN_JUMPTARGET(__fortify_fail)
  44. #else
  45. # define CALL_FAIL movq $longjmp_msg, %rdi; \
  46. - call __fortify_fail
  47. + call HIDDEN_JUMPTARGET(__fortify_fail)
  48. #endif
  49. #define CHECK_RSP(reg) \