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=-11.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE autolearn=unavailable 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 9C8D8C43460 for ; Tue, 4 May 2021 21:53:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6D464613D2 for ; Tue, 4 May 2021 21:53:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232911AbhEDVyB (ORCPT ); Tue, 4 May 2021 17:54:01 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:52076 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231478AbhEDVx5 (ORCPT ); Tue, 4 May 2021 17:53:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620165181; 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=2cQ/IxN1Yroot3xqxYmayP4r/OC/LGm0hr5S1oQiy9w=; b=angUzGoosD7a0r+VHYunM6Jmgph71apHpPndXsmeqm+8c9TX0kCaghYDe8TRZtELX0Mq7Z HVC2qI/hdnOJ2dTjz7qmIxAMpMHuTsePOIyiY1ZUQjTfi1Mw2Pn65X8L1ptA+Ny9BjQWZ+ oVgUB/GOGMk8LBdLaORj+OjqY1vAyC4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-285-Hvd_BMyoOQOrSJAerVpWCw-1; Tue, 04 May 2021 17:52:59 -0400 X-MC-Unique: Hvd_BMyoOQOrSJAerVpWCw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 770FC824FB9; Tue, 4 May 2021 21:52:51 +0000 (UTC) Received: from treble (ovpn-115-93.rdu2.redhat.com [10.10.115.93]) by smtp.corp.redhat.com (Postfix) with SMTP id 7CAE55C22A; Tue, 4 May 2021 21:52:49 +0000 (UTC) Date: Tue, 4 May 2021 16:52:48 -0500 From: Josh Poimboeuf To: madvenka@linux.microsoft.com Cc: broonie@kernel.org, mark.rutland@arm.com, 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 v3 1/4] arm64: Introduce stack trace reliability checks in the unwinder Message-ID: <20210504215248.oi3zay3memgqri33@treble> References: <65cf4dfbc439b010b50a0c46ec500432acde86d6> <20210503173615.21576-1-madvenka@linux.microsoft.com> <20210503173615.21576-2-madvenka@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210503173615.21576-2-madvenka@linux.microsoft.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 03, 2021 at 12:36:12PM -0500, madvenka@linux.microsoft.com wrote: > @@ -44,6 +44,8 @@ int notrace unwind_frame(struct task_struct *tsk, struct stackframe *frame) > unsigned long fp = frame->fp; > struct stack_info info; > > + frame->reliable = true; > + Why set 'reliable' to true on every invocation of unwind_frame()? Shouldn't it be remembered across frames? Also, it looks like there are several error scenarios where it returns -EINVAL but doesn't set 'reliable' to false. -- Josh 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=-9.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 7DCDDC433ED for ; Tue, 4 May 2021 21:55:08 +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 3D007613C1 for ; Tue, 4 May 2021 21:55:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3D007613C1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.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:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Bk/o4CgM4lkgy3sG/27YWKCKSz6q/MtdvQjLboZZnDo=; b=ADZeKnNvRXNI4M/XrkJZvO8EL VURPU6nCfH7KaR3mU63zfs5ri3zRQDsMQ7bDirgB+ZjLCfqNYNiy2Qr2GOi8vyQaInvZya3QmX27y byYDGp/7mNo52U+NyML+F96MXYhwbC4AAwAnLzrYVVKWcZPCPgHlmHFCmwi8njI9TJrwFEKTu2mOo NQm4eU/9QCvS9TRJEGOJJEjwdCQjYZJlrnYxuSD0oNpmbuJ2xloD/G0hS/MyQ94PsKDw7zm5Q0Zht xZzz9S8Hzmfr+iNE4KRZ4ZarIb6lgmZwzn/7WMuuyGU1pmlU5e4haOTW4DWCXcXqIwj8Ayj69zhls cn8B5mXYg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1le2yc-00HBSb-Th; Tue, 04 May 2021 21:53:11 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1le2yZ-00HBS5-VV for linux-arm-kernel@desiato.infradead.org; Tue, 04 May 2021 21:53:08 +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=2cQ/IxN1Yroot3xqxYmayP4r/OC/LGm0hr5S1oQiy9w=; b=jT3761dFazY0McctQM4um9Rj+N aB/qxqISQrfdE0OJpHJ2y6ZFeChmdVuOqhpn5jTePaIYAxKO5VmGcNw3IJLHbHzWg1NF5k9H5J7dR tX+jVg6nrtyqGVbrQ6PAlpN19iZ6DM/Cuq0B04WWuhnseCVA83o85lQhSNZebT8uFR4yBkgXvFHxk L340KZd/l1B6fR9d0FAP2EBaIPf345vQ1CEshSQZVUYAoer5much8ftLzPE33OiCUN6pW8J8UJzkg Ruyk4XOfy0UcnBzrAB+1r6rzsh484I+p8uADrUcsR7rOI9ZprLdxxePJphsSEULGAUpmLffxOZN/x zAQlbo4A==; Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1le2yW-004ICy-VC for linux-arm-kernel@lists.infradead.org; Tue, 04 May 2021 21:53:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620165181; 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=2cQ/IxN1Yroot3xqxYmayP4r/OC/LGm0hr5S1oQiy9w=; b=angUzGoosD7a0r+VHYunM6Jmgph71apHpPndXsmeqm+8c9TX0kCaghYDe8TRZtELX0Mq7Z HVC2qI/hdnOJ2dTjz7qmIxAMpMHuTsePOIyiY1ZUQjTfi1Mw2Pn65X8L1ptA+Ny9BjQWZ+ oVgUB/GOGMk8LBdLaORj+OjqY1vAyC4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-285-Hvd_BMyoOQOrSJAerVpWCw-1; Tue, 04 May 2021 17:52:59 -0400 X-MC-Unique: Hvd_BMyoOQOrSJAerVpWCw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 770FC824FB9; Tue, 4 May 2021 21:52:51 +0000 (UTC) Received: from treble (ovpn-115-93.rdu2.redhat.com [10.10.115.93]) by smtp.corp.redhat.com (Postfix) with SMTP id 7CAE55C22A; Tue, 4 May 2021 21:52:49 +0000 (UTC) Date: Tue, 4 May 2021 16:52:48 -0500 From: Josh Poimboeuf To: madvenka@linux.microsoft.com Cc: broonie@kernel.org, mark.rutland@arm.com, 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 v3 1/4] arm64: Introduce stack trace reliability checks in the unwinder Message-ID: <20210504215248.oi3zay3memgqri33@treble> References: <65cf4dfbc439b010b50a0c46ec500432acde86d6> <20210503173615.21576-1-madvenka@linux.microsoft.com> <20210503173615.21576-2-madvenka@linux.microsoft.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210503173615.21576-2-madvenka@linux.microsoft.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210504_145305_123495_6EC781BC X-CRM114-Status: GOOD ( 10.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 Mon, May 03, 2021 at 12:36:12PM -0500, madvenka@linux.microsoft.com wrote: > @@ -44,6 +44,8 @@ int notrace unwind_frame(struct task_struct *tsk, struct stackframe *frame) > unsigned long fp = frame->fp; > struct stack_info info; > > + frame->reliable = true; > + Why set 'reliable' to true on every invocation of unwind_frame()? Shouldn't it be remembered across frames? Also, it looks like there are several error scenarios where it returns -EINVAL but doesn't set 'reliable' to false. -- Josh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel