Merged update from upstream sources

This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/efivar.git#636372ec17b3167da215d3995e87fe2d6331ad90
This commit is contained in:
DistroBaker 2020-10-27 14:38:11 +01:00 committed by Petr Šabata
parent d3dbfec710
commit 862bb97d65
2 changed files with 99 additions and 1 deletions

View File

@ -0,0 +1,90 @@
From e9b282cbd147eac515c53aa500720de3a43366f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Tue, 27 Oct 2020 13:06:15 +0100
Subject: [PATCH] Fix abidw output for missing variadic arguments
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
GCC forgets to add the varidic arguments into debugging data if the
compilation unit is built with -flto option. As a result, the prebuilt
XML ABI dumps were missing the last argument at 4 functions (e.g.
efi_error_set()).
This was unnoticed until Fedora enabled LTO globally and had to
disable LTO in efivar explicitly because efivar uses symbol versioning
with top-level assembler statements which is not compatible with LTO.
Since then the abicheck failed:
make[2]: Leaving directory '/builddir/build/BUILD/efivar-37/src'
abidiff \
--suppr abignore \
--headers-dir2 /builddir/build/BUILD/efivar-37/src/include/efivar/ \
libefivar.abixml \
libefivar.so
Functions changes summary: 0 Removed, 2 Changed (8 filtered out), 0 Added functions
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
2 functions with some indirect sub-type change:
[C]'function int _efi_set_variable_variadic(efi_guid_t, const char*, uint8_t*, size_t, uint32_t)' at lib.c:44:1 has some indirect sub-type changes:
parameter 6 of type '...' was added
[C]'function int efi_error_set(const char*, const char*, int, int, const char*)' at error.c:86:1 has some indirect sub-type changes:
parameter 6 of type '...' was added
make[1]: *** [/builddir/build/BUILD/efivar-37/src/include/rules.mk:41: libefivar.abicheck] Error 4
make[1]: Leaving directory '/builddir/build/BUILD/efivar-37/src'
This patch corrects the pregenerated abixml files that were probably
generated with the faulty GCC.
<https://bugzilla.redhat.com/show_bug.cgi?id=1863475>
<https://bugzilla.redhat.com/show_bug.cgi?id=1891787>
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
src/libefiboot.abixml | 2 ++
src/libefivar.abixml | 2 ++
2 files changed, 4 insertions(+)
diff --git a/src/libefiboot.abixml b/src/libefiboot.abixml
index 4a0253b..ab75cbb 100644
--- a/src/libefiboot.abixml
+++ b/src/libefiboot.abixml
@@ -1800,6 +1800,7 @@
<parameter type-id='type-id-18' name='size'/>
<parameter type-id='type-id-215' name='filepath'/>
<parameter type-id='type-id-5' name='options'/>
+ <parameter is-variadic='yes'/>
<return type-id='type-id-18'/>
</function-decl>
<function-decl name='efi_generate_file_device_path_from_esp' mangled-name='efi_generate_file_device_path_from_esp' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='efi_generate_file_device_path_from_esp@@libefiboot.so.0'>
@@ -1809,6 +1810,7 @@
<parameter type-id='type-id-25' name='partition'/>
<parameter type-id='type-id-214' name='relpath'/>
<parameter type-id='type-id-5' name='options'/>
+ <parameter is-variadic='yes'/>
<return type-id='type-id-18'/>
</function-decl>
<function-decl name='efidp_make_hd' mangled-name='efidp_make_hd' filepath='src/include/efivar/efivar-dp.h' line='735' column='1' visibility='default' binding='global' size-in-bits='64'>
diff --git a/src/libefivar.abixml b/src/libefivar.abixml
index a719b8b..2dbb838 100644
--- a/src/libefivar.abixml
+++ b/src/libefivar.abixml
@@ -393,6 +393,7 @@
<parameter type-id='type-id-4' name='line' filepath='/usr/include/string.h' line='102' column='1'/>
<parameter type-id='type-id-4' name='error' filepath='/usr/include/string.h' line='103' column='1'/>
<parameter type-id='type-id-58' name='fmt' filepath='/usr/include/string.h' line='104' column='1'/>
+ <parameter is-variadic='yes'/>
<return type-id='type-id-4'/>
</function-decl>
<typedef-decl name='__mode_t' type-id='type-id-1' filepath='/usr/include/bits/types.h' line='150' column='1' id='type-id-59'/>
@@ -467,6 +468,7 @@
<parameter type-id='type-id-22' name='data' filepath='/usr/include/unistd.h' line='58' column='1'/>
<parameter type-id='type-id-23' name='data_size' filepath='/usr/include/unistd.h' line='59' column='1'/>
<parameter type-id='type-id-3' name='attributes' filepath='/usr/include/unistd.h' line='59' column='1'/>
+ <parameter is-variadic='yes'/>
<return type-id='type-id-4'/>
</function-decl>
<function-decl name='_efi_set_variable' mangled-name='_efi_set_variable' filepath='/usr/include/unistd.h' line='46' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_efi_set_variable@libefivar.so.0'>
--
2.25.4

View File

@ -1,6 +1,6 @@
Name: efivar
Version: 37
Release: 13%{?dist}
Release: 14%{?dist}
Summary: Tools to manage UEFI variables
License: LGPL-2.1
URL: https://github.com/rhboot/efivar
@ -19,6 +19,10 @@ Source1: efivar.patches
# Source1 patches reflect a git snapshot, this is a separate fix on top
# with a gap in between
Patch100: 0001-Fix-sys-block-sysfs-parsing-for-eMMC-s.patch
# Fix XML ABI dumps that were generated with a faulty GCC and missed the
# variadic arguments when building without LTO, bug #1863475,
# <https://github.com/rhboot/efivar/issues/165>
Patch101: 0001-Fix-abidw-output-for-missing-variadic-arguments.patch
%description
efivar provides a simple command line interface to the UEFI variable facility.
@ -83,6 +87,10 @@ make abicheck
%{_libdir}/*.so.*
%changelog
* Tue Oct 27 2020 Petr Pisar <ppisar@redhat.com> - 37-14
- Fix XML ABI dumps that were generated with a faulty GCC and missed the
variadic arguments when building without LTO (bug #1863475)
* Thu Aug 06 2020 Jeff Law <law@redhat.com>
- Remove explicit LTO bits from flags