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 1555397 - backport s390 -mpic-data-is-text-relative feature
Summary: backport s390 -mpic-data-is-text-relative feature
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gcc
Version: 7.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Marek Polacek
QA Contact: Michael Petlan
Vladimír Slávik
URL:
Whiteboard:
Depends On:
Blocks: 1505884
TreeView+ depends on / blocked
 
Reported: 2018-03-14 15:40 UTC by Joe Lawrence
Modified: 2018-10-30 07:28 UTC (History)
7 users (show)

Fixed In Version: gcc-4.8.5-31.el7
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2018-10-30 07:27:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3016 0 None None None 2018-10-30 07:28:48 UTC

Description Joe Lawrence 2018-03-14 15:40:45 UTC
In order to support kpatch on s390x architecture, we'd like to have the -mpic-data-is-text-relative feature backported to RHEL7.

Quick background of how kpatch works: kpatch patches code on a per-function basis and relies on ftrace for function redirection from old to new funcs.  The patched binary code containing the new functions is placed in a kernel module, and kpatch manually applies relocations to the new code at module load time.

On s390x, things become interesting when we stick patched code for vmlinux in a kernel module. One obstacle we've run into is when the compiled code uses R_390_PC32DBL relocations, which utilize 32-bit relative displacements.  However, kernel modules are placed at the tail end of the kernel address space, rendering these relocations non-functional, since the displacement to vmlinux symbols on the other end of the address space is larger than what can fit in a 32-bit field.

To work around this issue, we worked upstream with Martin Schwidefsky and Andreas Krebbel to add 9852c8ae7856 ("S/390: New option -mpic-data-is-text-relative").  That option ensures that data references are not relative, but rather via GOT.  The change seems pretty small and hopefully easy to backport to RHEL7's gcc.

Comment 7 Michael Petlan 2018-07-17 11:11:36 UTC
Related tests passed with gcc-4.8.5-36.el7.s390x.
VERIFIED.

Comment 9 errata-xmlrpc 2018-10-30 07:27:17 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/RHBA-2018:3016


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