This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch hjl/pr21740 created. glibc-2.25-735-gb13306f


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, hjl/pr21740 has been created
        at  b13306f7e0f76b1d327bdc2421a7b9cbfdecd470 (commit)

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b13306f7e0f76b1d327bdc2421a7b9cbfdecd470

commit b13306f7e0f76b1d327bdc2421a7b9cbfdecd470
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sun Jul 9 08:39:17 2017 -0700

    Add __stack_chk_fail_local alias only to libc.so [BZ #21740]
    
    commit 524a8ef2ad76af8ac049293d993a1856b0d888fb
    Author: Nick Alcock <nick.alcock@oracle.com>
    Date:   Mon Dec 26 10:08:57 2016 +0100
    
        PLT avoidance for __stack_chk_fail [BZ #7065]
    
        Add a hidden __stack_chk_fail_local alias to libc.so,
        and make sure that on targets which use __stack_chk_fail,
        this does not introduce a local PLT reference into libc.so.
    
    unconditionally added
    
    strong_alias (__stack_chk_fail, __stack_chk_fail_local)
    
    Since libc.a and libc_nonshared.a has debug/stack_chk_fail_local.c,
    __stack_chk_fail_local alias should be limited to libc.so.
    
    Tested on x86-64 with --enable-stack-protector=all and got
    
    FAIL: elf/tst-env-setuid
    FAIL: elf/tst-env-setuid-tunables
    FAIL: stdlib/tst-secure-getenv
    
    which are the same as without this patch.
    
    	[BZ #21740]
    	* debug/stack_chk_fail.c (__stack_chk_fail_local): Add the
    	alias only if SHARED is defined.

diff --git a/debug/stack_chk_fail.c b/debug/stack_chk_fail.c
index 9ab9bc7..4b099b5 100644
--- a/debug/stack_chk_fail.c
+++ b/debug/stack_chk_fail.c
@@ -29,4 +29,8 @@ __stack_chk_fail (void)
   __fortify_fail_abort (false, "stack smashing detected");
 }
 
+#ifdef SHARED
+/* Some targets call __stack_chk_fail_local as a hidden function within
+   libc.so.  */
 strong_alias (__stack_chk_fail, __stack_chk_fail_local)
+#endif

-----------------------------------------------------------------------


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]