Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp1365278imi; Sat, 23 Jul 2022 03:46:09 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sFAhe2pZdJYxl4sTM8LmDDiO8MD/qA4LTil/fxlnrBTGbGsahgh2iU1cLpV7iyCNkMlRZp X-Received: by 2002:a17:90a:ce96:b0:1f1:feb7:28b4 with SMTP id g22-20020a17090ace9600b001f1feb728b4mr4366187pju.53.1658573169456; Sat, 23 Jul 2022 03:46:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658573169; cv=none; d=google.com; s=arc-20160816; b=sM5yNN5v5SLJziK8qNu5FHopCbb05MrxLEQhqRSWOvAB4k6tb4D+8a+R3av0FliRVo s60HbniM1a4eJ/P4DBK4SB4Nn/XtI8R0aEVwEScQu3B5WK89GRrIlGyOsTfYgVCpdXy/ Mhyg7CC8UG1q8iObALj6vtItG1PrLtGD0k11bGwegiZDCKbYIIMHVTck35nDk6WZwLh8 H2IzHOm6PJ6bGuX4WqhCbSZeVhJIvq35YrL2AmPISKuhuI+tpOW3gsZKvWAU0cKYQp38 x0vtRjhryP8iItF+mhXlJ8W7VPaOpS5yoJYWagFudzqMJOi2FalbNnDqabQ9ui4tWPxM SAEA== 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=abfxjsJbqexlSc0W0o98JVcOElvgx77bqwvdGXRbaxfwWEk5hKvJ4wyhS6IQ80MQyT yZdxlEofaDTi/UR4mcyhyRv2rlCFd5m4dvSSdcSKEFQk5jURxZb2h4QU2UhPvoIOAcL2 qaEnnCLv3hC0MWWTftbisSVnOZrfHkOBBuBCxOC6v32OoUPKScoBlGJbrTnWhP+l46vr Zc9WgLmJb6SjFD0asFPxFJ3RODQWvLJkIrNQxESLaaBG74j4A1Lc2Zfd701EZVfqGf9p 4MBiB0NjgDaA1b6VNj0kE+kUKwiS8bTMnEDkH+esz77AxmlpIn9GlTt95RvF7gtLS406 RtTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wSTdx66I; 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 o11-20020a056a0015cb00b005251e17bcb2si9789033pfu.254.2022.07.23.03.45.54; Sat, 23 Jul 2022 03:46:09 -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=wSTdx66I; 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 S237714AbiGWJ7L (ORCPT + 99 others); Sat, 23 Jul 2022 05:59:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237524AbiGWJ6g (ORCPT ); Sat, 23 Jul 2022 05:58:36 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63E321ADBD; Sat, 23 Jul 2022 02:57:32 -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 16D4CB82C1F; Sat, 23 Jul 2022 09:57:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6757BC341C0; Sat, 23 Jul 2022 09:57:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658570249; bh=iodpCEhKE7vLB7Qn5wLtvrYYWXkmr5UUF3gKEJUzpEg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wSTdx66IfIH4etwzBAcZYN3r69Wf8W4jHy98h+id8uOxZLRXkcsyH4VPihvzjPQ6q as29sb93PCJkoZkqchtIAGistfDRhxJmPJXOXoMSYOYu2/GBrwWDh4nyEx0Rd8QO+/ NclGGd5+UYEF+shwGM06dEfE9tfskXMP+oVtL+BU= 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/148] x86/xen: Support objtool vmlinux.o validation in xen-head.S Date: Sat, 23 Jul 2022 11:53:42 +0200 Message-Id: <20220723095227.283321475@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220723095224.302504400@linuxfoundation.org> References: <20220723095224.302504400@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.8 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 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) \