Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp613856pxb; Wed, 24 Feb 2021 10:13:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJwNykM/6pvBO4ZTVvmHmek2IvED+tW0S/Y2RdiDQAy3UfzLNjX3I36YqMrUJQIi4Vcs5tkv X-Received: by 2002:a17:906:5293:: with SMTP id c19mr27570234ejm.437.1614190388743; Wed, 24 Feb 2021 10:13:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614190388; cv=none; d=google.com; s=arc-20160816; b=RB6F6JlfojDt9LFfCTe3vjpQ5IFvEqzwEBBiwpmr5TheqDXD4FQw3xT00sA4hBEloT yAcZ14baGvQoRLk16wUeE2pAk6cFKtMao0AlLmHhX54zSZS0WYmaLK1KSWe9cAEKgNWp NM8oF/JsJRXBZwwIpLlxdjIwwNrX2LQYvuVMogiR+V3CX58Z74d8cPDbaJHazvgJn+Wk H3WeKjv+3R8Tu0T+LCtfmb1qVb3Wn17BOowKFgqgsSBrholLynO9q3XU53V4vVwTnycu IFMHBUeda/SfI51FsaZk2KSgEBl5bgiuQyIOkWH8nGx9yCHZYYe42Q4EP/Mtfz4lDmU9 NCww== 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=4CyVpXvHlAs585xhnG2kQ9VRjy+LgRed1HZFwtvjpaA=; b=GhoZQirTZqiFeDf2C0Fc/GL486aS4KvNVdHSPindGFrvBKNx5STvrh2KQmdmHXr2et XBeUfsFIG65K8qC3zWzTzRSew/tK/eilZ4UL29JxxYNhJi/n8VacF7mw5/fDEvhQ0HdM 7OKNkGfaiMtkjEib6pxoz6zD5zKBxTaQsloe1BdPAE5nk56tqGUO0CdW8dL9Ig+PeJJK M754zit2eJ7huU/A7NF01y4o46aAc/2OthHmoU62EFYI2UDC1VTs+ZvTPkn8kmS7cLZJ OBppsLAccitMhjrhyogk2L6qC4myue2XXpyY6eZgO6Ze/7wKsdxgdpB/OaG6hTgPtw8J wN3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=TcI4at6j; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v15si1815095ede.1.2021.02.24.10.12.43; Wed, 24 Feb 2021 10:13:08 -0800 (PST) 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=@infradead.org header.s=casper.20170209 header.b=TcI4at6j; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233896AbhBXSIu (ORCPT + 99 others); Wed, 24 Feb 2021 13:08:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231960AbhBXSIl (ORCPT ); Wed, 24 Feb 2021 13:08:41 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A43EC061786 for ; Wed, 24 Feb 2021 10:08:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=4CyVpXvHlAs585xhnG2kQ9VRjy+LgRed1HZFwtvjpaA=; b=TcI4at6ji4D4Egi/JfZlkxoZGX huLiPT2ZsxLgBrG+iPNw9WGU0y+Y+v/M7KQBC7dh1HJL5OCDv/HHlVmc2VzF7fuNvMMYDhoJQIpdK YGawluwyzyj40o+a0WdkSiPZDe1T2TSjuz2GUhVlPBHS7RTdKFMnB/yraJDMZnyHiYLfUJ/jCrfJk 2DTaoMT+UodsoJtkdp9W3nkMyGpDhvWLhjZDUawyQUqb5WHnwgkZZI9ZAMtBaDD10GaXFR9cnqhgQ 5wcaC/2wCzmOQdn05Q1Z1oPzDU9lPs1lTXSsj13XsbTK0zH5cgLKKwEDDGJCXT+TuaLfnphWQlSzv pvfS4ZKQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lEyZQ-009iL3-CD; Wed, 24 Feb 2021 18:07:35 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id C2DEF30504E; Wed, 24 Feb 2021 19:07:31 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A872B20D0BF1F; Wed, 24 Feb 2021 19:07:31 +0100 (CET) Date: Wed, 24 Feb 2021 19:07:31 +0100 From: Peter Zijlstra To: Josh Poimboeuf Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Ivan Babrou , Steven Rostedt Subject: Re: [PATCH 2/2] x86/unwind/orc: Silence warnings caused by missing ORC data Message-ID: References: <06d02c4bbb220bd31668db579278b0352538efbb.1612534649.git.jpoimboe@redhat.com> <20210224151805.zrujocamlb5pxf7m@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210224151805.zrujocamlb5pxf7m@treble> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 24, 2021 at 09:18:05AM -0600, Josh Poimboeuf wrote: > On Wed, Feb 24, 2021 at 03:52:01PM +0100, Peter Zijlstra wrote: > > On Fri, Feb 05, 2021 at 08:24:03AM -0600, Josh Poimboeuf wrote: > > > The ORC unwinder attempts to fall back to frame pointers when ORC data > > > is missing for a given instruction. It sets state->error, but then > > > tries to keep going as a best-effort type of thing. That may result in > > > further warnings if the unwinder gets lost. > > > > > > Until we have some way to register generated code with the unwinder, > > > missing ORC will be expected, and occasionally going off the rails will > > > also be expected. So don't warn about it. > > > > I recently ran into another variant of missing ORC data, some files are > > simply not processed by objtool, eg. arch/x86/realmode/init.c. Would it > > make sense to have the vmlinux pass (when it isn't used to generate orc > > in the first place) also check that all code it finds has ORC data? > > > > It's not fool proof, but it should help find files we're missing for > > some raisin. > > Doesn't validate_reachable_instructions() basically already do that? Nope, I'm talking about the case where we generate ORC for each .o file (and 'forget' to run objtool on some of them). And then run objtool again on vmlinux to validate (things like noinstr). At that point it might make sense to also check that all code does indeed have an ORC to double check our initial (per translation unit) invocation didn't accidentally miss someone.