|
Description
|
The runtime linker should workaround libraries which have non-ABI compliant
stacks. See CR 6672535. Some libraries only guaranty 8-byte stack alignment.
elf_rtbndr() should ensure its stack is properly aligned. This will protect
functions called by the runtime linker to resolve function calls from
incorrectly aligned stacks.
We are not seeing this failure today because the runtime linker and
functions called to resolve symbols happen to work with 8-byte aligned
stacks.
A fix in elf_rtbndr() could be:
pushq %rbp
andq $-16, %rsp // If %rsp is 8-byte aligned then subtract 8
Function elf_plt_trace also has this issue.
Solaris cannot build itself without this fix. Some tools required to build
Solaris SEGV due to improper stack alignment.
Test case for elf_rtbndr and elf_plt_trace is attached in 6672544_test.tar.
Functional tests for amd64 ABI INTEGER, SSE, and MEMORY argument types are
attached in 6672544_arg_test.tar. INTEGER args 1 through 7, SSE args 1
through 9, and MEMORY args are tested. These test functions are called
with both amd64 ABI aligned stacks and non-ABI compliant 8-byte aligned stacks.
Tests are run without auditing (the elf_rtbndr PLT path) and with auditing
(the elf_plt_trace PLT path). All 4 combinations of pltenter and pltexit
auditing are tested to exercise the 4 code paths through elf_plt_trace.
Root Cause was set to "Inadequate External Software" because ON must protect itself from existing
code with 8-byte aligned stack. C++ programs with a static constructor have illegal 8-byte
aligned stacks due to a bug in the existing C++ library init section.
|