Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp409800imi; Thu, 21 Jul 2022 03:37:48 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sA5XBOK1jX9gH0GC+Q5dtHBAhXxspDvzqjkZYB24AjGnrcNVpfY4ZCnWWofmDa3QFKoq/S X-Received: by 2002:a17:902:b686:b0:16c:ae59:c9b4 with SMTP id c6-20020a170902b68600b0016cae59c9b4mr38117772pls.26.1658399867817; Thu, 21 Jul 2022 03:37:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658399867; cv=none; d=google.com; s=arc-20160816; b=JZrEu1R5rvzM0I5E6x6kZYq4v5lrMNNi9SN0jVDKG7cG5J1pqqgL0D271FpYBHS0ji T1hmP5Cf900RlCMdnPbzXV3ThL7VipKG7Zhw0vpJpN3qrCm1pA07+0bv8HcIpEGnUIAm 6lT4oXczZpM2PAynzEmBmlWH8cXXph2srms5bVAAHnMY/M0V1UMtYKiCc7JOOAyp+ErY 52x2al3IqixY+7g9tkD8ZP33uTUKgW7/EqdjM/huywgoHuPJjhAfXG40fGuPR7DQJZtD peVpXoRQZ4cROk+enCS5x3W6Ue0Zl29fU2iaGo0CYaPag9S0hc2hTsD+sjxSnReAK5gL qelw== 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=sB5+VFg26y53vqC/8MRmL6RVPSMPo+AiiM8Gm3tkc5I=; b=EB4scI6kIllChJ6llKuQSt9HHBawbLbq2LWxCVuWjHSltyeFylj/tqqCNDfw7cDJ+G z/q28CKWLelVDN1fOYshf8fI64rIP3D5CK3VsvHUfxnHydaWhgvsDI0ArjXaPLyOZbRR lIaZ0nvbf48s4wYLqSValYZi+oVwA7drJD0bwlZxWKiV/9lSWvL/QnK/eHDcaGxQTibE MRVcYamPiBifz+44npA3t9X9nKHYyfx/n/kOAx8Yc7UxR40nsElmO5Cr9WxqW2V5F/ox uQfyXsvGNkMr2u0iZ4YjnhEvNVrFB5QdDkbh5I2nPTKOz3LLZZo6ZSapdjbgnrZR4iGQ Gc8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="DpM33J/m"; 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 b2-20020a633402000000b003ab358a4d44si1943711pga.199.2022.07.21.03.37.32; Thu, 21 Jul 2022 03:37:47 -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="DpM33J/m"; 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 S232907AbiGUJ6Q (ORCPT + 99 others); Thu, 21 Jul 2022 05:58:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232917AbiGUJ6O (ORCPT ); Thu, 21 Jul 2022 05:58:14 -0400 Received: from mail-oa1-x29.google.com (mail-oa1-x29.google.com [IPv6:2001:4860:4864:20::29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DEB6820C9 for ; Thu, 21 Jul 2022 02:58:13 -0700 (PDT) Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-10c0430e27dso1699196fac.4 for ; Thu, 21 Jul 2022 02:58:13 -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=sB5+VFg26y53vqC/8MRmL6RVPSMPo+AiiM8Gm3tkc5I=; b=DpM33J/meqDpm/cC0Fst4MfLsktLCbHt60MbQA7Ft0z/s315GwSGwjCSkhbqSMdmmY CeUnaja1sQhfgPKcSU/Lk9M6cPdAsmvAv5tnXbpO085Oqw6Qe1mDTFJxYDzuzkJFczYJ TA40gFokhgf7/+q0gbQ4RYD5ac/0wTBaXypFKkJRhOULDcM3IBEHi1zF01rrBQCtOUyC 7IpgpmZkUDiPGvXFYFUN80kMKMT1Fxsx+KH6WO/niHoWVAMqhu1mzuQ4pXP2kmxjdp/F hXfdqEsqPIHbeNuxzy5v79CGC8h44k8BGCQx36AFeagdG3v7aM945fsCFNA9uavNztfE IQKg== 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=sB5+VFg26y53vqC/8MRmL6RVPSMPo+AiiM8Gm3tkc5I=; b=GcPzfDzj+m/qmQ9ut9v++wptorEL8tFxx8MnMMPcMBV8kwxrR8BvGzAkKJbyNeh6YP Ls1qFyRSgYWBXp/daHrvhUsxiqQDFuUra7lGXFRNo4/FM+dqysuCRtHLBlsaalyZXTW6 24sLCnsDSHuqK5MEMuQE33/mbtnAWsu8Yuqjgcuwh/GnO/5cCpJu5Y1YPc5KEfTa7yWF 9PP0jgarNNA7CdmKAJSQjVraKyBAKOkrKa/xIUHwP3LW/FLqLMnon0z9ryTNjA2wB72W XBncjvW6LxJwQy5TGcJVm/wTAkMw45rH73zr0wRG8kJ50299PPQtsy4Ovjv1XSIPSPup KFiQ== X-Gm-Message-State: AJIora8NQnM1G84itfkX4t2cI13YqkrIbNT+bSjreqLqeYsT5Wl6/z0k 9hBTIxYLWYn33Vnegx7UKLrraek54lU9Xj6B2ASEdQ== X-Received: by 2002:a05:6870:2303:b0:10c:2ed1:6326 with SMTP id w3-20020a056870230300b0010c2ed16326mr4422385oao.146.1658397492622; Thu, 21 Jul 2022 02:58:12 -0700 (PDT) MIME-Version: 1.0 References: <20220721055728.718573-1-kaleshsingh@google.com> <20220721055728.718573-7-kaleshsingh@google.com> In-Reply-To: <20220721055728.718573-7-kaleshsingh@google.com> From: Fuad Tabba Date: Thu, 21 Jul 2022 10:57:36 +0100 Message-ID: Subject: Re: [PATCH v5 06/17] arm64: stacktrace: Add description of stacktrace/common.h To: Kalesh Singh Cc: maz@kernel.org, mark.rutland@arm.com, broonie@kernel.org, madvenka@linux.microsoft.com, will@kernel.org, qperret@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 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 Hi Kalesh, On Thu, Jul 21, 2022 at 6:57 AM Kalesh Singh wrote: > > Add brief description on how to use stacktrace/common.h to implement > a stack unwinder. > > Signed-off-by: Kalesh Singh > --- > > Changes in v5: > - Add short description of each required function, per Fuad and Marc > - Add Reviewed-by tag from Fuad Actually it's missing :) Reviewed-by: Fuad Tabba Cheers, /fuad > > arch/arm64/include/asm/stacktrace/common.h | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/arch/arm64/include/asm/stacktrace/common.h b/arch/arm64/include/asm/stacktrace/common.h > index 7807752aaab1..be7920ba70b0 100644 > --- a/arch/arm64/include/asm/stacktrace/common.h > +++ b/arch/arm64/include/asm/stacktrace/common.h > @@ -2,6 +2,21 @@ > /* > * Common arm64 stack unwinder code. > * > + * To implement a new arm64 stack unwinder: > + * 1) Include this header > + * > + * 2) Provide implementations for the following functions: > + * on_overflow_stack(): Returns true if SP is on the overflow > + * stack. > + * on_accessible_stack(): Returns true is SP is on any accessible > + * stack. > + * unwind_next(): Performs validation checks on the frame > + * pointer, and transitions unwind_state > + * to the next frame. > + * > + * See: arch/arm64/include/asm/stacktrace.h for reference > + * implementations. > + * > * Copyright (C) 2012 ARM Ltd. > */ > #ifndef __ASM_STACKTRACE_COMMON_H > -- > 2.37.0.170.g444d1eabd0-goog >