Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2202619imw; Sun, 17 Jul 2022 03:53:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1saY9VP7m+n+JhclWt72bz8KM5/l5E0SFgD5vhblcBvkCoLPPfZdi8ClxyoFHJrecSMz1EX X-Received: by 2002:a05:6402:5205:b0:43a:b520:c7de with SMTP id s5-20020a056402520500b0043ab520c7demr31011534edd.22.1658055210288; Sun, 17 Jul 2022 03:53:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658055210; cv=none; d=google.com; s=arc-20160816; b=p2XEl5cDluh+yNq6fhRulqNi29FGiVTqxIn7s6KJ3QXrZlFnTyY7zoMXApnbfwVclG OyqguP8kUAEOULOYCQ1ItQ43BYFqQzfAZty3HSeqdWlGFgmNEcxKf1ZzABaB0iwUtpB+ K+76D0BMN9hj3magG2F3x1IAiXFQlVgYPn9ghWsiI6cKz0YjsC6yB4zPby/tSl7efCDS x5Sewz6QSMBXceXJhyb5wp7qJtCASDiak3XbYIe7g7YvFND4UEcvNsfAf9R7fGGULRCG kpa3C0QSkPpR0Z6FHpesVtTbHm9EOIJz/b1sBYXaZtCTJQhbSZF3+fMCPpZ2Q2yckkY2 VzIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=niauvhDLgqX+ub0oikI8WE4ffDCfj5qGa3vcFLYjfRU=; b=k56rEvRd+vPNukH+QWfnS3SS2vaaCNoUnQamDMbWW/A1l8r5tma7Yrywl2yJLx+cRl o96X5WDfxnIJdeySP74oyushF0sy259Y7E+NevutNWxeZAGvVTBlPNX9IP0M+eCYzRYi XDebudheAairrlNjTZ6CXS0N/1z2hnk4GvHk5s6qdFWW2eUcaI0i0OL6g1cowHdhgWT/ a/YOWj9xy4m80YWRI9UvIQkVRBy97SptpgJQjUVMBY207zOnxqVeyQtsA82MrjivT+NR M0NbjCsaiXHvCBB5T7ipU8gvKZGo7QpLSjLhVD7OUKv51oqXTFivNO9TqA8A2+Vh7l7a D06g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="pSDnm/bU"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dt12-20020a170907728c00b0072afc15af40si13300978ejc.39.2022.07.17.03.53.05; Sun, 17 Jul 2022 03:53:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="pSDnm/bU"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232502AbiGQKnc (ORCPT + 99 others); Sun, 17 Jul 2022 06:43:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229731AbiGQKn3 (ORCPT ); Sun, 17 Jul 2022 06:43:29 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B25A15709 for ; Sun, 17 Jul 2022 03:43:27 -0700 (PDT) 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 96594B8091E for ; Sun, 17 Jul 2022 10:43:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F299BC3411E; Sun, 17 Jul 2022 10:43:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658054604; bh=iSE5dgUJcHMVav4waBygNS5QidjTiMxbKVsgdaFAqYs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=pSDnm/bUaknyQUw4WtskGPATYLxLnKQCfWgTvIyHJgF8uJ1HwYJwGUwYPajhfd8EY vldkMUD69pMh3b4/VLKtDGI3NPX+y21m65HxI4woQSD8kQYIbrpXNee4J0AniDuCTS 1VfZ/eNRglHrZ5Qav54KI0RpKu0tNb4T9pklF7cWdmsQH31XTrFJgMtzOdB9PECj17 k27QfWcp5CV1xxm+6OlrG98awCowRoP9FsrFfF+7As3oAFfVd+5jvdsYpbSKllBqLX u/pc9AYjEOugirgq0RP5Hsd0PaWNfE88DoSm5u/v3TqKfEx8FA8EmuH1TZESnqaMTB pAdNh05imlNWg== 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 1oD1k9-007zpX-Tw; Sun, 17 Jul 2022 11:43:22 +0100 Date: Sun, 17 Jul 2022 11:43:21 +0100 Message-ID: <87zgh8yq7q.wl-maz@kernel.org> From: Marc Zyngier To: Kalesh Singh Cc: mark.rutland@arm.com, broonie@kernel.org, madvenka@linux.microsoft.com, tabba@google.com, will@kernel.org, qperret@google.com, android-mm@google.com, kernel-team@android.com, James Morse , Alexandru Elisei , Suzuki K Poulose , Catalin Marinas , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org Subject: Re: [PATCH] KVM: arm64: Fix hypervisor address symbolization In-Reply-To: <20220715235824.2549012-1-kaleshsingh@google.com> References: <20220715235824.2549012-1-kaleshsingh@google.com> 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") Content-Type: text/plain; charset=US-ASCII 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, tabba@google.com, will@kernel.org, qperret@google.com, android-mm@google.com, kernel-team@android.com, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 16 Jul 2022 00:58:24 +0100, Kalesh Singh wrote: > > With CONFIG_RANDOMIZE_BASE=y vmlinux addresses will resolve correctly I guess you mean *incorrectly* here, right? > from kallsyms. Fix this by adding the KASLR offset before printing the > symbols. > > Based on arm64 for-next/stacktrace. In general, place these remarks after the '---' line, as they don't really make sense in the commit itself (which is likely to be merged on a different base anyway). > > Fixes: 6ccf9cb557bd ("KVM: arm64: Symbolize the nVHE HYP addresses") > Reported-by: Fuad Tabba > Signed-off-by: Kalesh Singh > --- > arch/arm64/kvm/handle_exit.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/kvm/handle_exit.c b/arch/arm64/kvm/handle_exit.c > index f66c0142b335..e43926ef2bc2 100644 > --- a/arch/arm64/kvm/handle_exit.c > +++ b/arch/arm64/kvm/handle_exit.c > @@ -347,10 +347,10 @@ void __noreturn __cold nvhe_hyp_panic_handler(u64 esr, u64 spsr, > kvm_err("nVHE hyp BUG at: %s:%u!\n", file, line); > else > kvm_err("nVHE hyp BUG at: [<%016llx>] %pB!\n", panic_addr, > - (void *)panic_addr); > + (void *)(panic_addr + kaslr_offset())); > } else { > kvm_err("nVHE hyp panic at: [<%016llx>] %pB!\n", panic_addr, > - (void *)panic_addr); > + (void *)(panic_addr + kaslr_offset())); > } > > /* > I'll fix the above as I apply the patch, no need to respin. Thanks, M. -- Without deviation from the norm, progress is not possible.