Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp248136imi; Wed, 20 Jul 2022 22:59:06 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uyQCvmDRdB9K1Y/Xr6Zc2u3c5WtH/tY1Px4fACq4NSEoF1lWn7OJwIVaynKkSBFKsBCSgU X-Received: by 2002:a63:c158:0:b0:41a:6685:59de with SMTP id p24-20020a63c158000000b0041a668559demr5790027pgi.95.1658383146389; Wed, 20 Jul 2022 22:59:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658383146; cv=none; d=google.com; s=arc-20160816; b=CLlPDszb+QJe+MCZY68kQdowk5na48MCVPOxqLxYLrWv7olDhcyx3a/LcZuPEz6e6C OX+iwvvHEPfctKcEQfz1RzKjYxDGLbMgzGnkWPnOQ+olnOquIAeN7ZtG7nkScfBCV1/U HkawTbIRHAeBMwa9DF4s5CEukQ0fWvgmoaVn9Pa6jekNQ5de9S1ig8I9ezmyuCYmJgXW BZ3sKt4CX1EETFgEDCVDsipkWm+zXj0LirOcaxDM5PxDPIFPcWp7zn2CC0BvY6QoJy2o fymqkSaO0ZnlCyLqG50BcVPZ5Fc4bULOrU6cjwF+/Bq/Aybk2FwureUADWVqBi9aI2a6 2b3w== 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:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=iLoEKCBMnlFKYYYcN0OANFAEglV5FtD84V5LcwTvHwg=; b=cb2cuWBXN9IQVsmqpGGSn30XLVSqVczQ+BilL3co/4F7PSodWQJ13E85ZTq2Jhmt7b 6KOqVRX1K9L+6K3wKclioGr4CFjMaKaI0wJsJjgdVxQeVihX9j7ye0GsKiLIloj+7jxd y5NMDnA1i+LeQnKNOH/5wYP1iNfGC/xjTAX2Hk8LoVr4dBSX5zOpjglqwI38VQdX7weK nvW7+xnjTa89JiXiPvUy1knQ8aDjpkjjrZtNrkPi/T+XJqzQWU1FBKoUONDLXNxj/50+ Num9htwRv5F2blbAPvjefvjxxDZSxYZd92cTpIPdT7aloO6jbaRMKAgOG3/jMpQSWn0M A44w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=iOS+USjx; 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 li1-20020a17090b48c100b001f2276bf92csi2597463pjb.181.2022.07.20.22.58.51; Wed, 20 Jul 2022 22:59:06 -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=iOS+USjx; 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 S231357AbiGUF6B (ORCPT + 99 others); Thu, 21 Jul 2022 01:58:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231228AbiGUF5u (ORCPT ); Thu, 21 Jul 2022 01:57:50 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0076F78592 for ; Wed, 20 Jul 2022 22:57:48 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id k64-20020a253d43000000b0067080eb57fdso587766yba.5 for ; Wed, 20 Jul 2022 22:57:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=iLoEKCBMnlFKYYYcN0OANFAEglV5FtD84V5LcwTvHwg=; b=iOS+USjx9NgCbUY4yL44SP1DEiSpvV4mn2X29qjPNJNxKeAXL+qsxjnw4XKuHrWeBy QD0Wm6fBKb8nu9zx4zo5TptOXWfccSlTjHBGDDSGFcaD8PPGK+TGhkHKPtLrzs/KbRJb H1SNm2km8Suv1iEJCtBPfDgjv+umAyAcBIe7aADByBmfws/QIkHBnZGLBs2FyCKyknys Gtc+j9+p2a6y9rCrUFts1wK/l0PmmdJjS5v5wA2EQwS66QfFDOyrTjSXddAEmXiHYdcB AeG3gM/Zw1g5oLlyQyCa7GCwb20o7b95xy2/Spd817zI5klqXWnSZI3hO3OG78CFY969 RoKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=iLoEKCBMnlFKYYYcN0OANFAEglV5FtD84V5LcwTvHwg=; b=FSh/46kgX7qUoJxBHrafFmaAdZ+oy7LF2Hgu3DlMVpNt/R/byALwcMCOVM60JZc2xe 5WrkcGo2IU/pamLQrth0OxV6k0q3sCQ2xpbuoMvr3ICIG3JLTBQMTPKwBwFGNe8Ks5od Ctih9ls386KY464ZGIP4uAVXyDxJUyiGdbeXidcMWU2DUYspZtmGlJVKbnP/biLCsF4t YiyLH0Fzj818byZlRc41YKW2RYtdwtjqNbmcC+lrjNtvaGmWo8XG2r1BOCZZD3thc6O3 V/nNa2nmN8SH+6QL7PMZchgUvCgJ3yUv9zoZDVPbAqGZC33OJN36b4dyRJilHwic4JTv 5kqA== X-Gm-Message-State: AJIora++QN9vmKUsHI1BBrRwFQB4jWd+UeBNuxZSidpnwsGl+UQb5IJt kd2xl7G/Q0QNITDaNF7KxBGgEr5lQ40oH2sB/g== X-Received: from kaleshsingh.mtv.corp.google.com ([2620:15c:211:200:5a87:b61e:76b5:d1e0]) (user=kaleshsingh job=sendgmr) by 2002:a81:57c3:0:b0:31d:e2dd:116 with SMTP id l186-20020a8157c3000000b0031de2dd0116mr34878043ywb.5.1658383068317; Wed, 20 Jul 2022 22:57:48 -0700 (PDT) Date: Wed, 20 Jul 2022 22:57:17 -0700 In-Reply-To: <20220721055728.718573-1-kaleshsingh@google.com> Message-Id: <20220721055728.718573-7-kaleshsingh@google.com> Mime-Version: 1.0 References: <20220721055728.718573-1-kaleshsingh@google.com> X-Mailer: git-send-email 2.37.0.170.g444d1eabd0-goog Subject: [PATCH v5 06/17] arm64: stacktrace: Add description of stacktrace/common.h 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, kaleshsingh@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, drjones@redhat.com, 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, android-mm@google.com, kernel-team@android.com 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 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 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