- Explicitly allow uninitialized variables in a few places that do it
- on purpose
This commit is contained in:
parent
2dd27f97d9
commit
ab20189ebb
55
tboot-gcc11.patch
Normal file
55
tboot-gcc11.patch
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
diff --git a/tboot/common/tpm_12.c b/tboot/common/tpm_12.c
|
||||||
|
index a62e570..504b874 100644
|
||||||
|
--- a/tboot/common/tpm_12.c
|
||||||
|
+++ b/tboot/common/tpm_12.c
|
||||||
|
@@ -766,6 +766,8 @@ static uint32_t tpm12_osap(uint32_t locality, tpm_entity_type_t ent_type,
|
||||||
|
tpm_authhandle_t *hauth, tpm_nonce_t *nonce_even,
|
||||||
|
tpm_nonce_t *even_osap)
|
||||||
|
{
|
||||||
|
+#pragma GCC diagnostic push
|
||||||
|
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||||
|
uint32_t ret, offset, out_size;
|
||||||
|
|
||||||
|
if ( odd_osap == NULL || hauth == NULL ||
|
||||||
|
@@ -801,6 +803,7 @@ static uint32_t tpm12_osap(uint32_t locality, tpm_entity_type_t ent_type,
|
||||||
|
LOAD_BLOB_TYPE(WRAPPER_OUT_BUF, offset, even_osap);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
+#pragma GCC diagnostic pop
|
||||||
|
}
|
||||||
|
|
||||||
|
static uint32_t _tpm12_seal(uint32_t locality, tpm_key_handle_t hkey,
|
||||||
|
@@ -1044,6 +1047,8 @@ static uint32_t _tpm12_wrap_seal(uint32_t locality,
|
||||||
|
static uint32_t _tpm12_wrap_unseal(uint32_t locality, const uint8_t *in_data,
|
||||||
|
uint32_t *secret_size, uint8_t *secret)
|
||||||
|
{
|
||||||
|
+#pragma GCC diagnostic push
|
||||||
|
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||||
|
uint32_t ret;
|
||||||
|
tpm_nonce_t odd_osap, even_osap;
|
||||||
|
tpm_nonce_t nonce_even, nonce_odd, nonce_even_d, nonce_odd_d;
|
||||||
|
@@ -1116,6 +1121,7 @@ static uint32_t _tpm12_wrap_unseal(uint32_t locality, const uint8_t *in_data,
|
||||||
|
/* skip check for res_auth */
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
+#pragma GCC diagnostic pop
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool init_pcr_info(uint32_t locality,
|
||||||
|
@@ -1948,6 +1954,8 @@ static bool tpm12_get_random(struct tpm_if *ti, uint32_t locality,
|
||||||
|
|
||||||
|
static bool tpm12_cap_pcrs(struct tpm_if *ti, u32 locality, int pcr)
|
||||||
|
{
|
||||||
|
+#pragma GCC diagnostic push
|
||||||
|
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||||
|
bool was_capped[TPM_NR_PCRS] = {false};
|
||||||
|
tpm_pcr_value_t cap_val; /* use whatever val is on stack */
|
||||||
|
|
||||||
|
@@ -1976,6 +1984,7 @@ static bool tpm12_cap_pcrs(struct tpm_if *ti, u32 locality, int pcr)
|
||||||
|
|
||||||
|
printk(TBOOT_INFO"cap'ed dynamic PCRs\n");
|
||||||
|
return true;
|
||||||
|
+#pragma GCC diagnostic pop
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool tpm12_check(void)
|
@ -1,7 +1,7 @@
|
|||||||
Summary: Performs a verified launch using Intel TXT
|
Summary: Performs a verified launch using Intel TXT
|
||||||
Name: tboot
|
Name: tboot
|
||||||
Version: 1.9.11
|
Version: 1.9.11
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
@ -9,6 +9,7 @@ URL: http://sourceforge.net/projects/tboot/
|
|||||||
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
Patch0: disable-address-of-packed-member-warning.patch
|
Patch0: disable-address-of-packed-member-warning.patch
|
||||||
|
Patch1: tboot-gcc11.patch
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: trousers-devel
|
BuildRequires: trousers-devel
|
||||||
@ -65,6 +66,10 @@ make debug=y DISTDIR=$RPM_BUILD_ROOT install
|
|||||||
/boot/tboot-syms
|
/boot/tboot-syms
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jul 29 2020 Jeff Law <law@redhat.com> - 1:1.9.11-3
|
||||||
|
- Explicitly allow uninitialized variables in a few places that do it
|
||||||
|
- on purpose
|
||||||
|
|
||||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.9.11-2
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.9.11-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user