Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2269394pxp; Mon, 21 Mar 2022 15:27:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyncrbiGV9he364Lf2QsOqIDjBBbjcKbUau6hpopEkgrjxAb0SWQ2pKBcrdWMqSXRuXU4Tn X-Received: by 2002:a17:90b:4f86:b0:1c6:b3eb:99a3 with SMTP id qe6-20020a17090b4f8600b001c6b3eb99a3mr1444163pjb.66.1647901645969; Mon, 21 Mar 2022 15:27:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647901645; cv=none; d=google.com; s=arc-20160816; b=ZpGZLZz9QCrnBmYmOjq10mIiSK55Hzqw52SQoTjW2TMFbqrpPYYEIH45svAOVkfsYN I753munu83QSMTee3jps9P7VTfkdW+VpvSg7Il0Kyaq19RFLQVCDhrhzjrFhSp7kHhyv Me93i9u1S/cu4E3GP0HjwXPtsgzyVvHjmitm1R20Xn6LsVz0hcSmoVI3Zk/j2ahcb+hz w3YBZrCEBHy11o7X7kaoPnMdzZr330OQhgOUIUwRAJ26r52mLPArWnmIElyJzVnAaK7e k3KI9REhqUfjQnIrWH3Da3HWifOwcebrDFYYdAW2vo9ksTuGM+OUs5O9u70Hc0rHPTj1 UzNA== 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=Ih87pxrMStIDzG7/g9OQRTfoGLyCU+nQ0PiHF7wFn0A=; b=mAdt5ENLQ5I+SGiz3hRpMdYfhQ8Sf3gqLWvoQc33VTZ8WSoW0/EAI7krvq4qPVfwaG naX+cE0SYvefCOW+L++qTBv+VkFMncvqfQHaqF1vQkhF92a70bpuWoBN6AOrMAMIvDww cRF4LDlx0oXTXDwZF6nRUIFrqiU+EWqbHdiXng7hCmx5w+EfWAZnck11cwURu8N+m+/c J8eIZr5SRJmGHCK3fkRwZGkgxSvDlxpZEhUuFmNAx1FwpeJrO2XbE98nP6edsAD21Sdz A/HYHGAD7XX3nhVUsdpzKWrunvWdLY5Jj1wZ4OY8KMRpGs3EmgX8mOJqAsJX7iXICBVg fggA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b="HJ/hN+5Q"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id w11-20020a170902d3cb00b00153bb80673bsi11526191plb.52.2022.03.21.15.27.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 15:27:25 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b="HJ/hN+5Q"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EA12F3A35CB; Mon, 21 Mar 2022 14:42:10 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348825AbiCUQus (ORCPT + 99 others); Mon, 21 Mar 2022 12:50:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233401AbiCUQuo (ORCPT ); Mon, 21 Mar 2022 12:50:44 -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 126433F8B8; Mon, 21 Mar 2022 09:49:19 -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=Ih87pxrMStIDzG7/g9OQRTfoGLyCU+nQ0PiHF7wFn0A=; b=HJ/hN+5QK8oYBuY1Z9W28lDnKg olkRPbqOfh2FJ8j+4p6hcV1SosrRTM05tsif0RFsSb5NSBG1uP+58Bi9MxWkLagezuuICP7iHoVjP NCj0siBk9j5UjNlPv/sjxPJPP/o+oUJy60xbw0SLkOkd2p6M8vNsa1Q5p+vmFbTEz4lW1dvH8IL/Q mGMcCRXOv6d5+9ZnwVEFn4OVF78XnsNG8bK2QsnoEdWU5hVuRlkaJvW3UHuPHGxR5peoh1ZkJ/xiG 6lYyUg+wceOawcNe7/baY7n7dpT5fiC3dM9nygDasdXYZmk4o/bpHTOvTB9oGhPjDCGZ453G2GgaP x/7qmKqQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nWLDD-003BEn-Bs; Mon, 21 Mar 2022 16:48:55 +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)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id CF2FA30031D; Mon, 21 Mar 2022 17:48:54 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id B00B22DB9484B; Mon, 21 Mar 2022 17:48:54 +0100 (CET) Date: Mon, 21 Mar 2022 17:48:54 +0100 From: Peter Zijlstra To: Stephen Rothwell Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Linux Kernel Mailing List , Linux Next Mailing List , mhiramat@kernel.org, rostedt@goodmis.org, ast@kernel.org, hjl.tools@gmail.com, rick.p.edgecombe@intel.com, rppt@kernel.org, linux-toolchains@vger.kernel.org, Andrew.Cooper3@citrix.com, ndesaulniers@google.com Subject: Re: linux-next: build warnings after merge of the tip tree Message-ID: References: <20220321140327.777f9554@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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, Mar 21, 2022 at 02:04:05PM +0100, Peter Zijlstra wrote: > On Mon, Mar 21, 2022 at 01:55:49PM +0100, Peter Zijlstra wrote: > > On Mon, Mar 21, 2022 at 02:03:27PM +1100, Stephen Rothwell wrote: > > > Hi all, > > > > > > After merging the tip tree, today's linux-next build (x864 allmodconfig) > > > produced these new warnings: > > > > > > vmlinux.o: warning: objtool: arch_rethook_prepare()+0x55: relocation to !ENDBR: arch_rethook_trampoline+0x0 > > > vmlinux.o: warning: objtool: arch_rethook_trampoline_callback()+0x3e: relocation to !ENDBR: arch_rethook_trampoline+0x0 > > > vmlinux.o: warning: objtool: unwind_next_frame()+0x93e: relocation to !ENDBR: arch_rethook_trampoline+0x0 > > > vmlinux.o: warning: objtool: unwind_next_frame()+0x5f2: relocation to !ENDBR: arch_rethook_trampoline+0x0 > > > vmlinux.o: warning: objtool: unwind_next_frame()+0x4a7: relocation to !ENDBR: arch_rethook_trampoline+0x0 > > > vmlinux.o: warning: objtool: __rethook_find_ret_addr()+0x81: relocation to !ENDBR: arch_rethook_trampoline+0x0 > > > vmlinux.o: warning: objtool: __rethook_find_ret_addr()+0x90: relocation to !ENDBR: arch_rethook_trampoline+0x0 > > > vmlinux.o: warning: objtool: rethook_trampoline_handler()+0x8c: relocation to !ENDBR: arch_rethook_trampoline+0x0 > > > vmlinux.o: warning: objtool: rethook_trampoline_handler()+0x9b: relocation to !ENDBR: arch_rethook_trampoline+0x0 > > > > Hurmph, lemme go figure out where that code comes from, I've not seen > > those. > > Ahh, something tracing. I'll go do some patches on top of it. The below gets rid of the objtool warnings. But I still think it's fairly terrible to get a (flawed) carbon copy of the kretprobe code. Also, I think both should fix regs->ss. --- diff --git a/arch/x86/kernel/rethook.c b/arch/x86/kernel/rethook.c index f0f2f0608282..227a1890a984 100644 --- a/arch/x86/kernel/rethook.c +++ b/arch/x86/kernel/rethook.c @@ -20,6 +20,7 @@ asm( ".type arch_rethook_trampoline, @function\n" "arch_rethook_trampoline:\n" #ifdef CONFIG_X86_64 + ANNOTATE_NOENDBR /* Push a fake return address to tell the unwinder it's a kretprobe. */ " pushq $arch_rethook_trampoline\n" UNWIND_HINT_FUNC @@ -48,7 +49,7 @@ asm( " addl $4, %esp\n" " popfl\n" #endif - " ret\n" + ASM_RET ".size arch_rethook_trampoline, .-arch_rethook_trampoline\n" ); NOKPROBE_SYMBOL(arch_rethook_trampoline);