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: 10060293 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 E459A60231 for ; Wed, 15 Nov 2017 21:35:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D0D1729FC0 for ; Wed, 15 Nov 2017 21:35:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C4E422A30A; Wed, 15 Nov 2017 21:35:08 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B339429FC0 for ; Wed, 15 Nov 2017 21:35:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759441AbdKOVfF (ORCPT ); Wed, 15 Nov 2017 16:35:05 -0500 Received: from mail-io0-f193.google.com ([209.85.223.193]:39713 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758960AbdKOVew (ORCPT ); Wed, 15 Nov 2017 16:34:52 -0500 Received: by mail-io0-f193.google.com with SMTP id x63so3079712ioe.6 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=fsMc4MoFkzEd4ANwjB+meAc2D51SzFHRV/APTeFJh5J3/enEDWKkDrZorK9216+ljn RUk5eG37vDFv2fCeHu00/R3z5laIJx682ko/mvPfXohK32b+9VjDbGiDKoX33dtu4ZTe 5qKEGrI6LzL7TrtHdOnq5z6jvhd2xjcGnhWKMGPjLmCBczMZGI/untV5RZ9e0fB+CwkI 62O+39NwCFdw1eh6XLpJyrTbURGsBMoxDol9yFVWIVxOtKgpowuvjih4sXRghmZFiCh4 LkDjDa3sL1021TE0P+s4w+HxhKHV3Jg4JkBh+6zlIJXs8eZNDe3OibHFwuSYhTmlqr4r +xoA== X-Gm-Message-State: AJaThX67xBNRpwNUk+t9+16IIzg27MMqlkW1vSl168NmzW1oHSPMS7pZ 4D6azd22C9051XhRMMqqmwlThA== 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 Cc: Sami Tolvanen 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> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.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