From patchwork Tue May 21 17:25:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Morse X-Patchwork-Id: 10954355 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B73EA1395 for ; Tue, 21 May 2019 17:25:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9914728A53 for ; Tue, 21 May 2019 17:25:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8CF60289E8; Tue, 21 May 2019 17:25:49 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 41D67289E8 for ; Tue, 21 May 2019 17:25:49 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References: List-Owner; bh=mhhImNwaOaU90lbZzMTDknz/WKXcPsQ20xiyn+BXO7s=; b=Ezwn0DqcxBVHZu QdhdQma5yil8maYvY1xxyJyzovKNRlm6e4sxxlYUfkylz8UGt7881o/XDyyfQ72fowIyuCitGgyzT lV7px6tvs9enkCrN4YvUbBrMhrAWFFcYbsMf3mLTtQ1xp3lsyYGgeb7Pq8CxweagGLGVvVfH1Oanq /SV3dhB62J+vUsFfmY8O+rWY6ZoVa0Vf3oUZ6J/gHoRDET+qaAwvdkFFTrUBFJhTxx7K2Lr3LZdj2 JfIfdkVrNBEkMxPoQxwLcmydaeRpe+aAhAkS0USRY4WSWYY4qTH+iuaaRAK0WdlWHi9ejoptLhkuD MtvfZxQQ743keNn230sw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hT8WH-0004JQ-B3; Tue, 21 May 2019 17:25:45 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hT8WE-0004J2-S9 for linux-arm-kernel@lists.infradead.org; Tue, 21 May 2019 17:25:43 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C8AD7374; Tue, 21 May 2019 10:25:40 -0700 (PDT) Received: from eglon.cambridge.arm.com (eglon.cambridge.arm.com [10.1.196.105]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4B50C3F718; Tue, 21 May 2019 10:25:39 -0700 (PDT) From: James Morse To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu Subject: [PATCH 0/2] Move __hyp_text code under no-asan Makefiles Date: Tue, 21 May 2019 18:25:29 +0100 Message-Id: <20190521172531.89309-1-james.morse@arm.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190521_102542_910229_F23C593E X-CRM114-Status: GOOD ( 11.11 ) 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: Suzuki K Pouloze , Marc Zyngier , Julien Thierry , Christoffer Dall , James Morse , Andrew Murray 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 The fancy new pmu code added its __hyp_text code in part of the tree that doesn't get covered by the no-asan/no-kcov kconfig decorations. This shows up as a hyp-panic on v8.0 hardware when the host kernel is built with debug options like kasan. This same bug has been living happily in the aarch32 emulation code since v4.9. (commit 8cebe750c4d9a "arm64: KVM: Make kvm_skip_instr32 available to HYP"). Patch 2 has the two relevant fixes tag, but won't apply cleanly before v4.19 due to the churn. Fix them both by shuffling the code around. Thanks, James Morse (2): KVM: arm64: Move pmu hyp code under hyp's Makefile to avoid instrumentation KVM: arm/arm64: Move cc/it checks under hyp's Makefile to avoid instrumentation arch/arm/kvm/hyp/Makefile | 1 + arch/arm64/kvm/hyp/Makefile | 1 + arch/arm64/kvm/hyp/switch.c | 39 +++++++++++ arch/arm64/kvm/pmu.c | 38 ---------- virt/kvm/arm/aarch32.c | 121 -------------------------------- virt/kvm/arm/hyp/aarch32.c | 136 ++++++++++++++++++++++++++++++++++++ 6 files changed, 177 insertions(+), 159 deletions(-) create mode 100644 virt/kvm/arm/hyp/aarch32.c