This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.29.9000-104-gc259196
- From: fw at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 1 Mar 2019 17:53:58 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.29.9000-104-gc259196
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, master has been updated
via c259196b5005812aa3294dbf4eeca29b266a4522 (commit)
from 928b305d3f6773b6a8cd1202da4f7d5d9a654456 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c259196b5005812aa3294dbf4eeca29b266a4522
commit c259196b5005812aa3294dbf4eeca29b266a4522
Author: Florian Weimer <fweimer@redhat.com>
Date: Fri Mar 1 18:53:03 2019 +0100
elf/tst-big-note: Improve accuracy of test [BZ #20419]
It is possible that the link editor injects an allocated ABI tag note
before the artificial, allocated large note in the test. Note parsing
in open_verify stops when the first ABI tag note is encountered, so if
the ABI tag note comes first, the problematic code is not actually
exercised.
Also tweak the artificial note so that it is a syntactically valid
4-byte aligned note, in case the link editor tries to parse notes and
process them.
Improves the testing part of commit 0065aaaaae51cd60210ec3a7e13.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
diff --git a/ChangeLog b/ChangeLog
index 85506ef..1ca155e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2019-03-01 Florian Weimer <fweimer@redhat.com>
+
+ [BZ #20419]
+ * elf/tst-big-note-lib.S: Create a syntactically valid note.
+ * elf/Makefile (tst-big-note-lib.so): Do not link with startup
+ code, to avoid creating an ABI tag note.
+ (modules-names-nobuild): Add tst-big-note-lib.
+
2019-03-01 Stefan Liebler <stli@linux.ibm.com>
* sysdeps/s390/wcscpy-vx.S: Add strong aliases to
diff --git a/elf/Makefile b/elf/Makefile
index 5520407..310a37c 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -316,8 +316,8 @@ endif
modules-execstack-yes = tst-execstack-mod
extra-test-objs += $(addsuffix .os,$(strip $(modules-names)))
-# filtmod1.so has a special rule
-modules-names-nobuild := filtmod1
+# filtmod1.so, tst-big-note-lib.so have special rules.
+modules-names-nobuild := filtmod1 tst-big-note-lib
tests += $(tests-static)
@@ -1515,6 +1515,11 @@ tst-libc_dlvsym-static-ENV = \
$(objpfx)tst-libc_dlvsym-static.out: $(objpfx)tst-libc_dlvsym-dso.so
$(objpfx)tst-big-note: $(objpfx)tst-big-note-lib.so
+# Avoid creating an ABI tag note, which may come before the
+# artificial, large note in tst-big-note-lib.o and invalidate the
+# test.
+$(objpfx)tst-big-note-lib.so: $(objpfx)tst-big-note-lib.o
+ $(LINK.o) -shared -o $@ $(LDFLAGS.so) $<
$(objpfx)tst-unwind-ctor: $(objpfx)tst-unwind-ctor-lib.so
diff --git a/elf/tst-big-note-lib.S b/elf/tst-big-note-lib.S
index e2008cf..721686f 100644
--- a/elf/tst-big-note-lib.S
+++ b/elf/tst-big-note-lib.S
@@ -20,7 +20,13 @@
On a typical Linux system with 8MiB "ulimit -s", that was enough
to trigger stack overflow in open_verify. */
+#define NOTE_SIZE 8*1024*1024
+
.pushsection .note.big,"a"
-.balign 4
-.fill 8*1024*1024, 1, 0
+ .balign 4
+ .long 5 /* n_namesz. Length of "GLIBC". */
+ .long NOTE_SIZE /* n_descsz. */
+ .long 0 /* n_type. */
+ .ascii "GLIBC\0\0\0" /* Name and alignment to four bytes. */
+ .fill NOTE_SIZE, 1, 0
.popsection
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 8 ++++++++
elf/Makefile | 9 +++++++--
elf/tst-big-note-lib.S | 10 ++++++++--
3 files changed, 23 insertions(+), 4 deletions(-)
hooks/post-receive
--
GNU C Library master sources