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 C92A8C001DF for ; Tue, 1 Aug 2023 18:14:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231534AbjHASOK (ORCPT ); Tue, 1 Aug 2023 14:14:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231490AbjHASOI (ORCPT ); Tue, 1 Aug 2023 14:14:08 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DCB61723; Tue, 1 Aug 2023 11:14:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=EG3k5D0X6i7MCDl7fPlu0Os/T9 P3DWozrpKZNiiTwIBKQbwpm6VZvqHcqh7vAhLujXPTORzLj8CF/HM4qZkvrXeBx7bFnKTsYO3WqWE bfWAfHbPGIYvejU5QbtqQx0o+6xAJQHWzVYVP8KX85kXbMgunY/JYMFk92i3U5+HepWLcYPvoEiBw 5zkkL3cy2U7+suRvx85VDiz+0m0G0BqTaOpB8ACt4WMUTt9BOyTdUC1F3BdlG3LcB4+k7LUJeTGaS sHJ2p05k/d1NF2jIFFJjlyNPNnnPCFx1SmRwdSU4C1BrS2bJZ1eskX0IZPg16ydkyxbSIuEmbP+8P iQLxh1XQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qQtre-00EpOw-2F; Tue, 01 Aug 2023 18:12:58 +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 7A4593002D3; 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: kvm@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.