Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp842931pxb; Thu, 26 Aug 2021 16:33:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzi4vpoXVe4wRtF+UH81YVVD/TdU3rQ9U3ckYr81rMbiLz4c2I7b9iRnjKgd9c6QgBRtsrF X-Received: by 2002:a17:906:fa10:: with SMTP id lo16mr6898668ejb.342.1630020797348; Thu, 26 Aug 2021 16:33:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630020797; cv=none; d=google.com; s=arc-20160816; b=BKoyNt72AXoYSW0Do4ONpKSYWyyPjmXIKb12lNLm8pkDQpgP1wJDiuPI1J7zkpDkbF 59S745snrbp+zzUGeMtmTEz8xRVeDDXTn/P+oWmO6GAIi5/rhMwdbSCy6QEi989YK4/P jsqPgwqj5mp53vE4sw9fxJoij5B9g2KtRN9oysbKYg68+m+5tLeEedIY9WD8+vAim3zb h439a6273THMkk9g5+rcFIqeGY1i+xdY84LrjXLqvubMRpJHODdT2J++9Z7KApJq+vII UgwSeD89FUyiGjxdz9AvHgpn/+eV/kxDx/o3Ws88+htV4cdgTMQzRfsR1fYtvdE/B6nY KRNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:dkim-filter; bh=8v9TbhpIJoMv6rGK5bzfoY2JnYeMp9qeCuyaeZeJfRQ=; b=0cMN9a6yaLbFKIbKJNrazbMS+CIoB3IseUdO6MeA8RyDOh814wYS8/L4F5YejJ7FS/ Eu9ucK0wpQu2DHd2/1Xgt1nD1llrKEuK1Pj1GefP9SM325H5Zq7sCZb9wXqzJ+b2Dl9C TqNlOgr2LymJvtgbsxoJb4Bs5NqbQuU8DV7kd04akgd9EsiEjG4AM1jFXsfSccobethw k2UxUE0tLsXSCb1wmws/8K/5rfO/VFGV0wW+3mlgGvVd3UluaY8Tk9aRxJhQlD4rQgpG tarbnjdEu0OJLQP2mPrLQVoFRQGOB0l3qfhKwZEtwcZCr6CgCW5wlg6ohVdttVAa/Oh7 eRRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=pKyaAZvn; 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=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w3si1755480edd.121.2021.08.26.16.32.54; Thu, 26 Aug 2021 16:33:17 -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=@linux.microsoft.com header.s=default header.b=pKyaAZvn; 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=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243758AbhHZXcR (ORCPT + 99 others); Thu, 26 Aug 2021 19:32:17 -0400 Received: from linux.microsoft.com ([13.77.154.182]:37308 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231251AbhHZXcQ (ORCPT ); Thu, 26 Aug 2021 19:32:16 -0400 Received: from [192.168.254.32] (unknown [47.187.212.181]) by linux.microsoft.com (Postfix) with ESMTPSA id 5204320B8618; Thu, 26 Aug 2021 16:31:27 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 5204320B8618 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1630020688; bh=8v9TbhpIJoMv6rGK5bzfoY2JnYeMp9qeCuyaeZeJfRQ=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=pKyaAZvn1TecJCW+X412OG7vHpPkFDuUavVwfNG1/94nsn1jNsQVxnN9fxu5HqLE5 Fr37WTsD4sXkCecqaNCnvPJqr2MKnwe/ip942OuyKk8zKblwgnCRGCUxCjaTdrYkpq cmJTLO4NJxbopAAvKZ6OhojUlYk01wHqY8buj3/8= Subject: Re: [RFC PATCH v8 3/4] arm64: Introduce stack trace reliability checks in the unwinder 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, pasha.tatashin@soleen.com, jthierry@redhat.com, linux-arm-kernel@lists.infradead.org, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210812190603.25326-1-madvenka@linux.microsoft.com> <20210812190603.25326-4-madvenka@linux.microsoft.com> From: "Madhavan T. Venkataraman" Message-ID: <77c43173-95c9-6ce5-ad11-219d38a66e34@linux.microsoft.com> Date: Thu, 26 Aug 2021 18:31:26 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/26/21 10:57 AM, Mark Brown wrote: > On Thu, Aug 12, 2021 at 02:06:02PM -0500, madvenka@linux.microsoft.com wrote: > >> + if (frame->need_reliable && !unwind_is_reliable(frame)) { >> + /* Cannot unwind to the next frame reliably. */ >> + frame->failed = true; >> + return false; >> + } > > This means we only collect reliability information in the case > where we're specifically doing a reliable stacktrace. For > example when printing stack traces on the console it might be > useful to print a ? or something if the frame is unreliable as a > hint to the reader that the information might be misleading. > Could we therefore change the flag here to a reliability one and > our need_reliable check so that we always run > unwind_is_reliable()? > > I'm not sure if we need to abandon the trace on first error when > doing a reliable trace but I can see it's a bit safer so perhaps > better to do so. If we don't abandon then we don't require the > need_reliable check at all. > I think that the caller should be able to specify that the stack trace should be abandoned. Like Livepatch. So, we could always do the reliability check. But keep need_reliable. Thanks. Madhavan