Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp963628imw; Fri, 15 Jul 2022 17:00:11 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sx2b2kQyQfrS3TPcisocS94v31/1lmR28TIw97sLt1W6e8hhl9Tu2OTx80dvMvzqL/8i0Q X-Received: by 2002:a65:5a42:0:b0:411:bf36:eeec with SMTP id z2-20020a655a42000000b00411bf36eeecmr14068521pgs.522.1657929611161; Fri, 15 Jul 2022 17:00:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657929611; cv=none; d=google.com; s=arc-20160816; b=WpPLuRHhGOngJ7zLbDzHy/6cFAX9wIRJmKsqMvRBHL7tjeOAllEYYkOem1+5S7uoyx BJT5Z4DtU6hJ/eAZ6r1Vnc1NmexX6n9gMFhXHTldhLtDaCqH0UVCHrtTEVmjKYXXbtmV wSfzlr0btmoLdL43L0bpbBLft+DhCc+LNFEdqk1ZprXAasEClepOVc80m7B+cZMhTbgr Qs5v/FNNtRldjlv4CGWROhjrro/T7l7+WQVzuJjcuAakdenU0Gqk5Vzip5REXu4htvm/ l/fy537Ug3nc7oqD5whNnD0XnmStpcxBAMDFqWToB7/uYkDKffyuSQJPTIu7cURT8jae XioQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :dkim-signature; bh=4Gh4HGzCqCiR1aMRIxtcGB+xW1TuymtOUOGGi3XUe+w=; b=vnd5fhG2y6FRktK2FTokEoVrP6EO8V8Rq6jU88AewIHQgzn2yTRJLKWlto3GKQ7rl5 jyVX1XWIFogUqJzl3YZry7GFIeANq20CSEVs3Z+pnukhTMF6Y4mlhBWAUi1Xm+pgQeDX xQFmlVXzP4hhZUzfQE2bswOtlEEmiexsCG913at3N1kBj5jxyt1H1cR2Tpa/uSrP8bUM tJW+NyjWW8mD+Pt5qZaoVvXxRgd5UF/UBFo2Wc/hbGQfG8qngI/mg1ng5QORYON+9GMp J71qvMQ7h4Lw+9nJ/tGtUkkVeOztdniRTaokA+zhTY5S2UZXeklhvN0th5fHVofLZJg9 FWag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=laaDvU+r; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lb10-20020a17090b4a4a00b001ecdcd18eb7si6300757pjb.154.2022.07.15.16.59.55; Fri, 15 Jul 2022 17:00:11 -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=@google.com header.s=20210112 header.b=laaDvU+r; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230012AbiGOX6e (ORCPT + 99 others); Fri, 15 Jul 2022 19:58:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229619AbiGOX6d (ORCPT ); Fri, 15 Jul 2022 19:58:33 -0400 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0298E95B29 for ; Fri, 15 Jul 2022 16:58:33 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-31cbe6ad44fso50759517b3.10 for ; Fri, 15 Jul 2022 16:58:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:message-id:mime-version:subject:from:to:cc; bh=4Gh4HGzCqCiR1aMRIxtcGB+xW1TuymtOUOGGi3XUe+w=; b=laaDvU+ra+tX4Ugt/hApPQt2F+7sMcLjlMfErCxQ6ZAH13Fl9Hv7omF2Saquz513mu J+bzAYxUx7CJ7btjmdncYrC4Y1veu4NHmQSeNXnOpqCAxzIaB5YMd/l72BqrmAcB25Re aNK+JcXfLhxCXei0o7ELRQeRTW82+RLqR5IixgRFrLcuYYER2aDhKQ486g/VCwUqVWtH tasGaqajdMOPcNItlrkBHc6TN6iHktOIIjVTgbV/GxxseQ1L4UA2gFqmJgw62Ugr1v/5 6gP6onX2YcRMENGDJD/h2b8G3wSA1GpfizjMN4ihAYbf/2VUfRAwE7VGIPqLL9iTf/e3 aq7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=4Gh4HGzCqCiR1aMRIxtcGB+xW1TuymtOUOGGi3XUe+w=; b=xJAsgOatK1sjExKQQPaJppfqVoOp8sH4ZrtcH/fpavQJF3PeRODqwu+YJrWzd6+Us1 cAz5+T67YBvV13+eu6762XmZ3AJZ15PoQGIuOlpBRXXDW0tfk8UEYh1bwgY5WI9k+tkK kOeq5ABB8WIdmYw4vHJrxFMjq2AFPF5wW6yV8lTp8aeWIKO30RQVb/446qxpuzNF3XUH hF33t1ZvgHTqoeCn+VWI/atwnjgtHe5XEqRRTo5KReTw/AWwN8jbfMs3yZ8g4MrYiYtZ pzYqeViyMHzvI/IZ44Qa49lICr+IocoM0RRDBeAixL6dqcLjAWqm40r3MIxTJvRZK6YS aZzA== X-Gm-Message-State: AJIora9b18255ZUm/kg4UQY+l+X/81idLri+ECFrYHkkWiLRcMMShxaF 4NwZ6DZuoGze80MnsCIAtDmAxY9d9gqVUzqGXg== X-Received: from kaleshsingh.mtv.corp.google.com ([2620:15c:211:200:dbad:2778:c9ea:c5e9]) (user=kaleshsingh job=sendgmr) by 2002:a25:cb85:0:b0:66f:fffd:a726 with SMTP id b127-20020a25cb85000000b0066ffffda726mr3177720ybg.287.1657929512302; Fri, 15 Jul 2022 16:58:32 -0700 (PDT) Date: Fri, 15 Jul 2022 16:58:24 -0700 Message-Id: <20220715235824.2549012-1-kaleshsingh@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.37.0.170.g444d1eabd0-goog Subject: [PATCH] KVM: arm64: Fix hypervisor address symbolization From: Kalesh Singh To: maz@kernel.org, mark.rutland@arm.com, broonie@kernel.org, madvenka@linux.microsoft.com, tabba@google.com Cc: will@kernel.org, qperret@google.com, android-mm@google.com, kernel-team@android.com, Kalesh Singh , 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL 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 With CONFIG_RANDOMIZE_BASE=y vmlinux addresses will resolve correctly from kallsyms. Fix this by adding the KASLR offset before printing the symbols. Based on arm64 for-next/stacktrace. 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())); } /* base-commit: 82a592c13b0aeff94d84d54183dae0b26384c95f -- 2.37.0.170.g444d1eabd0-goog