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.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,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 8BA1DC47076 for ; Fri, 21 May 2021 17:45:31 +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 1B38C6135C for ; Fri, 21 May 2021 17:45:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1B38C6135C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0/4NPE//+dITF+TNjcRjhvxSzzLbcr1UtmbIHhbaWmM=; b=cf3tJU15mfD12MSlmbLy0uSGSC jKTPXeXASXugdpWGUhqe/Q/gJT7TapqasmTI9E5UQGf0aH0cTi2cb68cmgCv5wpfRgP2bkp/n6FdB 5J9bsZMMOrkW/6dVl2A+VTABMgiAcGI76g9/A3WwOkdGLVK8wR5Oa81lIbyGM6FskUZKX4zWMXEjh NYiimAzq2EzOBGZdLXsfVTdtBp3qFKvtoQPuaEdm1T93Xi1NoDAzsBQZX6Rq/z1giEuhwP0mz9cQt jjzWjh22ZwbwCeOKlToov7K09xeiTCRno2RkFFvyWzMJvndAhgEeG9IsEKkNi7Q8Md3pQu8QbtEEs ynEzWD9g==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lk9Bd-000ZUL-65; Fri, 21 May 2021 17:43:49 +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 1lk9Ag-000ZGT-Fg for linux-arm-kernel@desiato.infradead.org; Fri, 21 May 2021 17:42:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=4pAnLMiCaiPzH5E6L9PbKtX8MZBkz7piivEXZI9BTww=; b=MkQFojWVSFn/FmN3/tvLxy0PTr eGfW4zlzMiqXQMcqz5+GjpqdZLRPmw3OrpkiW2YExNqd28YTi/3/pZjgWkaGK20523T2GzsvxaQYn ElX/GxkWhVZGMi5qljWN9W4wj10B2Az9+whxh9nOE3JYqXTgVp+nGD5Ykf3mXGSLGPdYT+47pn7u0 kMmAnan5HD+TUi/BjW1xKBa4W4v/j3BFswuCdu5pogivKVOYaNvw/A/h2/lbiMEW0e0AoUANjY1rD fd2eH8G7xLKp6dqVPMqr+WNZU3MCLeYcand44hPas2JEkc1kc1R8C7jMJYI/F1dSJwuyEAGYLqgDl bEr6w2Qw==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lk9Ad-00HK1T-Qk for linux-arm-kernel@lists.infradead.org; Fri, 21 May 2021 17:42:49 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id D018A61261; Fri, 21 May 2021 17:42:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621618966; bh=QG3NpUtd2fBzJ2KrQhMF9lJqFRi0bzTl/wKZyrlN1nE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=En9neZlCwfoRc+c8iB+o+VCK0bpQdTF0pHoA5/TU6lIuDW6JZsww1gmak22Ak6K8Z pjxM9cTmjiQFIK+ayJcdAPb9qPyp/8PxLoimxc00bxZ80oj2e7QMOLGiPRgi72VXcn Wpru4RRd8MluLRWB1qlEh8Vz9jqGLuQ/NB9iNRttOmB9fwDNIywwMkegD4jCEDE6UP TUYM4fcSEpPeuAukj6Rzeoxy61qrYoSi6JKVpIXSLWHJqjjQpzzXT5jScoCbEa+Bbj vesOgPcLgbJuOsIFwJxTRETNE+ulyfOBQro/TxICkhr0/9B+uAuht50dOfUs7GlV4x BJsnE3W8ULdkw== Date: Fri, 21 May 2021 18:42:42 +0100 From: Mark Brown To: "Madhavan T. Venkataraman" 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 Subject: Re: [RFC PATCH v4 1/2] arm64: Introduce stack trace reliability checks in the unwinder Message-ID: <20210521174242.GD5825@sirena.org.uk> References: <68eeda61b3e9579d65698a884b26c8632025e503> <20210516040018.128105-1-madvenka@linux.microsoft.com> <20210516040018.128105-2-madvenka@linux.microsoft.com> <20210521161117.GB5825@sirena.org.uk> MIME-Version: 1.0 In-Reply-To: X-Cookie: Do not write below this line. User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210521_104247_930099_B5B1836A X-CRM114-Status: GOOD ( 28.45 ) 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: multipart/mixed; boundary="===============0953038108782328483==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============0953038108782328483== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="DrWhICOqskFTAXiy" Content-Disposition: inline --DrWhICOqskFTAXiy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. > 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. > > 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. --DrWhICOqskFTAXiy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmCn8REACgkQJNaLcl1U h9CTFAf9G4Fenbj3nIkJBzuFEgOU33kLEQzVojBeW3FjvS7De9zgVhG9oaL8McKP vAzwcsYTuX7G/f0cTEv1ZMp4f4vkOAq1wEUMVnFV0tu89AMmufviXy4i9s5J44W8 7MeUwQYw3+ObKY8fHebqBCRkRb5dwCblappISAf51zMD8HQcxj6lg5Zut0SMzmFs azwaf89NVgvr68J6xMoO/j39x6dd1Ksm6Wbkr6FsML0bvTVwFu3wwYlUShTeOBIv MwEtoL5M7UW9Gi4tz7rYOpLNpsT/5U8mc8JRwPPzwyw1W6bKwnoKrFN/h4ETWUQQ Lrx0Ly7XX4CQoBKaMWgVIk0QZjqOEA== =B4M/ -----END PGP SIGNATURE----- --DrWhICOqskFTAXiy-- --===============0953038108782328483== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============0953038108782328483==--