This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
PING^1 [PATCH] Call _dl_open_check after relocation is finished [BZ #24259]
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Sat, 2 Mar 2019 08:15:06 -0800
- Subject: PING^1 [PATCH] Call _dl_open_check after relocation is finished [BZ #24259]
- References: <20190224160159.1804-1-hjl.tools@gmail.com>
On Sun, Feb 24, 2019 at 8:02 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> When dlopening a shared object, _dl_open_check will throw an exception
> if CET shadow stack is enabled and the shared object has no shadow stack
> support. dl_open_worker must call _dl_open_check after relocation is
> finished. Otherwise, the dependency shared objects may be mmapped
> without relocation. This will lead to run-time failure later when they
> are needed by another dlopened shared object which is shadow stack
> enabled.
>
> [BZ #24259]
> * elf/dl-open.c (dl_open_worker): Call _dl_open_check after
> relocation is finished.
> * sysdeps/x86/Makefile (tests): Add tst-cet-legacy-5a and
> tst-cet-legacy-5b.
> (modules-names): Add tst-cet-legacy-mod-5a and
> tst-cet-legacy-mod-5b.
> (CFLAGS-tst-cet-legacy-5a.c): New.
> (CFLAGS-tst-cet-legacy-5b.c): Likewise.
> (CFLAGS-tst-cet-legacy-mod-5a.c): Likewise.
> (CFLAGS-tst-cet-legacy-mod-5b.c): Likewise.
> ($(objpfx)tst-cet-legacy-5a): Likewise.
> ($(objpfx)tst-cet-legacy-5a.out): Likewise.
> ($(objpfx)tst-cet-legacy-mod-5a.so): Likewise.
> ($(objpfx)tst-cet-legacy-mod-5b.so): Likewise.
> ($(objpfx)tst-cet-legacy-5b): Likewise.
> ($(objpfx)tst-cet-legacy-5b.out): Likewise.
> (tst-cet-legacy-5b-ENV): Likewise.
> * sysdeps/x86/tst-cet-legacy-5.c: New file.
> * sysdeps/x86/tst-cet-legacy-5a.c: Likewise.
> * sysdeps/x86/tst-cet-legacy-5b.c: Likewise.
> * sysdeps/x86/tst-cet-legacy-mod-5.c: Likewise.
> * sysdeps/x86/tst-cet-legacy-mod-5a.c: Likewise.
> * sysdeps/x86/tst-cet-legacy-mod-5b.c: Likewise.
PING:
https://sourceware.org/ml/libc-alpha/2019-02/msg00579.html
--
H.J.