Bug 19916 - S390: fprs/vrs are not saved/restored while resolving symbols
Summary: S390: fprs/vrs are not saved/restored while resolving symbols
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: dynamic-link (show other bugs)
Version: 2.24
: P2 normal
Target Milestone: 2.24
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-06 13:16 UTC by Stefan Liebler
Modified: 2016-04-06 18:28 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Liebler 2016-04-06 13:16:46 UTC
On s390, no fpr/vrs are saved while resolving a symbol
via _dl_runtime_resolve/_dl_runtime_profile.

According to the abi, the fpr-arguments are defined as call clobbered.
In leaf-functions, gcc can use fprs for saving/restoring gprs
instead of saving them to the stack.
If gcc do this in one of the resolver-functions, then the floating point
arguments of a library-function are invalid for the first library-function-call.
The same could occur for vector registers. An ifunc-resolver
can also clobber the vector/floating point argument registers.

Furthermore, if _dl_runtime_profile calls _dl_call_pltexit,
the pointers to inregs-/outregs-structs are setup invalid.

On s390-32, an endless loop occurs if _dl_call_pltexit() should be called.
Comment 1 Stefan Liebler 2016-04-06 13:39:20 UTC
Fixed with commit "S390: Save and restore fprs/vrs while resolving symbols."
https://sourceware.org/git/?p=glibc.git;a=commit;h=4603c51ef7989d7eb800cdd6f42aab206f891077