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.6 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 272CCC47076 for ; Fri, 21 May 2021 17:50:03 +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 A8C8F61353 for ; Fri, 21 May 2021 17:50:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A8C8F61353 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=fF0lpxO8jIAjShkvwiFM3bcNT4j6YVJXya1JLo8Y7gs=; b=A/ntKJ/lTMnDU4L07UwRtYSJQ+ QulmiPC4dAJs6v1vd3T7nMCzme/BfjlCho89GMCIw5sLtF7zfp/Ibd/joRTn8+03V+R/nXD0HJNAh wrdKOrYOA3QHtDEfyhj9vwTZRfOkoIUkQBBoxSp7YiN+MM3BAIqj1XlekGbZPn8SUDgsZplWQScS+ +tGe6T9Oe1FsyKvg662QBFoqdYsgcSHJUDojQNYFm7iljxKxawUe05J9c7lyD+Wqa+p0KT/D5Op1E hXLNF+tEC1vMtitiyMDAA1BHXS/hBhojlIWVfr2gJxg8IR+L9rYVJOMh24RjzgBsM9JemekzzqeSA cPi0Q5hw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lk9G7-000ayN-14; Fri, 21 May 2021 17:48:27 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lk9F0-000aay-Qt for linux-arm-kernel@desiato.infradead.org; Fri, 21 May 2021 17:47:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=vp4bh6cnn5xgTCxdBL3ssrfVr3lmhjwR6/PPJY0zW0U=; b=ANAfKgz0vBJP2g501IWmaqyeiY kNTZagK5bgRHyIf8aT9HioPmHyDp36Wc8kuaV79aIqjdlHLVlck5CK9HKBMtPACe2+dWdbA1LE5go uCVB10K1DtS0StsR7idYsDMkAjbbq69m15kzgq50IfL7Um/0FLpaJgF3bjySD4veSBDwEnnQlO1EI qrJlE+VgdtVAEyUa6Upcthbn34pmTlQGxyvFgWFGIwDYAsQqn+e2xGPtzXz8Cb4OG3kUD1Dn/YLm7 8TJdMAaNABD9209HPAdnt1yyrt9/2XfZp9nFQjrbgw0WpT+1Zd6G+izLXLlImF7BmyCIglp1MIhnK 60FubWRg==; Received: from linux.microsoft.com ([13.77.154.182]) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lk9Ey-00HKJD-6M for linux-arm-kernel@lists.infradead.org; Fri, 21 May 2021 17:47:17 +0000 Received: from [192.168.254.32] (unknown [47.187.214.213]) by linux.microsoft.com (Postfix) with ESMTPSA id 8CCFC20B7188; Fri, 21 May 2021 10:47:14 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 8CCFC20B7188 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1621619235; bh=vp4bh6cnn5xgTCxdBL3ssrfVr3lmhjwR6/PPJY0zW0U=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=kmWtd/Guj2sJubHEiCjGimSMNVPfPbv4AqUu1tPkdEd4CsxXoa90nrgVdPZjS/egp YC33iOhW803pF5G2/4Q1+dg2zaO9Xb/n7G/Fassb1CBWUTXpav3DKhQeXov2oKVFx9 Isb1l0rFMw+VEm7kNqMo/GsWIH9O2llYHg3jzJkQ= Subject: Re: [RFC PATCH v4 1/2] arm64: Introduce stack trace reliability checks in the unwinder To: Mark Brown Cc: mark.rutland@arm.com, jpoimboe@redhat.com, ardb@kernel.org, jthierry@redhat.com, catalin.marinas@arm.com, will@kernel.org, jmorris@namei.org, pasha.tatashin@soleen.com, linux-arm-kernel@lists.infradead.org, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org References: <68eeda61b3e9579d65698a884b26c8632025e503> <20210516040018.128105-1-madvenka@linux.microsoft.com> <20210516040018.128105-2-madvenka@linux.microsoft.com> <20210521161117.GB5825@sirena.org.uk> <20210521174242.GD5825@sirena.org.uk> From: "Madhavan T. Venkataraman" Message-ID: <26c33633-029e-6374-16e6-e9418099da95@linux.microsoft.com> Date: Fri, 21 May 2021 12:47:13 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210521174242.GD5825@sirena.org.uk> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210521_104716_313073_F3E6A1C2 X-CRM114-Status: GOOD ( 31.50 ) 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 5/21/21 12:42 PM, Mark Brown wrote: > On Fri, May 21, 2021 at 12:23:52PM -0500, Madhavan T. Venkataraman wrote: >> On 5/21/21 11:11 AM, Mark Brown wrote: >>> On Sat, May 15, 2021 at 11:00:17PM -0500, madvenka@linux.microsoft.com wrote: > >>>> + frame->reliable = true; > >>> All these checks are good checks but as you say there's more stuff that >>> we need to add (like your patch 2 here) so I'm slightly nervous about > >> OK. So how about changing the field from a flag to an enum that says exactly >> what happened with the frame? > > TBH I think the code is fine, or rather will be fine when it gets as far > as actually being used - this was more a comment about when we flip this > switch. > OK. >> Also, the caller can get an exact idea of why the stack trace failed. > > I'm not sure anything other than someone debugging things will care > enough to get the code out and then decode it so it seems like it'd be > more trouble than it's worth, we're unlikely to be logging the code as > standard. > OK. >>> The other thing I guess is the question of if we want to bother flagging >>> frames as unrelaible when we return an error; I don't see an issue with >>> it and it may turn out to make it easier to do something in the future >>> so I'm fine with that > >> Initially, I thought that there is no need to flag it for errors. But Josh >> had a comment that the stack trace is indeed unreliable on errors. Again, the >> word unreliable is the one causing the problem. > > My understanding there is that arch_stack_walk_reliable() should be > returning an error if either the unwinder detected an error or if any > frame in the stack is flagged as unreliable so from the point of view of > users it's just looking at the error code, it's more that there's no > need for arch_stack_walk_reliable() to consider the reliability > information if an error has been detected and nothing else looks at the > reliability information. > > Like I say we may come up with some use for the flag in error cases in > future so I'm not opposed to keeping the accounting there. > So, should I leave it the way it is now? Or should I not set reliable = false for errors? Which one do you prefer? Josh, Are you OK with not flagging reliable = false for errors in unwind_frame()? Madhavan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel