From patchwork Wed Nov 15 21:34:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sami Tolvanen X-Patchwork-Id: 10060381 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 5542C60231 for ; Wed, 15 Nov 2017 21:39:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 446922A2DA for ; Wed, 15 Nov 2017 21:39:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 378442A31D; Wed, 15 Nov 2017 21:39:28 +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.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BF8682A2DA for ; Wed, 15 Nov 2017 21:39:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=A3ykiugfW8kELfqR1RPzAhpwyxoL3UGdhBoyM0s8iTI=; b=oBERzBviMRsVwO1xKjeIZXOuPl ynkjxf9ZTiCkgI1OQGLkPOACEN3eyH5czbtUvnXSm75Mv9M0tvxgRsKoy/uEOcIqk+TIUzyRFHy8S dh/cnzIvRBMX3ievwQqPWup/2UgxLcqSMuDKtaipwWJx+DsmNLezrSjrgKLFwXjs+Z8aAJXLldwi3 c9bB2T7muNAJpOXG2clZ2q1KJRQO+A5Cqse9PQ/y6s5qdqkq9s08r83Fm9Ifj5MCgNsKBHGlZZith /twTL6io7SecdQ/kVLtaMNWJugS2HmKU7Ur6kmLO5FwfNg7rzeFF2xkKEvwwdBpaw089sO2JGLVZZ Xxm6Qk5g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eF5P5-0003op-9N; Wed, 15 Nov 2017 21:39:27 +0000 Received: from mail-io0-x242.google.com ([2607:f8b0:4001:c06::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eF5Kv-000897-ER for linux-arm-kernel@lists.infradead.org; Wed, 15 Nov 2017 21:35:17 +0000 Received: by mail-io0-x242.google.com with SMTP id t11so3075634iof.13 for ; Wed, 15 Nov 2017 13:34:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=yxnyI0ZZ+TXe693tecN4BI/nCLFrwfzwbEughX2I0oM=; b=KYj0w6kgnC16NvgJR8JwrV6v9MtcMXDMv5/YLcE0G9NMgBjcqcw0INtwQUmEjeBq06 cNWwZ7S4fFdI59ZnuYJuBcivJm9Pzttgs9Yq2/XgHfW+5+QLemHE2ph3Y7lM2z+B926c t8en4VQ29kkFLqcBd6uRCr9VXcRxujmiSsEYr265hF+rN53w7miUxlPgzKSbwv53FMMS YMAvrtzWW2eR3PbnLRmtZhp8H+VwS1v5vbx6WaBv1I8odfSicL+1boS4xe5x5sOtrWEP p11OBPgc5bU1jbiAYq3pjcv/mMU8yzGo1uwEOmVyUtDl3sEhjrhrAsikzRgR9UanDgOh IH5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=yxnyI0ZZ+TXe693tecN4BI/nCLFrwfzwbEughX2I0oM=; b=THwc7H3DbRTcjdcjEmpYhpHoIqQAq7ror2SWLi6/66i4wSutsDADOzTUJrg2zIJEC9 vlUUr9ms2fpj24US9C+L10z7xBJ5a4DUXD9/fGgMFndyBlDdcdgPaU0y3FTbRSpff6D6 QCEoN2Ge+AN0te91eFJeYw6BMKvOlTxzEcRST/biEn/aabiI0JWII1BfAbTc9SpvD+nn MZGFRSxevX3KY7s9bmVxxm2OUuX16gZKui0cc4pSlFmVZBt38uLAwKKmsfdDzTc+Cq2I iyw6e3qCxDhCl9Sv9zeEOzGINaRBCmXX1USlYo+1QYwru+rvDRgUIGz7cDr2brKA9TEw PClw== X-Gm-Message-State: AJaThX7GCokYGQErqYcE8yq46Y6MGaQvRTlkbSdNmyHQqS7eiQSvL4ZE NhM56gKNwkEqqgnp2w88KYeqmw== X-Google-Smtp-Source: AGs4zMYu7FkiuOXEgZs9+DSIccpMDT92LmwMqRnAoF2kS4NJ0mYw4ZuYRMf82mXZOovN5h9wBs4SHA== X-Received: by 10.107.187.68 with SMTP id l65mr19907680iof.233.1510781690912; Wed, 15 Nov 2017 13:34:50 -0800 (PST) Received: from samitolvanen.mtv.corp.google.com ([100.98.112.14]) by smtp.gmail.com with ESMTPSA id 68sm9735197iov.2.2017.11.15.13.34.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Nov 2017 13:34:50 -0800 (PST) From: Sami Tolvanen To: Alex Matveev , Andi Kleen , Ard Biesheuvel , Greg Hackmann , Kees Cook , linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Rutland , Masahiro Yamada , Maxim Kuvyrkov , Michal Marek , Nick Desaulniers , Yury Norov , Matthias Kaehlcke Subject: [PATCH v2 06/18] arm64: kvm: use -fno-jump-tables with clang Date: Wed, 15 Nov 2017 13:34:16 -0800 Message-Id: <20171115213428.22559-7-samitolvanen@google.com> X-Mailer: git-send-email 2.15.0.448.gf294e3d99a-goog In-Reply-To: <20171115213428.22559-1-samitolvanen@google.com> References: <20171115213428.22559-1-samitolvanen@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171115_133509_667725_CC5AADC3 X-CRM114-Status: UNSURE ( 7.65 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sami Tolvanen MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Use -fno-jump-tables to make sure clang doesn't generate branches to EL1 virtual addresses. Suggested-by: AKASHI Takahiro Signed-off-by: Sami Tolvanen --- arch/arm64/kvm/hyp/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/kvm/hyp/Makefile b/arch/arm64/kvm/hyp/Makefile index f04400d494b7..19fa1c6b6b69 100644 --- a/arch/arm64/kvm/hyp/Makefile +++ b/arch/arm64/kvm/hyp/Makefile @@ -5,6 +5,10 @@ ccflags-y += -fno-stack-protector -DDISABLE_BRANCH_PROFILING +ifeq ($(cc-name),clang) +ccflags-y += -fno-jump-tables +endif + KVM=../../../../virt/kvm obj-$(CONFIG_KVM_ARM_HOST) += $(KVM)/arm/hyp/vgic-v2-sr.o