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 X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16467C433DB for ; Thu, 18 Mar 2021 20:28:14 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5C6E164F18 for ; Thu, 18 Mar 2021 20:28:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5C6E164F18 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0dq8r7KEOyFaHT10BySYe69PTsrKqEyieb8B3Ef8oaE=; b=eMmSphcqCMn7HDDQd4hGRRdQt mZOIaut/qJkcohzfmQNpUG2Ho10+Xgn1VSUiXoOcxRSaIqialQQJ9rsXK/BCTzAC10VHDxU7MANJm yRDZws01rjYEfKG2WFYQ55/e6cnWDFJ/mCD+23Xh7L7Lo9OybPPC+hFT+3ba/5eGBIH/gYli2OmqP rTC+rTsdPgh6e9026EE+PzbcmIpnCajPAp3twFFf/j1ferV32yZCYN/s7dM6435q88pVT56CiQnvv GOncOSlMxIt8MQYtZbHO/FTgeW1UCiVsEknJnuQirmA2ui3HjLytYZlfpAZ/5xN2I9erbgYUt/ojm mfUJp1pPg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lMzDr-005zRV-Qu; Thu, 18 Mar 2021 20:26:25 +0000 Received: from linux.microsoft.com ([13.77.154.182]) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lMzDm-005zR9-Qv for linux-arm-kernel@lists.infradead.org; Thu, 18 Mar 2021 20:26:21 +0000 Received: from [192.168.254.32] (unknown [47.187.194.202]) by linux.microsoft.com (Postfix) with ESMTPSA id 07B2C209C385; Thu, 18 Mar 2021 13:26:13 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 07B2C209C385 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1616099174; bh=SErigyigsB0CpeFt4XrJIuybAQdBkzUzy9hIoufBLVI=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=ZrFg9y5qLvRUHYY1YNzQUvIM046vnG2grx/rbBeb1HEIh+Km+1V1A8PJjCyRTtwwm +kcZcaQeEx4bR4vMvgv4uf4VePkcFT44JZvSs7O+HvmhY5aPe+HaKvw6BaNYC0j/oP Dg3myggTvd9jAj8y4mi+wAdCj/vOjmb0qmH1QIIQ= Subject: Re: [RFC PATCH v2 1/8] arm64: Implement stack trace termination record To: Mark Brown Cc: mark.rutland@arm.com, jpoimboe@redhat.com, jthierry@redhat.com, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org References: <5997dfe8d261a3a543667b83c902883c1e4bd270> <20210315165800.5948-1-madvenka@linux.microsoft.com> <20210315165800.5948-2-madvenka@linux.microsoft.com> <20210318150905.GL5469@sirena.org.uk> From: "Madhavan T. Venkataraman" Message-ID: <8591e34a-c181-f3ff-e691-a6350225e5b4@linux.microsoft.com> Date: Thu, 18 Mar 2021 15:26:13 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210318150905.GL5469@sirena.org.uk> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210318_202619_078788_0CD53754 X-CRM114-Status: GOOD ( 21.48 ) 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 3/18/21 10:09 AM, Mark Brown wrote: > On Mon, Mar 15, 2021 at 11:57:53AM -0500, madvenka@linux.microsoft.com wrote: > >> In summary, task pt_regs->stackframe is where a successful stack trace ends. > >> .if \el == 0 >> - mov x29, xzr >> + stp xzr, xzr, [sp, #S_STACKFRAME] >> .else >> stp x29, x22, [sp, #S_STACKFRAME] >> - add x29, sp, #S_STACKFRAME >> .endif >> + add x29, sp, #S_STACKFRAME > > For both user and kernel threads this patch (at least by itself) results > in an additional record being reported in stack traces with a NULL > function pointer since it keeps the existing record where it is and adds > this new fixed record below it. This is addressed for the kernel later > in the series, by "arm64: Terminate the stack trace at TASK_FRAME and > EL0_FRAME", but will still be visible to other unwinders such as > debuggers. I'm not sure that this *matters* but it might and should at > least be called out more explicitly. > > If we are going to add the extra record there would probably be less > potential for confusion if we pointed it at some sensibly named dummy > function so anything or anyone that does see it on the stack doesn't get > confused by a NULL. > I agree. I will think about this some more. If no other solution presents itself, I will add the dummy function. Madhavan > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel