Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1405381pxj; Fri, 21 May 2021 13:27:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJws2lDIbnU0wV8uDN4ccJrkn7iko8Mekuc1kE83CdwRXypFb7bRlecZCGNC+Ox242O1uHGm X-Received: by 2002:a05:6402:657:: with SMTP id u23mr13047591edx.225.1621628876603; Fri, 21 May 2021 13:27:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621628876; cv=none; d=google.com; s=arc-20160816; b=weyJ41oPO/vhdmHB+PRI8EBUKYvE7Vhjx8l/gXTP+hkQ2QszQ4ZfE64WX52NKQQt2a Lzabvs2gDBLs098lVIUKqBaghPUmZkpwMYoRL+ZbRHJao5zeAEE0bS5QEA5bL31HVVvJ tZIRQtaOgZJY+JiryNUEpdmBqw6mafKxi20FLDbxLonHCRoN/UpgSo81a1bNRav7v3M+ E0RWIQrwRgSmSQ15scb2QGXfPXX63nTyMjjosAX1FixUH0GBcwa+eatIxqdTrwhRkVjy Wx95s/ArkiyagDY1rYPvN/qTvirN5x6Pc6lAJ9Zyfjt79XMgSG2XayQr/nMjQOyUMT9B KNWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=RabyVfBo+mpfsjY1+7E6nJCVxTgd3EWR2ZAwlRxq+pc=; b=dRqVRbgQjngq7bGebNXK9G2Rynhffx/f8c40UsHQknq0W95WYpbEBiY11VwjaMW0KZ cQGlXwYsRkSX7It54rTTMAw/qHS4uFj9GJ1coc0+x3+P/QqdR+jj/RROC2Pt+hLDz/8g HcD6+6UlzPM+OA/oH2VkwXkypA6iqVTwCDnJ3i/bEtqqJmV5TEUnehmMRh4Rl7DI4Pxb DtwMnzTyHsjaSFTV0DPXr86HkY5yBMMir0absYPc0D1Hu+MxlxxICpM0+wfwBu26qVyb kfTKW9TnmcW7Nu2yVRNjCBhpY8Mz0bCRejmuUK/CE97OVZVT13R/WRbDp5Et7v9CfXlk eL+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VQPBkvE+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d12si2640539edo.215.2021.05.21.13.27.33; Fri, 21 May 2021 13:27:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VQPBkvE+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231674AbhEUSts (ORCPT + 99 others); Fri, 21 May 2021 14:49:48 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:28623 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231620AbhEUStr (ORCPT ); Fri, 21 May 2021 14:49:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621622903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RabyVfBo+mpfsjY1+7E6nJCVxTgd3EWR2ZAwlRxq+pc=; b=VQPBkvE+0XwgqUqltnAnYBMvT/7iETOu/lT6VEavQl171JGd55cdjNNjwbDKLHQSHwGwCk 3iBFLZdv+Eav8G3UVS6mh5S0SWoG/5urj6fE+eD1+S7wka2qEB1n3zsq2FYje+tvdA2KUM xaainYeoMNddqvLqFOJKH8G537RAJZQ= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-99-A2EiMt6ZN5W6Z4_K5jrWPQ-1; Fri, 21 May 2021 14:48:20 -0400 X-MC-Unique: A2EiMt6ZN5W6Z4_K5jrWPQ-1 Received: by mail-qv1-f72.google.com with SMTP id bc3-20020ad456830000b02901f47dbd7ef6so7975719qvb.6 for ; Fri, 21 May 2021 11:48:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=RabyVfBo+mpfsjY1+7E6nJCVxTgd3EWR2ZAwlRxq+pc=; b=e5HMKepEJIOIiTJJBk0FT2svHzQbjDd1LRBLtpTjQf1zy2I8VKsH1xYIVXK/FxxY/p pbJ6CmMVGhby3Mpnj+tjgY3vngqtcxFZpbi++sn83xLrqtU8EzeXKtVoBsxxvaeafv/r 7i/v5vDv2vzGYTpnRQZiTOTzBI/VqFKnqGeJVEz3Ifn0VsmciC6OQU+dO4qWHzekWRy7 1c/LcU5ZZVsmQDwHjCOhinibHRpdv9IrMtYZjYIM7VS+GxE7LKGKfNUWVT1LixBgCQL2 Ekn8WMaBAo9Enye0L9cOa33qr4nU9IBPmO2kM+QKjFEfRxUJDvHpjMEoWiYKsn9A9ij6 VUyQ== X-Gm-Message-State: AOAM530RRU041lvhhH04wxDmWJ1sIcVkSfkdll6xHlZgfmPzVYu+uPuk irtCtAs8wTi6ceefv6X/ftkTRwHTdZqi2HAiFPVim8RbwQyE+Trk3vKb6ulIl2mFcP2W+vK4CAz /lDG1EIGrcNnZLynq4lM76JU3 X-Received: by 2002:a37:a751:: with SMTP id q78mr12984101qke.482.1621622900180; Fri, 21 May 2021 11:48:20 -0700 (PDT) X-Received: by 2002:a37:a751:: with SMTP id q78mr12984080qke.482.1621622899919; Fri, 21 May 2021 11:48:19 -0700 (PDT) Received: from treble ([68.52.236.68]) by smtp.gmail.com with ESMTPSA id b17sm4762548qtb.78.2021.05.21.11.48.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 May 2021 11:48:19 -0700 (PDT) Date: Fri, 21 May 2021 13:48:17 -0500 From: Josh Poimboeuf To: Mark Brown Cc: "Madhavan T. Venkataraman" , mark.rutland@arm.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: <20210521184817.envdg232b2aeyprt@treble> 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> <26c33633-029e-6374-16e6-e9418099da95@linux.microsoft.com> <20210521175318.GF5825@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210521175318.GF5825@sirena.org.uk> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 21, 2021 at 06:53:18PM +0100, Mark Brown wrote: > On Fri, May 21, 2021 at 12:47:13PM -0500, Madhavan T. Venkataraman wrote: > > On 5/21/21 12:42 PM, Mark Brown wrote: > > > > 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()? > > I think it's fine to leave it as it is. Either way works for me, but if you remove those 'reliable = false' statements for stack corruption then, IIRC, the caller would still have some confusion between the end of stack error (-ENOENT) and the other errors (-EINVAL). So the caller would have to know that -ENOENT really means success. Which, to me, seems kind of flaky. BTW, not sure if you've seen what we do in x86, but we have a 'frame->error' which gets set for an error, and which is cumulative across frames. So non-fatal reliable-type errors don't necessarily have to stop the unwind. The end result is the same as your patch, but it seems less confusing to me because the 'error' is cumulative. But that might be personal preference and I'd defer to the arm64 folks. -- Josh