This is the mail archive of the libc-alpha@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]

[PATCH] S/390 Reverting the jmp_buf/ucontext_t ABI change


Hi,

this is the proposed patch which is reverting
"S/390: Make ucontext_t extendible."
"S/390: Merge 32 and 64 bit ucontext.h"
"S/390: Make jmp_buf extendible."

(Files sysdeps/unix/sysv/linux/s390/s390-32|64/nptl/libc.abilist
were moved to
sysdeps/unix/sysv/linux/s390/s390-32|64/libc.abilist
in patch "S390: Consolidate nptl/ subdirectories under linux/..."
by Roland McGrath)

Versions.def is now generated.
(see patch "Get rid of Versions.def source file" by Roland McGrath)

Versions.def is now generated.
(see patch "Get rid of Versions.def source file" by Roland McGrath)

File/content moved from nptl/sysdeps/unix/sysv/linux/s390/Versions
to sysdeps/unix/sysv/linux/s390/Versions
in patch "Move remaining S390 code out of nptl/." by Roland McGrath.

Files sysdeps/unix/sysv/linux/s390/s390-32|64/nptl/libc|libpthread.abilist
also moved to sysdeps/unix/sysv/linux/s390/s390-32|64/libc|libpthread.abilist.


The file sysdeps/unix/sysv/linux/s390/rtld-getcontext.S was introduced by the patch, but was neither compiled or included and a version in a common directory does not exist. The rest of the reverted patch does also not use it. Thus this file is not available with this patch.

In addition the introduced symbols versions of those patches for glibc 2.19 are created and both versions are targeting the same function.
Therefore __v1|v2... functions were introduced.
The symbols are weak or strong in order to be the same as before the reverted patches.

In setjmp.S files, function __sigsetjmp is now defined as weak_extern, because instead linker fails with "multiple definition of 'xxx'". Afterwards this function is redefined with strong versioning.
This is the same with __longjmp_chk.

The function __setjmp wasn´t exported before the original patch.
Thus there we omitted the compat version __setjmp@GLIBC_2.19
and __setjmp is now not exported anymore.
Andis patch introduced this exported version.
There is no code in glibc, which uses __setjmp. Is there?

This patch is tested on s390|s390x with make check|xcheck without fails (only nptl/tst-setuid2 fails without root-rights).

The test program pthread_cleanup_push.c from Aurelien Jarno does not segfault anymore, when linked against old glibc and executed with new one. If linked against glibc just before this revert-patch and executed with new one, succeeds too.

I also configured glibc with --enable-oldest-abi=2.20 to check, wether the glibc 2.19 versions are gone.

Is this the way to revert the jmp_buf/ucontext extensions.
Does anyone has another idea/hint?
Please comment.

If this is okay, i would prepare a backport for 2.19 branch and test it the same way.

Bye.

---
2014-07-25  Stefan Liebler <stli@linux.vnet.ibm.com>

	* sysdeps/s390/Makefile: Delete file.
	* sysdeps/s390/Versions (GLIBC_2.19): Remove __setjmp.
	* sysdeps/s390/__longjmp.c: Delete file.
	* sysdeps/s390/bits/setjmp.h (__s390_jmp_buf):
	Remove fields __flags and __reserved.
	* sysdeps/s390/longjmp.c: Include setjmp/longjmp.c
	and add versioning.
	* sysdeps/s390/rtld-__longjmp.c: Delete file.
	* sysdeps/s390/rtld-global-offsets.sym: Likewise.
	* sysdeps/s390/rtld-setjmp.S: Likewise.
	* sysdeps/s390/s390-32/__longjmp-common.c: Move to ...
	* sysdeps/s390/s390-32/__longjmp.c: ... here.
	* sysdeps/s390/s390-32/setjmp-common.S: Move to ...
	* sysdeps/s390/s390-32/setjmp.S: ... here.
	Add versioning.
	(__sigsetjmp): Remove setting __flags field.
	* sysdeps/s390/s390-64/__longjmp-common.c:Move to ...
	* sysdeps/s390/s390-64/__longjmp.c: ... here.
	* sysdeps/s390/s390-64/setjmp-common.S: Move to ...
	* sysdeps/s390/s390-64/setjmp.S: ... here.
	Add versioning.
	(__sigsetjmp): Remove setting __flags field.
	* sysdeps/s390/setjmp.S: Delete file.
	* sysdeps/s390/sigjmp.c: Likewise.
	* sysdeps/s390/v1-longjmp.c: Likewise.
	* sysdeps/s390/v1-setjmp.h: Likewise.
	* sysdeps/s390/v1-sigjmp.c: Likewise.
	* sysdeps/unix/sysv/linux/s390/Makefile (sysdep_routines):
	Remove v1-longjmp_chk.
	* sysdeps/unix/sysv/linux/s390/getcontext.S: Delete file.
	* sysdeps/unix/sysv/linux/s390/longjmp_chk.c:
	Include debug/longjmp_chk.c and add versioning.
	* sysdeps/unix/sysv/linux/s390/pt-longjmp.c:
	Include nptl/pt-longjmp.c and add versioning.
	* sysdeps/unix/sysv/linux/s390/rtld-getcontext.S: Delete file.
	* sysdeps/unix/sysv/linux/s390/s390-32/____longjmp_chk.c:
	Include __longjmp.c.
	* sysdeps/unix/sysv/linux/s390/s390-32/getcontext-common.S:
	Move to ...
	* sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S: ... here.
	(__getcontext): Remove setting __flags field.
	Add versioning.
	* sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S:
	Don´t restore upper high grps.
	* sysdeps/unix/sysv/linux/s390/s390-32/swapcontext.S:
	Likewise.
	(__swapcontext): Remove setting uc_flags field.
	* sysdeps/unix/sysv/linux/s390/s390-32/ucontext_i.sym:
	Delete file.
	* sysdeps/unix/sysv/linux/s390/s390-64/____longjmp_chk.c:
	Include __longjmp.c.
	* sysdeps/unix/sysv/linux/s390/s390-64/getcontext-common.S:
	Move to ...
	* sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S: ... here.
	(__getcontext): Remove setting __flags field.
	Add versioning.
	* sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S:
	(__swapcontext): Remove setting uc_flags field.
	* unix/sysv/linux/s390/s390-64/ucontext_i.sym: Delete file.
	* sysdeps/unix/sysv/linux/s390/sys/ucontext.h (ucontext):
	Remove fields uc_high_gprs and __reserved.
	* sysdeps/unix/sysv/linux/s390/ucontext_i.sym:
	New file with reverted content.
	* sysdeps/unix/sysv/linux/s390/v1-longjmp_chk.c: Delete file.

Attachment: revert-all_2507_1930
Description: Text document


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