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 1987346 - gcc-toolset-11-annobin-9.79-1.el8 test failures
Summary: gcc-toolset-11-annobin-9.79-1.el8 test failures
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: annobin
Version: 8.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: ---
Assignee: Nick Clifton
QA Contact: Martin Cermak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-29 14:24 UTC by Martin Cermak
Modified: 2021-11-10 00:52 UTC (History)
5 users (show)

Fixed In Version: gcc-toolset-11-annobin-9.85-1.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 18:43:11 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:4258 0 None None None 2021-11-09 18:43:14 UTC

Description Martin Cermak 2021-07-29 14:24:47 UTC
I've been looking at how gcc-toolset-11-annobin-9.79-1.el8 plays with gcc-toolset-11-gcc-11.2.1-1.el8 and found the following:

the annobin test coverage passed entirely (incl. the annocheck-clean testcase), except for 2 failing tests:

/tools/annobin/Regression/annobin-fails-to-skip-endbr64-entry-point-check     (covers BZ#1958954)
/tools/annobin/Regression/hardening-annobin-regression-in-ppc64le-toolchain   (covers BZ#1934189)


The errors in both cases are:

Hardened: a.out: FAIL: stack-clash test because -fstack-clash-protection not enabled (function: f1) 
Hardened: a.out: FAIL: cf-protection test because no protection enabled (function: f1) 
Hardened: a.out: FAIL: stack-clash test because -fstack-clash-protection not enabled (function: f2) 
Hardened: a.out: FAIL: cf-protection test because no protection enabled (function: f2) 


That looks like some of bz1977997, bz1978176, or bz1979523, wasn't fixed in gcc-toolset-11-annobin-plugin-gcc-9.79-1.el8 yet.

Comment 1 Nick Clifton 2021-08-09 12:15:37 UTC
Hi Martin,

  This is another example of the problems that happen when gcc and annobin are out of sync.

  If you look in the verbose output from annocheck, just before the FAIL messages, you will see:

Hardened: a.out: The annobin plugin was built by an older version of the compiler.
Hardened: debug: Annobin plugin was built by gcc 11.1.1 but run on gcc version 11.2.1.
Hardened: debug: If there are WARN or FAIL results that appear to be incorrect, it could be due to this discrepancy.
Hardened: a.out: skip: warnings test because LTO compilation discards preprocessor options 

  Plus if you run the final link command with the annobin plugin's verbose flag enabled you will see:

 gcc `rpm --eval %build_ldflags` -shared f1.o f2.o -fplugin=annobin -fplugin-arg-annobin-verbose
[...]
annobin: lto: Annobin built by gcc 11.1.1 20210623, running on gcc 11.2.1 20210728
annobin: lto: WARN: gcc variable 'ix86_isa_flags' not found within cl_vars array
annobin: lto: Target's pointer size: 64 bits
annobin: lto: Error: Could not find option in cl_options, using flag instead
annobin: lto: debug: index = 1465 (-fstack-clash-protection) max = 2017
annobin: lto: Error: Could not find option in cl_options, using flag instead
annobin: lto: debug: index = 906 (-fcf-protection) max = 2017
[...]

  (I am running these tests on a Fedora rawhide mock chroot, but I assume that the same thing is happening on your RHEL-8 box)

  If you build the test files with an annobin that matches the gcc version used (eg rawhide's 9.84-1.fc35) then the test works.

  So I will set the DTM field and wait for an ITM so that I can rebuild annobin.

Cheers
  Nick

Comment 2 Nick Clifton 2021-08-11 14:33:12 UTC
Fixed in gcc-toolset-11-annobin-9.85-1.el8

Comment 4 Martin Cermak 2021-08-11 17:54:54 UTC
Verified with gcc-toolset-11-annobin-9.85-1.el8.

Comment 5 Martin Cermak 2021-08-11 18:00:13 UTC
errata attach request https://issues.redhat.com/browse/ERRATA-10004

Comment 9 errata-xmlrpc 2021-11-09 18:43:11 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 (new packages: gcc-toolset-11-annobin), 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-2021:4258


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