This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/21752] __stack_chk_fail should do as little work as possible
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sat, 22 Jul 2017 00:31:21 +0000
- Subject: [Bug libc/21752] __stack_chk_fail should do as little work as possible
- Auto-submitted: auto-generated
- References: <bug-21752-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=21752
--- Comment #7 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
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/pie/static has been created
at 1325c9e854e0abdedbc7629a939764857fcb921c (commit)
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1325c9e854e0abdedbc7629a939764857fcb921c
commit 1325c9e854e0abdedbc7629a939764857fcb921c
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jul 19 14:32:42 2017 -0700
Add _startup_sbrk and _startup_fatal
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0dbc8246f4629ba08b3a815260db833d625d59d0
commit 0dbc8246f4629ba08b3a815260db833d625d59d0
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jul 19 09:32:45 2017 -0700
i386: Define I386_USE_SYSENTER to 0 or 1 and check PIC
Define I386_USE_SYSENTER to 0 or 1 so that special versions of syscalls
with "int $0x80" can be provided for static PIE during start up. Also
check PIC instead SHARED for PIC version of syscall macros.
* sysdeps/unix/sysv/linux/i386/sysdep.h (I386_USE_SYSENTER):
Define to I386_USE_SYSENTER to 0 or 1 if not defined.
(ENTER_KERNEL): Check if I386_USE_SYSENTER is 1 and check PIC.
(INTERNAL_SYSCALL_MAIN_INLINE): Likewise.
(INTERNAL_SYSCALL_NCS): Likewise.
(LOADARGS_1): Likewise.
(LOADARGS_5): Likewise.
(RESTOREARGS_1): Likewise.
(RESTOREARGS_5): Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9497821aee010848dbc0290aeb2ffca7828e3248
commit 9497821aee010848dbc0290aeb2ffca7828e3248
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Jul 18 15:46:40 2017 -0700
i386: Check PIC in i386 multiarch functions
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1c673e7c69f1f436bf952906e3bee3192e7fe9a4
commit 1c673e7c69f1f436bf952906e3bee3192e7fe9a4
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Jul 18 15:45:46 2017 -0700
i386: Check PIC instead of SHARED in start.S
Support static PIE. Avoid relocation in static PIE since _start is
called before it is relocated.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=840845842afbd8502e835fdbabcc94d3efd066c2
commit 840845842afbd8502e835fdbabcc94d3efd066c2
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Jul 18 10:42:48 2017 -0700
Use hidden visibility for ENABLE_STATIC_PIE
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8a569f52c8bb7f8a7e8d62b9e477a1161026a7b0
commit 8a569f52c8bb7f8a7e8d62b9e477a1161026a7b0
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jul 17 13:53:52 2017 -0700
Add _dl_relocate_static_pie
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=dacfa6dd23732f796474e295bc660aeec3741c7c
commit dacfa6dd23732f796474e295bc660aeec3741c7c
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jul 17 08:54:40 2017 -0700
Define pie-default/default-pie-ldflag for --enable-static-pie
1. Add $(pie-default) to CFLAGS-.o and CFLAGS-.op.
2. Add $(default-pie-ldflag) to +link-static-before-libc.
3. Define +prectorT/+postctorT to $(+prectorS)/$(+postctorS).
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a1a942cdb49f0841e1fcc5c7e6014b2cebae2613
commit a1a942cdb49f0841e1fcc5c7e6014b2cebae2613
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Jul 18 05:58:21 2017 -0700
x86-64: Check if linker supports static PIE
Need the linker with fix for:
https://sourceware.org/bugzilla/show_bug.cgi?id=21782
Binutils 2.29 is OK.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a5cc4892a32f26d4d9b8d45b34987de19cc53120
commit a5cc4892a32f26d4d9b8d45b34987de19cc53120
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jul 17 08:36:45 2017 -0700
Add --enable-static-pie
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a08f2e06d0fd2c9d9f2520cf19b39f194b7d706b
commit a08f2e06d0fd2c9d9f2520cf19b39f194b7d706b
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Jul 21 05:07:19 2017 -0700
Check if -static-pie works
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e25269f0b1cc96d04238f678518fa97041293fac
commit e25269f0b1cc96d04238f678518fa97041293fac
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jul 17 08:17:32 2017 -0700
Check if linker supports --no-dynamic-linker
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8a2d2459a35e00a5244d92a9b3cd9426674c10d2
commit 8a2d2459a35e00a5244d92a9b3cd9426674c10d2
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Jul 18 05:23:21 2017 -0700
x86-64: Check PIC instead of SHARED in start.S
PIC may be the default.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=17d6b68a0a5b49281a4865c24e3f9f82b53fb96f
commit 17d6b68a0a5b49281a4865c24e3f9f82b53fb96f
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Jul 18 15:36:20 2017 -0700
x86: Remove assembly versions of HAS_CPU_FEATURE/HAS_ARCH_FEATURE
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3a8af9336b0e5e73ed1c70e2edab8b6b9cd6f5ba
commit 3a8af9336b0e5e73ed1c70e2edab8b6b9cd6f5ba
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jul 19 06:54:03 2017 -0700
i386: Convert IFUNC selectors to C
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f347d27a43c3be3f222c96720c516f5cd23f93de
commit f347d27a43c3be3f222c96720c516f5cd23f93de
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Jul 18 15:35:30 2017 -0700
x86-64: Convert libmathvec IFUNC selectors to C
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c0fe5c7a0a3e0d94b380dc94fe0cc6f59e55c0bd
commit c0fe5c7a0a3e0d94b380dc94fe0cc6f59e55c0bd
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Jul 18 13:56:17 2017 -0700
x86-64: Convert libm IFUNC selectors to C
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b7ef1ce037602a55c47cfe1493d954794ed0ad61
commit b7ef1ce037602a55c47cfe1493d954794ed0ad61
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jul 19 08:46:08 2017 -0700
i386: Don't define multiarch __memmove_chk in libc.a [BZ #21791]
There is no need to define multiarch __memmove_chk in libc.a.
[BZ #21791]
* sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S
(MEMCPY_CHK): Define only if SHARED is defined.
* sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S (MEMCPY_CHK):
Likewise.
* sysdeps/i386/i686/multiarch/memcpy-ssse3.S (MEMCPY_CHK):
Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=09ffe2436cc6f9c3814753d4a70496e894e7a5bc
commit 09ffe2436cc6f9c3814753d4a70496e894e7a5bc
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jul 19 10:56:19 2017 -0700
Avoid accessing corrupted stack from __stack_chk_fail [BZ #21752]
__libc_argv[0] points to address on stack and __libc_secure_getenv
accesses environment variables which are on stack. We should avoid
accessing stack when stack is corrupted.
This patch also renames function argument in __fortify_fail_abort
from do_backtrace to need_backtrace to avoid confusion with do_backtrace
from enum __libc_message_action.
[BZ #21752]
* debug/fortify_fail.c (__fortify_fail_abort): Don't pass down
__libc_argv[0] if we aren't doing backtrace. Rename do_backtrace
to need_backtrace.
* sysdeps/posix/libc_fatal.c (__libc_message): Don't call
__libc_secure_getenv if we aren't doing backtrace.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ba748decd981266d2cc3feb11c9c15d9c1f55478
commit ba748decd981266d2cc3feb11c9c15d9c1f55478
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jul 19 16:53:06 2017 -0700
tunables: Use direct syscall for access (BZ#21744)
The function maybe_enable_malloc_check, which is called by
__tunables_init, calls __access_noerrno. It isn't problem when
symbol is is in ld.so, which has a special version of __access_noerrno
without stack protector. But when glibc is built with stack protector,
maybe_enable_malloc_check in libc.a can't call the regular version of
__access_noerrno with stack protector.
This patch changes how Linux defines the __access_noerrno to be an
inline call instead and thus preventing defining different build
rules for ld/static and shared.
H.J. Lu <hongjiu.lu@intel.com>
Adhemerval Zanella <adhemerval.zanella@linaro.org>
* elf/dl-tunables.c: Include not-errno.h header.
* include/unistd.h (__access_noerrno): Remove definition.
* sysdeps/unix/sysv/linux/access.c (__access_noerrno): Likewise.
* sysdeps/generic/not-errno.h: New file.
* sysdeps/unix/sysv/linux/not-errno.h: Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4e616357a0abb3a13b78b1a8bbbf10b4a055d398
commit 4e616357a0abb3a13b78b1a8bbbf10b4a055d398
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jul 19 12:04:14 2017 -0700
Compile tst-prelink.c without PIE [BZ #21815]
tst-prelink.c checks for conflict with GLOB_DAT relocation against stdio.
On i386, there is no GLOB_DAT relocation against stdio with PIE. We
should compile tst-prelink.c without PIE.
[BZ #21815]
* elf/Makefile (CFLAGS-tst-prelink.c): New.
(LDFLAGS-tst-prelink): Likewise.
-----------------------------------------------------------------------
--
You are receiving this mail because:
You are on the CC list for the bug.