From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 83D0BC433EF for ; Tue, 19 Jul 2022 10:36:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KhRaM6odBtPiU6d1uGazQdHDGIGnhtNobaQXZLgJBLw=; b=E2vVuKyFZOFaLo bg45aROXOYRggQ5oX+mCSsh4VfXk+kzh1j5Syw6674eByGgIJf3nQAYd/KQh2BlOPf+FQOLs/gwLV SXbshNY4PcPCtzSHtlqigBnBkVoH+biTC1BcBVAd+Yd6AwmDARVfOPsMDwUCtaAga0a0fJqEHi3nF UV542ZkpJD/wvCIHDayB5bIeAJxzS/fOtNqA/5dWVUEaFH0u0P5zoJDaQ2xxtON9Uu9y016M9p8KI rfLQF+3CBwKHZtd9x+XCaer3gWdAaP1SXjAO3MbRIHZR3JoydCrONmMls4dNhFB58FhlE/NlCV2OK nesRNsediolDd8oYNg2w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oDkZZ-0081mV-Cj; Tue, 19 Jul 2022 10:35:25 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oDkZW-0081lz-7l for linux-arm-kernel@lists.infradead.org; Tue, 19 Jul 2022 10:35:23 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CF90261380; Tue, 19 Jul 2022 10:35:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0BF2BC341C6; Tue, 19 Jul 2022 10:35:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658226921; bh=LTURouQObNXUgAv2oCPXsD0v06f27q4kyC2HWGX13xc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=mY7eMT5c56IEXPSXLZERVV7aqyLE4Iwd6q98HbdNg6DXgerRgumOkhqhVk8t/I6kG hcS/VeuVR6eb0NMHiQHIeaKlgpUpVfeu0CgnbwabpszMP2ltpmwCQ1g+HN3iZsoW16 j0F+0kNvx+2vPUbfQhloXxPPG1u2rCWTNcR2SAD68wgK5r0UBKSX1t0KWncYhVSiB0 r67q+h1eykeW4zqsI9ebvzwgv3HCpmimDp2k1YYSFcZmkdqryccDD7a8HVt836K3Na o5VKznU8E1oQAyqYCGIEPBtv1XWBsSX+FyHUFU/Tqq8Z/ciPbIW9cm/VbVOxDwZLYi U7ZVMsIbjPN0A== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oDkZS-008SGg-U8; Tue, 19 Jul 2022 11:35:19 +0100 Date: Tue, 19 Jul 2022 11:35:18 +0100 Message-ID: <87ilntz8yh.wl-maz@kernel.org> From: Marc Zyngier To: Kalesh Singh Cc: Mark Rutland , Mark Brown , "Madhavan T. Venkataraman" , Will Deacon , Quentin Perret , Fuad Tabba , James Morse , Alexandru Elisei , Suzuki K Poulose , Catalin Marinas , andreyknvl@gmail.com, vincenzo.frascino@arm.com, Masami Hiramatsu , Alexei Starovoitov , Kefeng Wang , Marco Elver , Keir Fraser , Zenghui Yu , Ard Biesheuvel , Oliver Upton , "moderated list:ARM64 PORT (AARCH64 ARCHITECTURE)" , kvmarm , LKML , "Cc: Android Kernel" Subject: Re: [PATCH v4 08/18] KVM: arm64: Add PROTECTED_NVHE_STACKTRACE Kconfig In-Reply-To: References: <20220715061027.1612149-1-kaleshsingh@google.com> <20220715061027.1612149-9-kaleshsingh@google.com> <87cze252q7.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: kaleshsingh@google.com, mark.rutland@arm.com, broonie@kernel.org, madvenka@linux.microsoft.com, will@kernel.org, qperret@google.com, tabba@google.com, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, catalin.marinas@arm.com, andreyknvl@gmail.com, vincenzo.frascino@arm.com, mhiramat@kernel.org, ast@kernel.org, wangkefeng.wang@huawei.com, elver@google.com, keirf@google.com, yuzenghui@huawei.com, ardb@kernel.org, oupton@google.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220719_033522_375016_862ACD24 X-CRM114-Status: GOOD ( 31.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 18 Jul 2022 18:03:30 +0100, Kalesh Singh wrote: > > On Sun, Jul 17, 2022 at 11:56 PM Marc Zyngier wrote: > > > > [- Drew and android-mm, as both addresses bounce] > > > > On Fri, 15 Jul 2022 07:10:17 +0100, > > Kalesh Singh wrote: > > > > > > This can be used to disable stacktrace for the protected KVM > > > nVHE hypervisor, in order to save on the associated memory usage. > > > > > > This option is disabled by default, since protected KVM is not widely > > > used on platforms other than Android currently. > > > > > > Signed-off-by: Kalesh Singh > > > --- > > > arch/arm64/kvm/Kconfig | 15 +++++++++++++++ > > > 1 file changed, 15 insertions(+) > > > > > > diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig > > > index 8a5fbbf084df..1edab6f8a3b8 100644 > > > --- a/arch/arm64/kvm/Kconfig > > > +++ b/arch/arm64/kvm/Kconfig > > > @@ -46,6 +46,21 @@ menuconfig KVM > > > > > > If unsure, say N. > > > > > > +config PROTECTED_NVHE_STACKTRACE > > > + bool "Protected KVM hypervisor stacktraces" > > > + depends on KVM > > > + default n > > > + help > > > + Say Y here to enable pKVM hypervisor stacktraces on hyp_panic() > > > + > > > + If you are not using protected nVHE (pKVM), say N. > > > + > > > + If using protected nVHE mode, but cannot afford the associated > > > + memory cost (less than 0.75 page per CPU) of pKVM stacktraces, > > > + say N. > > > + > > > + If unsure, say N. > > > + > > > > Can we make this depend on NVHE_EL2_DEBUG instead? I'd like to keep > > the disclosing of EL2 information in protected mode a strict debug > > feature. > > Hi Marc, > > An earlier version was similar to what you propose. The unwinding > depended on NVHE_EL2_DEBUG and all unwinding was done from EL1 with > host stage 2 being disabled. The reason the design was changed is > because Android expressed the need for pKVM hyp stacktraces in > production environments. [1] I think that's an Android-specific requirement that doesn't apply to upstream. If Android wants to enable this in production (and potentially leak details of the hypervisor address space), that's Android's business, and they can carry a patch for that. Upstream shouldn't have to cater for such a thing. Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel