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 (unknown [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 878FDC433F5 for ; Sat, 9 Apr 2022 16:13:48 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=UDSdT3OQb7AncDpU2ZAX0nY9PUckqujd5TjtMHolJTw=; b=HP8Ekx+HHLmFUR+zXLLLznHxx8 NzYzpuv8/6ZgsJ0oKoNf+Ay1orWzMFaSsqLyMiEG813QX+Cd7n8kLdXPJQmrCT7Y95zkADjZg9hNa DI2sfHXtnDKWRqHcs58AM2urrlodsWN6o0Uf2X1qQBk/n1w84Td2NfZzqfYKJjs0cJrsF0/v40jxN csoOV2cAZYcazCW96GJi2AImEwpf1eKXNK15JIKYQURglOchEzMSPz0VYiAqHVoIcgq/+Fg27lPLJ tgzp5MzmtXOIoQSi32hGiBXqZIlhcqncAAM2Iu8CZcUJkaIC9dCvrUINtp2b6ryyH3xtsCiXCPo1k gt2Qw2LA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndDg0-003TMl-4P; Sat, 09 Apr 2022 16:11:04 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndDfw-003TMP-LA for linux-arm-kernel@lists.infradead.org; Sat, 09 Apr 2022 16:11:02 +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 ams.source.kernel.org (Postfix) with ESMTPS id 83063B807E8; Sat, 9 Apr 2022 16:10:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0BBC8C385A0; Sat, 9 Apr 2022 16:10:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649520651; bh=cTKL1F31CIQToQ35CYJ+AmCBp5bzWjT+VlcGvRQj/No=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HxnlCFXtk9zeaf9ZZ6nB8dFp0ADFtPVQw76imtGsdqweqsO2DRWoJr7mjuPnkM5zT kZgoHN5KZrXCzFguO7/7LNf+j7akKyXPzjP9mK/5956Vl1gIQcBTv8P7HhDLBkU+9C R2jPLipbwSeXCpNGvdGB2fCIONQFr/fbKrNaC0FqDzUc/gEIQc8+WByN47mYxcrtNr +LNmmqALKHLNAGXCK6GeIorkDa6L4jw/ncrGgypoTO5vil/LASRjDU2EEFOpgO+Tu5 9RVIoBxEFdhI1u60/o0w8OFO08f5cBnFmBUzSvH0Zn4lZHA3VABEBEyRIdxnBbA/t6 ir3NBlr9QU6dw== Date: Sat, 9 Apr 2022 12:10:50 -0400 From: Sasha Levin To: James Morse Cc: linux-arm-kernel@lists.infradead.org, stable@vger.kernel.org, Will Deacon Subject: Re: [stable:PATCH v5.4.188] KVM: arm64: Check arm64_get_bp_hardening_data() didn't return NULL Message-ID: References: <20220408172219.4152131-1-james.morse@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220408172219.4152131-1-james.morse@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220409_091100_869576_A6097801 X-CRM114-Status: UNSURE ( 9.12 ) X-CRM114-Notice: Please train this message. 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Apr 08, 2022 at 06:22:19PM +0100, James Morse wrote: >Will reports that with CONFIG_EXPERT=y and CONFIG_HARDEN_BRANCH_PREDICTOR=n, >the kernel dereferences a NULL pointer during boot: > >[ 2.384444] Internal error: Oops: 96000004 [#1] PREEMPT SMP >[ 2.384461] pstate: 20400085 (nzCv daIf +PAN -UAO) >[ 2.384472] pc : cpu_hyp_reinit+0x114/0x30c >[ 2.384476] lr : cpu_hyp_reinit+0x80/0x30c > >[ 2.384529] Call trace: >[ 2.384533] cpu_hyp_reinit+0x114/0x30c >[ 2.384537] _kvm_arch_hardware_enable+0x30/0x54 >[ 2.384541] flush_smp_call_function_queue+0xe4/0x154 >[ 2.384544] generic_smp_call_function_single_interrupt+0x10/0x18 >[ 2.384549] ipi_handler+0x170/0x2b0 >[ 2.384555] handle_percpu_devid_fasteoi_ipi+0x120/0x1cc >[ 2.384560] __handle_domain_irq+0x9c/0xf4 >[ 2.384563] gic_handle_irq+0x6c/0xe4 >[ 2.384566] el1_irq+0xf0/0x1c0 >[ 2.384570] arch_cpu_idle+0x28/0x44 >[ 2.384574] do_idle+0x100/0x2a8 >[ 2.384577] cpu_startup_entry+0x20/0x24 >[ 2.384581] secondary_start_kernel+0x1b0/0x1cc >[ 2.384589] Code: b9469d08 7100011f 540003ad 52800208 (f9400108) >[ 2.384600] ---[ end trace 266d08dbf96ff143 ]--- >[ 2.385171] Kernel panic - not syncing: Fatal exception in interrupt > >In this configuration arm64_get_bp_hardening_data() returns NULL. >Add a check in kvm_get_hyp_vector(). > >Cc: Will Deacon >Link: https://lore.kernel.org/linux-arm-kernel/20220408120041.GB27685@willie-the-truck/ >Fixes: 26129ea2953b ("KVM: arm64: Add templates for BHB mitigation sequences") >Cc: stable@vger.kernel.org # 5.4.x >Signed-off-by: James Morse Queued up this and the 4.19 one, thanks! -- Thanks, Sasha _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel