Bug 1986628 - tpm2-tools disables LTO in Fedora due to possible use of uninitialized value
Summary: tpm2-tools disables LTO in Fedora due to possible use of uninitialized value
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: tpm2-tools
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Robinson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-27 22:43 UTC by Dave Malcolm
Modified: 2023-02-16 09:49 UTC (History)
5 users (show)

Fixed In Version: tpm2-tools-5.5-1.fc39 tpm2-tools-5.5-1.fc38
Clone Of:
Environment:
Last Closed: 2023-02-16 08:49:02 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dave Malcolm 2021-07-27 22:43:41 UTC
Jeff Law disabled LTO when building tpm2-tools in Fedora in 4.2.1-2:
  https://src.fedoraproject.org/rpms/tpm2-tools/c/d16cdea82a2b89198080c70624b009fc1f745706
and it is still disabled in rawhide.

His message reads:
 # LTO exposes a latent uninitialized variable "value" in the function # "nt".
 # This has been reported to the maintainer (Yunying), but they have not
 # responded and I am not comfortable enough with the code to know if a trivial
 # initialization to zero is appropriate/safe.  So LTO is disabled for now.

Unfortunately Jeff is no longer at Red Hat.

There are two issues here:
(a) possible bug in tpm2-tools as described above.  Does anyone know if this issue is being tracked upstream, and what its status is?
(b) ideally we'd remove the LTO-opt-opt, so that tpm2-tools benefits from LTO (smaller/faster machine code, deeper analysis for compiler warnings, etc)

Let me know if you need help from the RH toolchain team with LTO issues.

Thanks
Dave

Comment 1 Dave Malcolm 2021-07-27 23:02:34 UTC
Possibly this upstream bug:
  https://github.com/tpm2-software/tpm2-tools/issues/2767
which was fixed upstream by:
  https://github.com/tpm2-software/tpm2-tools/pull/2774/files

Comment 2 Peter Robinson 2021-07-28 07:46:08 UTC
Yes, that looks like the right bug, I'm by no means an expert on LTO and I've not had the time to dig into it but I would welcome feedback/verification we can drop the disable flag. tpm2-pkcs11 also has it.

Comment 3 Ben Cotton 2021-08-10 13:15:09 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 35 development cycle.
Changing version to 35.

Comment 4 Ben Cotton 2022-11-29 17:00:55 UTC
This message is a reminder that Fedora Linux 35 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '35'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 35 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 5 Ben Cotton 2022-12-13 15:27:26 UTC
Fedora Linux 35 entered end-of-life (EOL) status on 2022-12-13.

Fedora Linux 35 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 6 Fedora Update System 2023-02-16 08:43:12 UTC
FEDORA-2023-f682440db6 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-f682440db6

Comment 7 Fedora Update System 2023-02-16 08:49:02 UTC
FEDORA-2023-f682440db6 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Fedora Update System 2023-02-16 09:48:03 UTC
FEDORA-2023-c1b8d2867b has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-c1b8d2867b

Comment 9 Fedora Update System 2023-02-16 09:49:08 UTC
FEDORA-2023-c1b8d2867b has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.


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