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 6D9F5C433F5 for ; Thu, 3 Feb 2022 00:41:01 +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:References:Cc:To:From: 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=z1KDXPWkxP7uvcvIztccwRAs/eTdwokFJvWoFE0FMbA=; b=KphVzMNftO9Kjn l0IigYapCAghBJ501hU/kUCk3z8mskEG2tOrhOmd1vW9LrExYpj2JfNNDZAgLimc06VT+4L1/vdBE GfwCSwbqTfaS0PeepipwYTDH76WeBUXwES+owDtpGBM4RcWCqtHOSfbflfp5CrDTDznbrFWbW/XLH QukkeVmbghP8YOOiBpbXtmJDb1lE9X71ysC8K3aseOnwV1iit9VodRAuea9nNDd7mGaF9JURbvwHz X4Cw/Gz4fatRcYTXIPAaTnwkKra3wPoc4/L80M4s9kFKB+KiEu9gmYTfR4CJ1IhZTMxR6UEJscigI DFWPnlid5qCKaVoqSPgA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFQ9u-00HE5a-Os; Thu, 03 Feb 2022 00:39:34 +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 1nFQ9r-00HE4W-TQ for linux-arm-kernel@lists.infradead.org; Thu, 03 Feb 2022 00:39:33 +0000 Received: from [192.168.254.32] (unknown [47.187.212.181]) by linux.microsoft.com (Postfix) with ESMTPSA id 72E2420B6C61; Wed, 2 Feb 2022 16:39:30 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 72E2420B6C61 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1643848771; bh=GftQnaZmoXOg3pi7YQk/y5waoxN7UBdPSQ4aS5QGUIY=; h=Date:Subject:From:To:Cc:References:In-Reply-To:From; b=dslc/QwSqbJotie/8onj+pRmzc627WbKjEXF1vhEHTuyQzxZZq/mW3bIMohHf/MCs h3XEMWCjg9d3p+n4cSIKnm3LZvYoUPp+G/pdxNd7gYVgi6jp/mf+Pfab67b+Ndi0DZ +A/WV4pqkCXvUcMngjaUlIjBZZBJEx5GBZ0Oys/Q= Message-ID: Date: Wed, 2 Feb 2022 18:39:29 -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 From: "Madhavan T. Venkataraman" 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> In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220202_163932_013948_D7C2EA61 X-CRM114-Status: GOOD ( 16.68 ) 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 18:26, Madhavan T. Venkataraman wrote: > > > 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. > If what I have suggested above for comments is good enough, can I get a Reviewed-by for this? I will fix the comments on the next send. > Madhavan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel