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=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 E9DCCC433E7 for ; Fri, 16 Oct 2020 11:16:03 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 588D820EDD for ; Fri, 16 Oct 2020 11:16:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="zk9PMa0e" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 588D820EDD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject: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=75sjKib7Rv8yIkmnCQ7rwgvQ4XLGXo48q5Z/eQE+CFQ=; b=zk9PMa0esqjTuYwPEavgrDD6Y ZBCTDi22QezVPiQdC897bkNKTyXpruQxp6Qq5WzbGL0/eiR20CJ+hxfX72EcA/ElIxzeyQNofrlcr Dhx7kIWBkNFtXlTQsrlB+XapBxGojMhg/X6qmWbn/v7cmAll8FtWDX6TQ1IlA6hE/EgTIIiWez6kz zWLK+QJm92QjZa36xEyGcTzEYVtV59bM5HsmMzCO4vX3BgD32RzLizooNA9oQRYwlwnngSuzEhS8Z 9rLNcBfV0Ob+XXZrB+D/NMl3QPkCGk4yXIUyUwAyIJJY5QCwNjLKzb0R8Rbt7BAcJbaEv839fcCNT 1X9a6v2Kg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kTNh1-0002Vg-UP; Fri, 16 Oct 2020 11:14:39 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kTNgz-0002Uz-AT for linux-arm-kernel@lists.infradead.org; Fri, 16 Oct 2020 11:14:38 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 68658D6E; Fri, 16 Oct 2020 04:14:36 -0700 (PDT) Received: from C02TD0UTHF1T.local (unknown [10.57.53.7]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 784FC3F719; Fri, 16 Oct 2020 04:14:34 -0700 (PDT) Date: Fri, 16 Oct 2020 12:14:31 +0100 From: Mark Rutland To: Josh Poimboeuf Subject: Re: [RFC PATCH 0/3] arm64: Implement reliable stack trace Message-ID: <20201016111431.GB84361@C02TD0UTHF1T.local> References: <20201012172605.10715-1-broonie@kernel.org> <20201015141612.GC50416@C02TD0UTHF1T.local> <20201015154951.GD4390@sirena.org.uk> <20201015212931.mh4a5jt7pxqlzxsg@treble> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201015212931.mh4a5jt7pxqlzxsg@treble> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201016_071437_422144_B4352493 X-CRM114-Status: GOOD ( 14.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Catalin Marinas , linux-kernel@vger.kernel.org, Mark Brown , live-patching@vger.kernel.org, Miroslav Benes , Will Deacon , linux-arm-kernel@lists.infradead.org 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 Hi Josh, On Thu, Oct 15, 2020 at 04:29:31PM -0500, Josh Poimboeuf wrote: > > > AFAICT, existing architectures don't always handle all of the above in > > > arch_stack_walk_reliable(). For example, it looks like x86 assumes > > > unwiding through exceptions is reliable for !CONFIG_FRAME_POINTER, but I > > > think this might not always be true. > > Why not? Mark B's reply dropped this, but the next paragraph covered that: | I was planning to send a mail once I've finished writing a test, but | IIUC there are some windows where ftrace/kretprobes | detection/repainting may not work, e.g. if preempted after | ftrace_return_to_handler() decrements curr_ret_stack, but before the | arch trampoline asm restores the original return addr. So we might | need something like an in_return_trampoline() to detect and report | that reliably. ... so e.g. for a callchain A->B->C, where C is instrumented there are windows where B might be missing from the trace, but the trace is reported as reliable. I'll start a new thread on this (with a more fleshed-out example), with the full set of livepatch folk, lkml, etc. I just want to write a test case first, since it's entirely possible something I've missed is catching this already. Thanks, Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel