Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3391imw; Tue, 12 Jul 2022 13:20:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sqDyrMENdZHBzU9zsQok92CLheeqXiaqnTCq17Q7HR93VS63qVUC6bn0uPO7ocdoa/52+b X-Received: by 2002:a05:6a00:3006:b0:52a:ca34:7e43 with SMTP id ay6-20020a056a00300600b0052aca347e43mr14480170pfb.10.1657657086227; Tue, 12 Jul 2022 13:18:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657657086; cv=none; d=google.com; s=arc-20160816; b=NkV6Nr8+Bd8ou1MST47sY4xS5dnmWPh8PcTj7V3bj4luG0KHs4hMNA3FvS6NX9DvaH jZGrdS8jMSYGXNyV42bUQQrkQUtQVOybtXhnCuNqUg/5Op5tAsTDwqrzgjGBg8ITvJWj JqFq+1EK4d+cnhc2DNUZY1PPEyWm5VL8eqlWtU2eOo/s7330/KY+qrIvCuDXGfK/9XtG MUNPzxIHiu/AZ4bOeGd+wfqkjixyS/xbOFES5/Ku8jCkP6rpuZn/5+S72AFHP9SiIFnw 795j8rGT4L99cGChafHtO6FQBq5YI49XDbblhvoypxa8EPDS5sot3xPneeAn+Apt6XxY QXBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=b+q45qOqOOgrEbLHUudqjjkMf/IpgOPDoGAmPwOXIBs=; b=yNxRG0xwzLNaG7dgbw0tzaO9IdI8dNAGGKy4tZJnRQ1dZhl2SPwMc8toTVZka8PvLH NZj8+mMcyKkBuT9xTsqqHKjj2iFSuR0fmWEjc+4TQ+XWHM1n/DmDzyPuPYBpGs33VmDv ovpRMngAFIhy0ErPetiSA4djxYXd0LwArI0bbMbdRPiWlJbP8OUwFb8eWI0zzsYM/VnV PO+7rhmZGLb3jCZkw5OpcD/jdASmj3rdy7AwQiuvw2x55MV4K3UlePW+MGPusn8r6NyP wZYSHML/dEu/OQG3S2dyyrFFKlNkGfYaIRiWEELe4N/yr5zebNVRN015OINYNMugh0UJ DBOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zT85FhDJ; 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 a22-20020a056a000c9600b005255ca78d68si15346431pfv.310.2022.07.12.13.17.53; Tue, 12 Jul 2022 13:18:06 -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=zT85FhDJ; 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 S234139AbiGLSoE (ORCPT + 99 others); Tue, 12 Jul 2022 14:44:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233993AbiGLSmy (ORCPT ); Tue, 12 Jul 2022 14:42:54 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE10FD9165; Tue, 12 Jul 2022 11:41:51 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 4C18161AD2; Tue, 12 Jul 2022 18:41:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5343EC3411C; Tue, 12 Jul 2022 18:41:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657651310; bh=iodpCEhKE7vLB7Qn5wLtvrYYWXkmr5UUF3gKEJUzpEg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zT85FhDJeSfN3+us7ZPtnUc/t/q6Wb1OjMUmwqjChKjcjA9vd945rEWCUvLAEvFfo 31ScGbExBydIdVLbNhz+xEbRtLdrBCWf0FTvEsQl3ybiTD1U21Uz3sxl/XK7L/cPqs 4rGSjwtqHn1YSGsJiKSc+4RKnsHXT8h0Aslc1p78= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Juergen Gross , Boris Ostrovsky , Josh Poimboeuf , Ben Hutchings Subject: [PATCH 5.10 010/130] x86/xen: Support objtool vmlinux.o validation in xen-head.S Date: Tue, 12 Jul 2022 20:37:36 +0200 Message-Id: <20220712183246.867460072@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220712183246.394947160@linuxfoundation.org> References: <20220712183246.394947160@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 From: Josh Poimboeuf commit f4b4bc10b0b85ec66f1a9bf5dddf475e6695b6d2 upstream. The Xen hypercall page is filled with zeros, causing objtool to fall through all the empty hypercall functions until it reaches a real function, resulting in a stack state mismatch. The build-time contents of the hypercall page don't matter because the page gets rewritten by the hypervisor. Make it more palatable to objtool by making each hypervisor function a true empty function, with nops and a return. Cc: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Josh Poimboeuf Link: https://lore.kernel.org/r/0883bde1d7a1fb3b6a4c952bc0200e873752f609.1611263462.git.jpoimboe@redhat.com Signed-off-by: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- arch/x86/xen/xen-head.S | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/arch/x86/xen/xen-head.S +++ b/arch/x86/xen/xen-head.S @@ -68,8 +68,9 @@ SYM_CODE_END(asm_cpu_bringup_and_idle) .balign PAGE_SIZE SYM_CODE_START(hypercall_page) .rept (PAGE_SIZE / 32) - UNWIND_HINT_EMPTY - .skip 32 + UNWIND_HINT_FUNC + .skip 31, 0x90 + ret .endr #define HYPERCALL(n) \