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.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,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 425B9C433DB for ; Tue, 23 Mar 2021 20:25:28 +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 D2E59619CB for ; Tue, 23 Mar 2021 20:25:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D2E59619CB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.microsoft.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:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=T8yO5R3sk1a/2paYDalgAlrLxQgt6LRFSknNxP4nwq4=; b=m5Baxg/d45pRGflrhDfyxuXYo keYUlys3sj7O1DZSWBl7XpTXR53R/85sG6JY6h6wMJtn355fSt+8TicTuXzIm3OKO+YHjiaBDo/O5 IS0OWwRudbeWq8bIvSMf7wf5kNJm/F6Jq6W3ubN3BNqK8Psbxt/QvrjbMYZjSGwO1eUN1/qTZr72d wMXa3phj47wtH03f3hz726F2/nGyYf8h4ePRTUkmCIvmZaoGrc/ZG5XXUS6yKecmVWAYHCNIiHueP ElGodEEf8ZnSaXcwdU7em1gBtpxh/Bn6JVjze+sdBaEY6r8y2StBM9+AtC1ZdsN/JO5Ony10tlvZe 3n5elqCaA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lOnYz-00FeoY-Rl; Tue, 23 Mar 2021 20:23:42 +0000 Received: from linux.microsoft.com ([13.77.154.182]) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lOnYt-00Fenq-Pa for linux-arm-kernel@lists.infradead.org; Tue, 23 Mar 2021 20:23:37 +0000 Received: from [192.168.254.32] (unknown [47.187.194.202]) by linux.microsoft.com (Postfix) with ESMTPSA id E42CE20998F8; Tue, 23 Mar 2021 13:23:33 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E42CE20998F8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1616531014; bh=JjMhfAuErMW36lgVhx3H4MQDgdQX42JDmJ+wbfafBrk=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=J74QiSmujl5ynjnRyXDK7cZXmxn0SAPaey2YrAx07mz2PI9b5kcM18wMnfKs8nhR2 iq3y6osQuUJWa6m+wYfeOOTYr4F4ZvxP6Qlw6l27dkVfK5WAnP1b1hAHX7ZSffi2ve Y5o3FbOy/3sdiA6v+ssCbAnXWyFpeqYOjJD/L6mE= Subject: Re: [RFC PATCH v2 5/8] arm64: Detect an FTRACE frame and mark a stack trace unreliable To: Mark Brown Cc: Mark Rutland , jpoimboe@redhat.com, jthierry@redhat.com, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210323105118.GE95840@C02TD0UTHF1T.local> <2167f3c5-e7d0-40c8-99e3-ae89ceb2d60e@linux.microsoft.com> <20210323133611.GB98545@C02TD0UTHF1T.local> <20210323145734.GD98545@C02TD0UTHF1T.local> <20210323170236.GF98545@C02TD0UTHF1T.local> <20210323182753.GE5490@sirena.org.uk> From: "Madhavan T. Venkataraman" Message-ID: <78329592-1992-4560-72f2-b0ab4eb088c6@linux.microsoft.com> Date: Tue, 23 Mar 2021 15:23:33 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210323182753.GE5490@sirena.org.uk> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210323_202336_264500_77DA51A4 X-CRM114-Status: GOOD ( 19.70 ) 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 3/23/21 1:27 PM, Mark Brown wrote: > On Tue, Mar 23, 2021 at 12:23:34PM -0500, Madhavan T. Venkataraman wrote: >> On 3/23/21 12:02 PM, Mark Rutland wrote: > >>> 3. Figure out exception boundary handling. I'm currently working to >>> simplify the entry assembly down to a uniform set of stubs, and I'd >>> prefer to get that sorted before we teach the unwinder about >>> exception boundaries, as it'll be significantly simpler to reason >>> about and won't end up clashing with the rework. > >> So, here is where I still have a question. Is it necessary for the unwinder >> to know the exception boundaries? Is it not enough if it knows if there are >> exceptions present? For instance, using something like num_special_frames >> I suggested above? > > For reliable stack trace we can live with just flagging things as > unreliable when we know there's an exception boundary somewhere but (as > Mark mentioned elsewhere) being able to actually go through a subset of > exception boundaries safely is likely to help usefully improve the > performance of live patching, and for defensiveness we want to try to > detect during an actual unwind anyway so it ends up being a performance > improvment and double check rather than saving us code. Better > understanding of what's going on in the presence of exceptions may also > help other users of the unwinder which can use stacks which aren't > reliable get better results. > Actually, I was not suggesting that the counter replace the unwinder intelligence to recognize exception boundaries. I was only suggesting the use of the counter for arch_stack_walk_reliable(). But I am fine with not implementing the counter for now. Madhavan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel