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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64959C00528 for ; Tue, 1 Aug 2023 16:06:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233959AbjHAQGp (ORCPT ); Tue, 1 Aug 2023 12:06:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231592AbjHAQGo (ORCPT ); Tue, 1 Aug 2023 12:06:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E70A612F; Tue, 1 Aug 2023 09:06:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7FFC261632; Tue, 1 Aug 2023 16:06:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A6E4C433CA; Tue, 1 Aug 2023 16:06:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690906001; bh=BBcCALZSvC2LFhRKcMqxP8rdH2NP0e0xXifPtDkOjO8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vCrg74c7T3Iz63b0Kd6NgZegwDi8uBiXQoM380X5QyO9JQStSJ1vVIYg5lBwm6mGw G5KOxDdFaZ7Piz25JAUwBZD/3gaIndaeQTHekVYLS3qu/aHMvXlBS74Y+fcyy1aTEk ekFWbXUbEVFdALD5l54i41nQHanZW89VH2ePBQMh5U9QZ5HMo56dgNJvyaeiY04Jyl Xf14Hk85AfA++XUjsYmfdUWau4GAJM10KRtVfqcqHC8KYUuOhv/aWt7bPVRl++OF56 Y2ze4WvLuzReIZF+YcVIa7kCLw1OcNEHpfPPSiU8sxiQPotRbp7L6618dtrmlDOhKL o2cGG2hsMdBsQ== Date: Tue, 1 Aug 2023 11:06:36 -0500 From: Josh Poimboeuf To: Peter Zijlstra Cc: Valentin Schneider , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-doc@vger.kernel.org, kvm@vger.kernel.org, linux-mm@kvack.org, bpf@vger.kernel.org, x86@kernel.org, rcu@vger.kernel.org, linux-kselftest@vger.kernel.org, Steven Rostedt , Masami Hiramatsu , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Paolo Bonzini , Wanpeng Li , Vitaly Kuznetsov , Andy Lutomirski , Frederic Weisbecker , "Paul E. McKenney" , Neeraj Upadhyay , Joel Fernandes , Josh Triplett , Boqun Feng , Mathieu Desnoyers , Lai Jiangshan , Zqiang , Andrew Morton , Uladzislau Rezki , Christoph Hellwig , Lorenzo Stoakes , Jason Baron , Kees Cook , Sami Tolvanen , Ard Biesheuvel , Nicholas Piggin , Juerg Haefliger , Nicolas Saenz Julienne , "Kirill A. Shutemov" , Nadav Amit , Dan Carpenter , Chuang Wang , Yang Jihong , Petr Mladek , "Jason A. Donenfeld" , Song Liu , Julian Pidancet , Tom Lendacky , Dionna Glaze , Thomas =?utf-8?Q?Wei=C3=9Fschuh?= , Juri Lelli , Daniel Bristot de Oliveira , Marcelo Tosatti , Yair Podemsky Subject: Re: [RFC PATCH v2 11/20] objtool: Flesh out warning related to pv_ops[] calls Message-ID: <20230801160636.ko3oc4cwycwejyxy@treble> References: <20230720163056.2564824-1-vschneid@redhat.com> <20230720163056.2564824-12-vschneid@redhat.com> <20230728153334.myvh5sxppvjzd3oz@treble> <20230731213631.pywytiwdqgtgx4ps@treble> <20230731214612.GC51835@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230731214612.GC51835@hirez.programming.kicks-ass.net> Precedence: bulk List-ID: X-Mailing-List: linux-trace-kernel@vger.kernel.org On Mon, Jul 31, 2023 at 11:46:12PM +0200, Peter Zijlstra wrote: > > Ideally it would only print a single warning for this case, something > > like: > > > > vmlinux.o: warning: objtool: __flush_tlb_all_noinstr+0x4: indirect call to native_flush_tlb_local() leaves .noinstr.text section > > But then what for the case where there are multiple implementations and > more than one isn't noinstr? The warning would be in the loop in pv_call_dest(), so it would potentially print multiple warnings, one for each potential dest. > IIRC that is where these double prints came from. One is the callsite > (always one) and the second is the offending implementation (but there > could be more). It's confusing to warn about the call site and the destination in two separate warnings. That's why I'm proposing combining them into a single warning (which still could end up as multiple warnings if there are multiple affected dests). > > I left out "pv_ops[1]" because it's already long enough :-) > > The index number is useful when also looking at the assembler, which > IIRC is an indexed indirect call. Ok, so something like so? vmlinux.o: warning: objtool: __flush_tlb_all_noinstr+0x4: indirect call to pv_ops[1] (native_flush_tlb_local) leaves .noinstr.text section -- Josh