Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4708698imw; Tue, 12 Jul 2022 12:47:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vN3F5WQyQbq2Sev6iHBqwQv4VI/AK+OYw3ZRGqitOLdm5J1E3oeE/lfA/zUetbiRI0HEMv X-Received: by 2002:a17:907:8a1a:b0:72b:52d7:607c with SMTP id sc26-20020a1709078a1a00b0072b52d7607cmr12831146ejc.16.1657655268959; Tue, 12 Jul 2022 12:47:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657655268; cv=none; d=google.com; s=arc-20160816; b=Km3ltqHrnzAueKmhwd4JkizokhJlIhid9XqBMCX4HkPuJpf6wdci26ckPXLur0TUL+ S2p1JvBLmJT6y6fNaI1nOTECi4ELAhfVi8kuEp1aha40B7CQAVVV3+EUCt96IQgEQR6d b5YOxPNNNvjRd0zE+yrna7Lejw/sapeZRABLv3gXKpkNG3tcXp0if4VI4shY7r6Ns3Wm e/7+m4eSKoplHzogECIbBzLHvXd6l5Mp5kWgrJsZGQFN6tz5nDk5HS8AcDMWalVcwunp 33GUlbxBYmLkL0oJVKRfjWVEq9GgvgeSSqtWSlNgSDRGBOeNTyMFmrj4f+VyPuYyNTQZ BNbg== 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=vnaf5unmSBcTKYX6/L4ggmtXprus+STSYfCg/ZKknJk=; b=jpBPRubDHkmTLSYbi4k/O/xe3HtX14EXxiKXWDobp2IcNU1HtRnqakG7vzLXyZtu4/ SYyndO7ddvY6dyWz0Jmsu/IgFT0X0MLNABQKMwoMHh+ttxE51VimoGXR+T1XZ3ViXeNI UqAEvIlJ/2IamVyc1RZWsgq5fpiRDR6t60m+seUFdUEWTmsv0pR6sjjr6WRa4utVX679 kahr1yjOiIvq+x3A4bc1IUxfpNkhPM9XEhZyYNRpjddouiUioM91nIU606QeGTjB1n2c Mtu8eikeYxpdURHAabqmmgDPcrJtFeNIct2ImX7oRc/OHW9Tbv32wmIpJ773L4si0Q7D wE+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Y7mlHgNg; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rn9-20020a170906d92900b00718ccb0a135si14340558ejb.507.2022.07.12.12.47.01; Tue, 12 Jul 2022 12:47:48 -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=@linuxfoundation.org header.s=korg header.b=Y7mlHgNg; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234219AbiGLTpG (ORCPT + 99 others); Tue, 12 Jul 2022 15:45:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234097AbiGLTon (ORCPT ); Tue, 12 Jul 2022 15:44:43 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4011AAB29 for ; Tue, 12 Jul 2022 12:31:53 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 48898B81BD0 for ; Tue, 12 Jul 2022 19:31:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 58C5FC341C0; Tue, 12 Jul 2022 19:31:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657654310; bh=O5l3DDkCL1GLC1cLcZh7E/j88FiYHXorbNoNPs9qYjU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Y7mlHgNgtuET3TxAjKenZBXszlKL5EWencfe+7pE6MvAfl5dII94BZePOvH7Y9v+9 aeQwJTYBa1Q8k/ixcCtlq5Qx/t/S6QtFtd1Qt0KqzhyG2/tPiR+MxMsBb4qiolssHp FNhjcDS/z85gj8K/4anC04dMYLqVoHhrA8C7EI5M= Date: Tue, 12 Jul 2022 21:31:47 +0200 From: Greg KH To: Boris Ostrovsky Cc: Juergen Gross , Stefano Stabellini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Subject: Re: Build warnings in Xen 5.15.y and 5.10.y with retbleed backports Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Tue, Jul 12, 2022 at 03:19:39PM -0400, Boris Ostrovsky wrote: > > On 7/12/22 12:38 PM, Greg KH wrote: > > Hi all, > > > > I'm seeing the following build warning: > > arch/x86/kernel/head_64.o: warning: objtool: xen_hypercall_mmu_update(): can't find starting instruction > > in the 5.15.y and 5.10.y retbleed backports. > > > > I don't know why just this one hypercall is being called out by objtool, > > and this warning isn't in 5.18 and Linus's tree due to I think commit > > 5b2fc51576ef ("x86/ibt,xen: Sprinkle the ENDBR") being there. > > > > But, is this a ret call that we "forgot" here? It's a "real" ret in > > Linus's branch: > > > > .pushsection .noinstr.text, "ax" > > .balign PAGE_SIZE > > SYM_CODE_START(hypercall_page) > > .rept (PAGE_SIZE / 32) > > UNWIND_HINT_FUNC > > ANNOTATE_NOENDBR > > ANNOTATE_UNRET_SAFE > > ret > > /* > > * Xen will write the hypercall page, and sort out ENDBR. > > */ > > .skip 31, 0xcc > > .endr > > > > while 5.15.y and older has: > > .pushsection .text > > .balign PAGE_SIZE > > SYM_CODE_START(hypercall_page) > > .rept (PAGE_SIZE / 32) > > UNWIND_HINT_FUNC > > .skip 31, 0x90 > > ANNOTATE_UNRET_SAFE > > RET > > .endr > > > > So should the "ret" remain or be turned into "RET" in mainline right > > now? > > > It doesn't matter --- this is overwritten by the hypervisor during initialization when Xen fills in actual hypercall code. > > > So f4b4bc10b0b85ec66f1a9bf5dddf475e6695b6d2 added 'ret' to make objtool happy and then 14b476e07fab6 replaced 'ret' with RET as part of SLS fixes. The latter was not really necessary but harmless. > > > So it can be 'ret', RET, or anything else that tools don't complain about. It will not be executed. Cool, thanks. But what about the objtool warning that I now see? Is that "real"? I don't run any Xen systems, so I can't test any of this myself. thanks, greg k-h