Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp764245imn; Tue, 26 Jul 2022 08:40:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tpT9S7svJoUQR78aLZOLBavjd55DoQEHrpugY+tl8b8Q5XlY9dRPKlbFDQp74EvutuyQoQ X-Received: by 2002:a05:6402:d0a:b0:437:66ca:c211 with SMTP id eb10-20020a0564020d0a00b0043766cac211mr19003696edb.29.1658850021048; Tue, 26 Jul 2022 08:40:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658850021; cv=none; d=google.com; s=arc-20160816; b=U1cBm81InHsCmoInu4c02xLyEWIlqOaRE7LyveD6gL7pWRbcPbBpNoH5Ieq0DN5sxS iYiiFwHR/v4XMBwMcD4zVte77GoVPHaoVKFvNxEXfwWHKk9eWpNQhi8/5m2aOeCn6fay iAecn8GUkNonztF0nd/0TlDjWC6Qr7tjKMuX1HkR0Vn+C3PM47dBWd94eZzAHPd1W88E 5gg97brSiClvZ10xYetTWQ4SPiUS/jecjGCH20UwpRx58z8T/sQfseOGmsQI1T6VM0we xFYhfW+m0CBz9Hcr/JQy2m74c31+CjcosQuJDq31ThDLC8oJE8dtjMCfOW6slJuvRfxc xV1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=h0wgweyi5NGRv+HE2MTaBWrplm2EHlyiIAxkkqIQSs0=; b=usIjA+Mt2jhtTF0bxuNTODKRffKLCs/H2trowWTsZHbdu5D0BWDWUWYdCQkwwyFTMl 7fWdlvwNW86OSgV7BYPixDblwHVx8OHXeRg6SYOW+/uBq5wD6usKpGx5RZ+Tm7GpuJwb Lemh1Oxz9l+YIsQfKpvMdQ6dttwfgJ7c/Iu9IfSuZnO3mfhrjx9IVG8UygRFy5hTlOSO 6s1CqzIlLxqxG2ylynNzFAIQ4jLnovhihiYwVCOR/Ro2b1qDhRKYtklNDSjGsMgJ+8Uz /SD1cioeUxg4aDXYgIJj0CUOn+fgAXgAz2u4cN3HCi0X13AlOIekScprChATfOKkWaeO WAyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=X47Kxyiz; 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 sg6-20020a170907a40600b007269f2170e3si18243010ejc.754.2022.07.26.08.39.56; Tue, 26 Jul 2022 08:40:21 -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=X47Kxyiz; 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 S234171AbiGZPa1 (ORCPT + 99 others); Tue, 26 Jul 2022 11:30:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230219AbiGZPa0 (ORCPT ); Tue, 26 Jul 2022 11:30:26 -0400 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99D1DAE45 for ; Tue, 26 Jul 2022 08:30:25 -0700 (PDT) Received: by mail-wr1-x434.google.com with SMTP id bn9so9794675wrb.9 for ; Tue, 26 Jul 2022 08:30:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=h0wgweyi5NGRv+HE2MTaBWrplm2EHlyiIAxkkqIQSs0=; b=X47KxyizSGoS2M4kT8l3dojbBsx8AlSGEk/cpikgOxJynDa/Y5++hdo0KEAxdqBZMw SyXwpOijT0+YR5+VNyj5Er+GLUFDxf3oOutcVSwsJudhHX+45ov34VH+/yEvyjbvE8OE J/EFnpOl9nJGfEPyWu+AOV5EfDpSl/ROMPUnOAE39kCW9HcAIfrNVEJPbYmzGJv6u3fo shx9bLD+thS2W6D2iiGNBW/5/NgufOiCpSr/QOMU5h3KjQtCEiPeMliB/NdB3fhWZCYA Kw2/wCpm0xIephjsdP0ShBZ2PdbKM3zzjT1FtA6vcdwADBxizYVd8YY3CBuSJYnZk34O MEZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=h0wgweyi5NGRv+HE2MTaBWrplm2EHlyiIAxkkqIQSs0=; b=S17urj5iN0zAlY5Si3lvNV0spQhE1IYiaXQbHq80l/SmlDssKOmDRnvSlG6q5NjGoZ Hhlb9IGKTjkhsdZJnQMKaeRsbFl6OnqbH7S1uw2979cHtXVC26AECl+0/MEDcqNewNy3 4keWImmoNjkIBMApJ72KnUlEGd31tC5x5jRpBhQ/YZSYDqTNmc3cP31Hl0rWNub7W8es PN14kxzrQbfss0QZYq4bATdGvA1WR/A869aFLYRA5AWpNUCA4HgRagfENZGRqkDlMDJg 5GEFuDdryGS9SMvDxrW2tO/snQIW+j0AjzW1UjKQznVFEZScV7CP7x0zHDhRVvnQz+DI vnnQ== X-Gm-Message-State: AJIora8i+4EdO8M2mvAMRQN4qBE/71+Oivak6Pmyt/tQwNpaJOdF3jNl wcRwVsDnvZyM1kIbJzflR2sOixXUgu/pah1XKHmeAQ== X-Received: by 2002:a05:6000:508:b0:21d:4105:caf9 with SMTP id a8-20020a056000050800b0021d4105caf9mr11603813wrf.699.1658849423820; Tue, 26 Jul 2022 08:30:23 -0700 (PDT) MIME-Version: 1.0 References: <20220726073750.3219117-1-kaleshsingh@google.com> <20220726073750.3219117-5-kaleshsingh@google.com> In-Reply-To: From: Kalesh Singh Date: Tue, 26 Jul 2022 08:30:12 -0700 Message-ID: Subject: Re: [PATCH v6 04/17] arm64: stacktrace: Handle frame pointer from different address spaces To: Mark Brown Cc: Marc Zyngier , Mark Rutland , "Madhavan T. Venkataraman" , Fuad Tabba , Oliver Upton , Will Deacon , Quentin Perret , 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 , android-mm@google.com, "Cc: Android Kernel" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_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 On Tue, Jul 26, 2022 at 7:34 AM Mark Brown wrote: > > On Tue, Jul 26, 2022 at 12:37:37AM -0700, Kalesh Singh wrote: > > The unwinder code is made reusable so that it can be used to > > unwind various types of stacks. One usecase is unwinding the > > nVHE hyp stack from the host (EL1) in non-protected mode. This > > means that the unwinder must be able to translate HYP stack > > addresses to kernel addresses. > > > > Add a callback (stack_trace_translate_fp_fn) to allow specifying > > the translation function. > > Reviewed-by: Mark Brown > > with or without one very minor thing: > > > static inline int unwind_next_common(struct unwind_state *state, > > - struct stack_info *info) > > + struct stack_info *info, > > + stack_trace_translate_fp_fn translate_fp) > > { > > + unsigned long fp = state->fp, kern_fp = fp; > > As a coding style nit I don't love having multiple assignments on a > single line especially as part of declarations. Hi Mark, Thanks for the reviews. I'll update this if a respin is needed. --Kalesh