From patchwork Tue Jun 27 17:35:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= X-Patchwork-Id: 9812871 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EE6BE60329 for ; Tue, 27 Jun 2017 17:38:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 343F128683 for ; Tue, 27 Jun 2017 17:38:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2862E28711; Tue, 27 Jun 2017 17:38:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8630228683 for ; Tue, 27 Jun 2017 17:38:18 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPuOs-0001rH-7K; Tue, 27 Jun 2017 17:35:42 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPuOq-0001qu-Q7 for xen-devel@lists.xen.org; Tue, 27 Jun 2017 17:35:40 +0000 Received: from [85.158.143.35] by server-5.bemta-6.messagelabs.com id 31/A2-03371-C6792595; Tue, 27 Jun 2017 17:35:40 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrFIsWRWlGSWpSXmKPExsXilM8irZszPSj S4OU0doslHxezODB6HN39mymAMYo1My8pvyKBNePRhf1sBfP5KlZ1/mFtYFzO08XIySEksIpR 4ndDCYSdLTHveCdLFyMXB4vAJFaJx4vnsoEkJAQ8JU48mANlO0vsOt7MCFIkJHCIUWLx/wVMI Ak2gVCJ9u0zWEFsEQFpiWufL4MVMQucY5S4se0OI0hCWMBa4uzpaWA2i4CqRMvniWBTeQX8JD ZN/c4OsUFO4ua5TmYQm1PAX2LX9H9MEOf5SWyctY8Vol5Q4uTMJ0CncgAtUJdYP08IJMwvoCS xbf1lsPHMAvISzVtnM09gFJ6FpGMWQscsJFULGJlXMWoUpxaVpRbpGhvpJRVlpmeU5CZm5uga Gpjp5aYWFyemp+YkJhXrJefnbmIEhjkDEOxgPL0u8BCjJAeTkijvqc6gSCG+pPyUyozE4oz4o tKc1OJDjDIcHEoSvHXTgHKCRanpqRVpmTnAiINJS3DwKInwqoOkeYsLEnOLM9MhUqcYFaXEee 1BEgIgiYzSPLg2WJRfYpSVEuZlBDpEiKcgtSg3swRV/hWjOAejkjBvBsgUnsy8Erjpr4AWMwE tZpkXALK4JBEhJdXA2LBtjbN6/fq++/4GARtlaxvcFjZ9eCDA9nPexB/lhv5GW99f8ZEVFCqJ rlS5L+I3cV19/yTNoAWHVj790lKbJ7C7aEnVn+zAwg7xOUYMx09lyH4y+Wmldn537ZcpX35HR cQdMq4Oeld3Kmp2+jx1Li+TPJ0lxeXyQpMfKmZ7OP7ctcDoa2KwEktxRqKhFnNRcSIA39IlYO 0CAAA= X-Env-Sender: marmarek@invisiblethingslab.com X-Msg-Ref: server-7.tower-21.messagelabs.com!1498584939!75959254!1 X-Originating-IP: [66.111.4.27] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTExLjQuMjcgPT4gODQ2Mw==\n X-StarScan-Received: X-StarScan-Version: 9.4.19; banners=-,-,- X-VirusChecked: Checked Received: (qmail 31052 invoked from network); 27 Jun 2017 17:35:40 -0000 Received: from out3-smtp.messagingengine.com (HELO out3-smtp.messagingengine.com) (66.111.4.27) by server-7.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 27 Jun 2017 17:35:40 -0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 40D1122309; Tue, 27 Jun 2017 13:35:39 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute7.internal (MEProxy); Tue, 27 Jun 2017 13:35:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=oTMncqFfoM4crVKiWTNeUDTaU0CMUHwsM2jIUVxjccA=; b=Az+UyNEK gCnrB82FiJEpumubp7hvHR8+BHd8usmJwlwnSHwNapb6FSR3R81IL/VIvmHn8Zvr qWdgKJnJCWSIKzRseCwyFZX0zO1XnurBLKRIswocDaIAvMQ1Cd0u3B83fhknPb92 YMs05bO7mWwgku5DCapCzDSiIw7gFYna+csGDqWcEcfnNguAj17hY2C4k1p5Z7bb eI/xSYg2+aZElJTEe8SfpHjHlyowA5X/FIgFGs5I2bj267ZAWj4IMLDS7DWfQgzD 2NCMEEOyBhwF55plm1mCMPUcq6BUT8/s5IXsx+a1qw6gUHGzYzelLcRlLbSKGHoV xiJ/4qd0tdvlSg== X-ME-Sender: X-Sasl-enc: ODoDpUlsH/M7MtuWRh2CmoQfYDka+iJCA8cl7sm43I/P 1498584938 Received: from devel-3rdparty.localdomain (89-70-103-23.dynamic.chello.pl [89.70.103.23]) by mail.messagingengine.com (Postfix) with ESMTPA id 2EDFA24038; Tue, 27 Jun 2017 13:35:38 -0400 (EDT) From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xen.org Date: Tue, 27 Jun 2017 19:35:43 +0200 Message-Id: <1498584945-9701-2-git-send-email-marmarek@invisiblethingslab.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498584945-9701-1-git-send-email-marmarek@invisiblethingslab.com> References: <1498584945-9701-1-git-send-email-marmarek@invisiblethingslab.com> MIME-Version: 1.0 Organization: Invisible Things Lab Cc: Wei Liu , Ian Jackson , =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Samuel Thibault Subject: [Xen-devel] [PATCH 1/3] stubdom: fix vtpm compilation on GCC-7 X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Wei Liu --- 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));