Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp78671rwo; Tue, 1 Aug 2023 13:14:28 -0700 (PDT) X-Google-Smtp-Source: APBJJlGNmXdjJqGncjQI+RFZETHRS4F0QQ5sjhQsaWY/bZbu1W8eR9z+R77nxUszT3J+UWQaTfOs X-Received: by 2002:a05:6a00:218a:b0:666:81ae:fec0 with SMTP id h10-20020a056a00218a00b0066681aefec0mr13180356pfi.25.1690920867696; Tue, 01 Aug 2023 13:14:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690920867; cv=none; d=google.com; s=arc-20160816; b=LobL9sgO246Bwt+YPEGV1eHD9RcHvn2jfEbASlEtEfGHYrjeuAC4tNvSbZc+u3oRRN bi1evN/P4XdqmNJbb6+t/kWsXkLGWN6vXrIjxa50KSj3FjlzaNEkuExPmijMvTMsDPys nDCsUFkuO/486HiYopoBHLFEaBVLsQOklN2tQMkd3t5QXwuVWNFmD6fLNaWxVsu8VVW+ VwTmqJZss0ycB3HadrBsuaw3dcgNfe/LaCBIFKWS0sAa7wqHHbSjhjvLPhgwwI4OWqfo WI9stV0hmZChYos/nVMNmydDLZGJcI7x8zqLGtvnBax5kZdWp8Vx4EWQaPOR+roe87Sz I89Q== 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=WCvORc63Xc/jlm9uhOtZxAQJTdnogdSx3B9Dg3F/tt8=; fh=lawFj9i2/XML876B3JRASmc3m5GX5ymWaE2XbnWkK9s=; b=bTbkJBXF6ryXMdePaXHJ7DPc7F21DsHiuqNWlX2AOLsp0iqOoAd1kPMooXAFPFvCdq nXnVZh1LZKfssHcBZyyTVL/E3s3Pe1zQmetxNnsnHj2CTHwlAtgebYpCA5EjdpsV3KD6 jXR/H96U4xV6sT64wwVftZmBP4TsiyWhQxOXwaOXFVYqozM8nK7wl7/iz0s0+PxwQhcG i/DaHm9rs05gTPffziD3J8s31+kUg/R/fkdmTt38E1+8d6/tPp2l6M7AeoKw9H3k5HrH x//V0ycOU4XG0BuBnEbm3xHiXJmb7aXVtUGvFaMlpm1dkmmPRD9ulj22hrdi2YbjIbOK RIug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=QfGDKD4b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w125-20020a627b83000000b00686ae67b95bsi6100886pfc.225.2023.08.01.13.14.14; Tue, 01 Aug 2023 13:14:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=QfGDKD4b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230404AbjHASNF (ORCPT + 99 others); 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> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-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.