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 34768C04A94 for ; Tue, 1 Aug 2023 18:13:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230022AbjHASNF (ORCPT ); Tue, 1 Aug 2023 14:13:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231907AbjHASNB (ORCPT ); Tue, 1 Aug 2023 14:13:01 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF102103; Tue, 1 Aug 2023 11:12:59 -0700 (PDT) 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=WCvORc63Xc/jlm9uhOtZxAQJTdnogdSx3B9Dg3F/tt8=; b=QfGDKD4be3BGSAodWa+dJJ3tEM YhOJFhFrT3pSCWtoS/zBT2d0uP3O9o7eVPK9hFmORSOITbkARctaoJI+JpEKiE6n66po3raOtFfEW PyvYD0YHvjp5h8muMmThxHZkeEwGLSoDhpTYq/yk30WchOT3rgyVj2ulJ8505hWOI1VhSTt3O/CIx o9gwbF0odd0wNUZ633IaG/8Fgn9soxTmwDDEe18Dcqbz/d+4Z/1a1TqR+5vg0ZCDcIuvMyJKx1qpk ig+bASUTH6J57cu537egscDETfzYVMofvpu/FvzKwUfYn7hfvQObr9u2DiJ/ZGomwfzyBh6pSC2re Ok4p2Jlg==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1qQtrc-00AHUX-8W; Tue, 01 Aug 2023 18:12:56 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 7676C300134; Tue, 1 Aug 2023 20:12:55 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 5C6BC201C57DC; Tue, 1 Aug 2023 20:12:55 +0200 (CEST) Date: Tue, 1 Aug 2023 20:12:55 +0200 From: Peter Zijlstra To: Josh Poimboeuf 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 =?iso-8859-1?Q?Wei=DFschuh?= , 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: <20230801181255.GE11704@hirez.programming.kicks-ass.net> 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> <20230801160636.ko3oc4cwycwejyxy@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230801160636.ko3oc4cwycwejyxy@treble> Precedence: bulk List-ID: X-Mailing-List: linux-trace-kernel@vger.kernel.org On Tue, Aug 01, 2023 at 11:06:36AM -0500, Josh Poimboeuf wrote: > 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 Sure, that all would work I suppose.