]> Git Repo - uclibc-ng.git/commitdiff
ssp: remove SSP legacy code
authorWaldemar Brodkorb <[email protected]>
Tue, 7 Jun 2016 02:14:23 +0000 (04:14 +0200)
committerWaldemar Brodkorb <[email protected]>
Tue, 7 Jun 2016 02:14:23 +0000 (04:14 +0200)
Nobody should use gcc 3.3 nowadays.

extra/Configs/Config.in
ldso/ldso/ldso.c
libc/misc/internals/__uClibc_main.c
libc/sysdeps/linux/common/ssp.c

index f3494db99877a391f9aece4c8ab39fca76d77220..a21bdac2f4702ec3424bc4c5193e7dd8c555ab15 100644 (file)
@@ -2151,22 +2151,6 @@ config UCLIBC_HAS_SSP
 
          Most people will answer N.
 
-config UCLIBC_HAS_SSP_COMPAT
-       bool "Support for gcc-3.x propolice smashing stack protector"
-       depends on UCLIBC_HAS_SSP
-       help
-         Add gcc-3.x propolice smashing stack protector to the library.
-
-         This requires a patched version of GCC, supporting the
-         -fstack-protector[-all] options, with the __guard and
-         __stack_smash_handler functions removed from libgcc.
-         These functions are added to ldso/libc instead.
-
-         More information at:
-         <http://www.research.ibm.com/trl/projects/security/ssp/>
-
-         Most people will answer N.
-
 config SSP_QUICK_CANARY
        bool "Use simple guard values without accessing /dev/urandom"
        depends on UCLIBC_HAS_SSP
index 9f4e84130d5703bee2f31fe6a015d48274818e50..7bb6a349b4e975be4b52c495c1c05802c120cf5c 100644 (file)
@@ -120,9 +120,6 @@ static uintptr_t stack_chk_guard;
  * in local thread area.  */
 uintptr_t __stack_chk_guard attribute_relro;
 # endif
-# ifdef __UCLIBC_HAS_SSP_COMPAT__
-uintptr_t __guard attribute_relro;
-# endif
 #endif
 
 #ifdef __LDSO_SEARCH_INTERP_PATH__
@@ -1217,9 +1214,6 @@ of this helper program; chances are you did not intend to run this program.\n\
 # else
        __stack_chk_guard = stack_chk_guard;
 # endif
-# ifdef __UCLIBC_HAS_SSP_COMPAT__
-       __guard = stack_chk_guard;
-# endif
 #endif
 
 #ifdef __LDSO_PRELINK_SUPPORT__
index 632a2528ee8d3f752ea56ccab0da51574b2e8e67..9bb81fc839eda9648e6deec48a2994f3e5ff0d5c 100644 (file)
@@ -61,10 +61,6 @@ static uintptr_t stack_chk_guard;
 /* for gcc-4.1 non-TLS */
 uintptr_t __stack_chk_guard attribute_relro;
 #  endif
-/* for gcc-3.x + Etoh ssp */
-#  ifdef __UCLIBC_HAS_SSP_COMPAT__
-uintptr_t __guard attribute_relro;
-#  endif
 # endif
 
 /*
@@ -274,9 +270,6 @@ void __uClibc_init(void)
 #  else
     __stack_chk_guard = stack_chk_guard;
 #  endif
-#  ifdef __UCLIBC_HAS_SSP_COMPAT__
-    __guard = stack_chk_guard;
-#  endif
 # endif
 #endif
 
index 8dcc3dc591605e747b11035726e5a243e76882bb..87e10c2da2a0982ea2c4d7d2846e1e74d7085afa 100644 (file)
@@ -51,18 +51,11 @@ static void __cold do_msg(const char *msg1, const char *msg2, const char *msg3)
 }
 
 static void __cold attribute_noreturn
-#ifdef __UCLIBC_HAS_SSP_COMPAT__
-ssp_handler(char func[])
-#else
 ssp_handler(void)
-#endif
 {
        pid_t pid;
        static const char msg_ssd[] = "*** stack smashing detected ***: ";
        static const char msg_terminated[] = " terminated";
-#ifdef __UCLIBC_HAS_SSP_COMPAT__
-       static const char msg_ssa[] = ": stack smashing attack in function ";
-#endif
 
 #ifdef __DODEBUG__
        struct sigaction sa;
@@ -73,12 +66,7 @@ ssp_handler(void)
        sigprocmask(SIG_BLOCK, &mask, NULL);    /* except SSP_SIGTYPE */
 #endif
 
-#ifdef __UCLIBC_HAS_SSP_COMPAT__
-       if (func != NULL)
-               do_msg(__uclibc_progname, msg_ssa, func);
-       else
-#endif
-               do_msg(msg_ssd, __uclibc_progname, msg_terminated);
+       do_msg(msg_ssd, __uclibc_progname, msg_terminated);
 
        pid = getpid();
 #ifdef __DODEBUG__
@@ -96,20 +84,7 @@ ssp_handler(void)
                _exit(127);
 }
 
-#ifdef __UCLIBC_HAS_SSP_COMPAT__
-void __stack_smash_handler(char func[], int damaged) attribute_noreturn __cold;
-void __stack_smash_handler(char func[], int damaged attribute_unused)
-{
-       ssp_handler(func);
-}
-
-void __stack_chk_fail(void)
-{
-       ssp_handler(NULL);
-}
-#else
 strong_alias(ssp_handler,__stack_chk_fail)
-#endif
 
 #ifdef __UCLIBC_HAS_FORTIFY__
 /* should be redone when activated to use common code above.
This page took 0.037768 seconds and 4 git commands to generate.