Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp5927290rwb; Tue, 1 Aug 2023 09:44:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlHaIphp4nzF6vDpODuUg6R1URUcaHCBqp+r+8YS7vinYVVEIijzRUIPpSZMbiAPrlx/6dAH X-Received: by 2002:a05:6512:2510:b0:4f8:6ac4:84 with SMTP id be16-20020a056512251000b004f86ac40084mr2940745lfb.8.1690908261843; Tue, 01 Aug 2023 09:44:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690908261; cv=none; d=google.com; s=arc-20160816; b=Bi7L+H4FRMvuX+1vF6cy5rsMcsoEU4zjrvtHKkpB71LDdj/3XBeA7MqFbSYxeKknNe WBNy6JqkAKsuF3B4xHgnPT2Z0ggwMQp0j+9Y5WxX5zSvqIlYjEreXPsRHYLcvdW8PUde kA3TQbQHJlHZB8Tm8UgQ+k9NXIhCKUQrUMZpZselwjHja9kwhSA89acWw0KBs97Nx5oW zC04PNTrURMDnndP45FX1B6pLNIkc8KUEnSyJvRospATmrWnEbFp75ddfOFlSS7dwS5x ektW1A7CvECSyXVFJz7/lCTu9IbcYoHSlAnZZcyXcK7qsTArrUF0l6KMfjFzbaFsMMnX uk5Q== 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=kxxCPcTsx4r18LCe1+LuClSP4UFHC4cFlCdPTUyFAC0=; fh=+bGHWCYPbatfqzeewkeir+PBznPJk9z2gWizTIAzMzc=; b=N85Hy2lx/aDYemrF4lsi95ZTWPNVykWNqLOx1rlwTmKcHLkHaG7n2wPoshnV5JcjFc PVybQbeOmp/gTjxvF/hGK8mXTMEAmkkftYC84Z4ZGLGjPdoKtgYHaroExYgYyqo3J5PI dCjvYAP73cJMmDvH0K7tOkqiPhGuv9bGImErVVzypN82fWjhCpKNv3caMV0CH7hwn4K6 dO7sex2+5tnMG04z7kyOpp2+X7qgHBGy9LufHX33S+A1fQCax56i9QOYiZPFZu/QI+WR Gm5r3R/v7c0LlbOC1pEuiMgKPKVkE4hmnTUWgKiKjvBVZOY4Jg0D5WrYGAmuCDZpF6yL xzzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vCrg74c7; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i10-20020a50fc0a000000b005221645da58si8130810edr.580.2023.08.01.09.43.56; Tue, 01 Aug 2023 09:44:21 -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=@kernel.org header.s=k20201202 header.b=vCrg74c7; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234033AbjHAQGq (ORCPT + 99 others); Tue, 1 Aug 2023 12:06:46 -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> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 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