summaryrefslogtreecommitdiff
path: root/pcr-testing/xen/patch-gcc7-vtpm-implicit-fallthrough.patch
diff options
context:
space:
mode:
authorIsaac David <isacdaavid@isacdaavid.info>2017-07-17 16:39:37 -0500
committerIsaac David <isacdaavid@isacdaavid.info>2017-07-17 16:40:11 -0500
commitd9ce509a69137af170f076029ef1b6e0a6c9abd6 (patch)
tree96f71e58e0c402e08ece803c0ace4f5370908634 /pcr-testing/xen/patch-gcc7-vtpm-implicit-fallthrough.patch
parent50702b51a47ee4021f985fef887d3fd0acf79cd9 (diff)
downloadabslibre-d9ce509a69137af170f076029ef1b6e0a6c9abd6.tar.gz
abslibre-d9ce509a69137af170f076029ef1b6e0a6c9abd6.tar.bz2
abslibre-d9ce509a69137af170f076029ef1b6e0a6c9abd6.zip
pcr/xen: move to pcr-testing
Diffstat (limited to 'pcr-testing/xen/patch-gcc7-vtpm-implicit-fallthrough.patch')
-rw-r--r--pcr-testing/xen/patch-gcc7-vtpm-implicit-fallthrough.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/pcr-testing/xen/patch-gcc7-vtpm-implicit-fallthrough.patch b/pcr-testing/xen/patch-gcc7-vtpm-implicit-fallthrough.patch
new file mode 100644
index 000000000..068752d2d
--- /dev/null
+++ b/pcr-testing/xen/patch-gcc7-vtpm-implicit-fallthrough.patch
@@ -0,0 +1,46 @@
+GCC-7 have -Wimplicit-fallthrough enabled with -Wextra. Add appropriate
+comment which both mute the warning and improve readibility.
+
+Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
+---
+ stubdom/Makefile | 1 +
+ stubdom/vtpm-implicit-fallthrough.patch | 10 ++++++++++
+ 2 files changed, 11 insertions(+)
+ create mode 100644 stubdom/vtpm-implicit-fallthrough.patch
+
+diff --git a/stubdom/Makefile b/stubdom/Makefile
+index db01827..5055e31 100644
+--- a/stubdom/Makefile
++++ b/stubdom/Makefile
+@@ -228,6 +228,7 @@ tpm_emulator-$(XEN_TARGET_ARCH): tpm_emulator-$(TPMEMU_VERSION).tar.gz
+ patch -d $@ -p1 < vtpm-deepquote.patch
+ patch -d $@ -p1 < vtpm-deepquote-anyloc.patch
+ patch -d $@ -p1 < vtpm-cmake-Wextra.patch
++ patch -d $@ -p1 < vtpm-implicit-fallthrough.patch
+ mkdir $@/build
+ cd $@/build; CC=${CC} $(CMAKE) .. -DCMAKE_C_FLAGS:STRING="-std=c99 -DTPM_NO_EXTERN $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Wno-declaration-after-statement"
+ touch $@
+diff --git a/stubdom/vtpm-implicit-fallthrough.patch b/stubdom/vtpm-implicit-fallthrough.patch
+new file mode 100644
+index 0000000..db97be5
+--- /dev/null
++++ b/stubdom/vtpm-implicit-fallthrough.patch
+@@ -0,0 +1,10 @@
++--- tpm_emulator-x86_64/tpm/tpm_cmd_handler.c.orig 2017-04-27 13:37:14.408000000 +0200
+++++ tpm_emulator-x86_64/tpm/tpm_cmd_handler.c 2017-04-27 13:39:53.585000000 +0200
++@@ -3397,6 +3397,7 @@
++ sizeof(rsp->auth2->nonceOdd.nonce));
++ tpm_hmac_update(&hmac, (BYTE*)&rsp->auth2->continueAuthSession, 1);
++ tpm_hmac_final(&hmac, rsp->auth2->auth);
+++ /* fall-thru */
++ case TPM_TAG_RSP_AUTH1_COMMAND:
++ tpm_hmac_init(&hmac, rsp->auth1->secret, sizeof(rsp->auth1->secret));
++ tpm_hmac_update(&hmac, rsp->auth1->digest, sizeof(rsp->auth1->digest));
+--
+2.7.4
+
+
+_______________________________________________
+Xen-devel mailing list
+Xen-devel@lists.xen.org
+https://lists.xen.org/xen-devel