RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1726637 - Request a backport of fixes for SVE Vector PCS on AArch64 (binutils part)
Summary: Request a backport of fixes for SVE Vector PCS on AArch64 (binutils part)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: binutils
Version: 8.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Nick Clifton
QA Contact: Miloš Prchlík
URL:
Whiteboard:
Depends On:
Blocks: 1746913 1755139
TreeView+ depends on / blocked
 
Reported: 2019-07-03 10:39 UTC by Nick Clifton
Modified: 2021-09-17 14:30 UTC (History)
6 users (show)

Fixed In Version: binutils-2 binutils-2.30-60.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 16:45:36 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1724130 1 None None None 2023-07-18 14:19:32 UTC
Red Hat Issue Tracker RHELPLAN-26607 0 None None None 2021-08-27 22:42:33 UTC
Red Hat Product Errata RHSA-2020:1797 0 None None None 2020-04-28 16:45:59 UTC

Description Nick Clifton 2019-07-03 10:39:51 UTC
Clone of #1724130, created for the binutils component.

Description of problem:

Arm has introduced a vector PCS for SVE and Advanced SIMD. This showed a problem with lazy binding on SVE vector PCS while testing the qemu implementation of SVE primarily to do with saving and restoring the additional callee saved register state in the new vector PCS when lazily resolving SVE functions. 

The draft text for fixing the ABI for this is at
https://sourceware.org/ml/libc-alpha/2019-05/msg00501.html

It requires the marking of vector functions in the symbol table so the dynamic linker can bind them early. For this the symbol marking has to be propagated from the compiler to the final dynamic linked binary.


Running an executable with vector pcs turned on for SVE. Note that such binaries could be generated by other commercial toolchains as well.


This has been fixed by a series of patches for gcc
binutils and glibc. These need to be backported on systems
that run on SVE hardware to support binaries with extern
SVE calls and to support compiling code with SVE or AdvSIMD
vector calls.

Without the glibc backport, the dynamic linker clobbers
SVE call argument registers in the lazy binding entry code
when the function is first called. So binaries with extern
SVE calls will misbehave at runtime.

Without the binutils backport, the bfd linker silently
drops symbol markings at link time, creating broken
binaries that misbehave even with an updated glibc.
Without the binutils backport, the assembler fails to
assemble code with SVE or AdvSIMD calls because it does
not understand the new .variant_pcs directive.

Without the gcc backport, gcc-9 emits AdvSIMD vector calls
without marking them with .variant_pcs and thus they won't
follow the new ABI. This is unlikely to cause runtime
problems now as AdvSIMD registers are unlikely to be
corrupted by the dynamic linker, but the marking is an ABI
requirement and will be necessary to support LD_AUDIT or
arbitrary ifunc resolvers for AdvSIMD vector calls among
other features.

We plan to backport the patches below to gcc-9, binutils-2.32
and several glibc release branches.

patches:

commit 2301ed1c9af1316b4bad3747d2b03f7d44940f87
Commit:     Szabolcs Nagy <szabolcs.nagy>
CommitDate: 2019-05-24 15:05:57 +0100

    aarch64: add STO_AARCH64_VARIANT_PCS and DT_AARCH64_VARIANT_PCS

commit f166ae0188dcb89c5ae925034260a708a254ab2f
Commit:     Szabolcs Nagy <szabolcs.nagy>
CommitDate: 2019-05-24 15:07:42 +0100

    aarch64: handle .variant_pcs directive in gas

commit 0b4eac57c44ec4c9e13f5201b40936c3b3e6c639
Commit:     Szabolcs Nagy <szabolcs.nagy>
CommitDate: 2019-05-24 15:09:06 +0100

    aarch64: override default elf .set handling in gas

commit 823710d5856996d1f54f04ecb2f7647aeae99b5b
Commit:     Szabolcs Nagy <szabolcs.nagy>
CommitDate: 2019-05-24 15:11:00 +0100

    aarch64: handle STO_AARCH64_VARIANT_PCS in bfd

commit 65f381e729bedb933f3e1376e7f53f0ff63ac9a8
Commit:     Szabolcs Nagy <szabolcs.nagy>
CommitDate: 2019-05-28 12:03:51 +0100

    aarch64: fix variant_pcs ld tests

Comment 6 Nick Clifton 2019-10-29 08:16:22 UTC
Fixed in binutils-2.30-60.el8

Comment 8 Miloš Prchlík 2020-03-17 09:46:02 UTC
Verified with binutils-2.30-73.el8:

PASS: gas/aarch64/symbol-variant_pcs-1
PASS: gas/aarch64/symbol-variant_pcs-2
PASS: gas/aarch64/symbol-variant_pcs-3

PASS: ld-aarch64/variant_pcs-r
FAIL: ld-aarch64/variant_pcs-shared
FAIL: ld-aarch64/variant_pcs-now


The failures seem to be only issues with the expected formatting of the test output, unexpected lines and so on, not actual PCS issues. The patches are applied, and the test output matches the expected when it comes to PCS.

Comment 10 errata-xmlrpc 2020-04-28 16:45:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:1797


Note You need to log in before you can comment on or make changes to this bug.