From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2CC5FC433EF for ; Thu, 3 Feb 2022 00:27:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dLuyi2QXl/8k/TEFy9+1TdZtXYNZScnnVDvxkq8Zqxo=; b=jGYCGXu0lJLewj zuHwL+VmguFryTyTNFJfdKGGkkWmzL96aEWUsKxRDMwgryK5U1+kwrSQ9U6jWGxSTEHGxS7Jsbi+3 TxewbxIafr3tvmH6w7tz52nGENirPPF/hlBVWJR6+hEE145CKIGt/HHZ25iiMRWOvdEMtKXf33JKC YTiHc4ZKx5tFXIQADdnEmejrEMFVMRi7mnP0ElvPboao9WNneDT74ClrPT1soyVNxbb/8UJ+/aVB/ v/V4wpXP2RPdaQl2s3frdz64lUZ77VkJBD/Xit/lgDmUrOBtVbjrEq7bk4VCvCA87UCTN676q6pqJ 0t/BhdPDRJhP2xi+MNbA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFPx7-00H9wv-Gt; Thu, 03 Feb 2022 00:26:21 +0000 Received: from linux.microsoft.com ([13.77.154.182]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFPx3-00H9uy-Nx for linux-arm-kernel@lists.infradead.org; Thu, 03 Feb 2022 00:26:19 +0000 Received: from [192.168.254.32] (unknown [47.187.212.181]) by linux.microsoft.com (Postfix) with ESMTPSA id 70FA820B6C61; Wed, 2 Feb 2022 16:26:15 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 70FA820B6C61 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1643847976; bh=GGoSp90VTjyMWOeMVVC3jBavAQVQGNTVyNovIst1D2Q=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=E+YEKDvEwBTjUv2SBbMXyGJiVHHBvGevwPhn3+T4Y2RBYljudgf4oLnEr272wgT91 IDLRgWsU491Yn13OlOx/B6G3/Ao3kmPUaNNbJNOnQSj7trCORzqnxVOpStJJJbwtHX FUFvr3uUEO/xt+oeu+Mt8qJp5udjIaQffwYeR204= Message-ID: Date: Wed, 2 Feb 2022 18:26:14 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v13 04/11] arm64: Split unwind_init() Content-Language: en-US To: Mark Brown Cc: mark.rutland@arm.com, jpoimboe@redhat.com, ardb@kernel.org, nobuta.keiya@fujitsu.com, sjitindarsingh@gmail.com, catalin.marinas@arm.com, will@kernel.org, jmorris@namei.org, linux-arm-kernel@lists.infradead.org, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org References: <95691cae4f4504f33d0fc9075541b1e7deefe96f> <20220117145608.6781-1-madvenka@linux.microsoft.com> <20220117145608.6781-5-madvenka@linux.microsoft.com> From: "Madhavan T. Venkataraman" In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220202_162617_847912_D83E08CE X-CRM114-Status: GOOD ( 16.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2/2/22 12:44, Mark Brown wrote: > On Mon, Jan 17, 2022 at 08:56:01AM -0600, madvenka@linux.microsoft.com wrote: > >> +/* >> + * TODO: document requirements here. >> + */ >> +static inline void unwind_init_from_regs(struct unwind_state *state, >> + struct pt_regs *regs) > >> +/* >> + * TODO: document requirements here. >> + * >> + * Note: this is always inlined, and we expect our caller to be a noinline >> + * function, such that this starts from our caller's caller. >> + */ >> +static __always_inline void unwind_init_from_current(struct unwind_state *state) > >> +/* >> + * TODO: document requirements here. >> + * >> + * The caller guarantees that the task is not running. >> + */ >> +static inline void unwind_init_from_task(struct unwind_state *state, >> + struct task_struct *task) > > Other than the obvious gap this looks good to me. For _current() I > don't think we've got any particular requirements other than what's > documented. For the others I think the main thing is that trying to > walk the stack of a task that is actively executing is going to be a bad > idea so we should say that the task shouldn't be running, but in general > given that one of the main use cases is printing diagnostics on error > we shouldn't have too many *requirements* for calling these. OK. For now, I will remove the TODO comment from individual functions. I will add only a common general comment above all 3 helpers that additional requirements may be documented as seen fit. And, I will add that the task must not be running in other-directed cases. Madhavan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel