Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp531343pxb; Thu, 14 Jan 2021 11:47:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJwcxSySX17tV9r5dvjbllRcbULcc7gZ0wa4ISBgVCcYUt4cIZqIg2mZuQ6hg8YtR1XfCt82 X-Received: by 2002:a05:6402:206c:: with SMTP id bd12mr2787348edb.10.1610653624301; Thu, 14 Jan 2021 11:47:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610653624; cv=none; d=google.com; s=arc-20160816; b=wzGsx08dEquZYm4OiBrpPtjFS0mVy8zprL5QoGSr2bDd9e9hh3Nu46IdL65OHhmrev kSoHgxwBaOaCqjFbaz7cOzv0A+C5SZEWvCUTfKqeo8dXe4wbPTMAuokzyGcUIukhWhP9 pHt9gMbPihUlHt3eNoEJejhRv5qDC8sOhM3lrXzOlvpRC+pu7QhF/6Ms6faWMgrWoIUz aWSec/2Yl18HLr0l82gqsEJ1m41s0KTUnAts9TSjJFHkpZomwtmshoceX8tUoir0fSe7 bHpvkZ6SQ7hk88uCaf6CFqhrrNSn6t07/Sm9Nsu1EWak5uWERZkT5L5IZhwHpf7X5ky6 dM0g== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MO5+aHEvQnO0J+ro3Uo1USrRPuwjQ/gVxzqgfgSfuj8=; b=nRI7ZhxuKXKlzZUfsif5z3DNUYXjVJzBV0ostCWwJS8b7IvkzjGkdC45vr7R5bam6b 5/HTKQ0tolt7i23o3ensK5UMWSw7haKgTezVJKMydlzRNTYWwMDyNf0pdFq3MqiIbp1U HeSssjGsAYdgNjcjpisT8mUNfiXXtp2RqP3ZmOhxXe0reX2EWwWA+Xq88/K1BX1FVdc8 HXJcTSmq3Ksbinqqk9gL72PQR13UHTUHDb1qISeAPAOPiBLvQAq0bYeHT8W0qn0KnwMI 38T1WmZuu2a6s54FoM/+GIen9DGEgZDTqdfbVXTezDwMQkpBKesw1q6GGDn7nX5oWVgI lYVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fzMloXmM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a25si2825587ejf.246.2021.01.14.11.46.40; Thu, 14 Jan 2021 11:47:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fzMloXmM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730351AbhANTnD (ORCPT + 99 others); Thu, 14 Jan 2021 14:43:03 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:56702 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730144AbhANTnC (ORCPT ); Thu, 14 Jan 2021 14:43:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610653295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MO5+aHEvQnO0J+ro3Uo1USrRPuwjQ/gVxzqgfgSfuj8=; b=fzMloXmMADd5NoJZnqIh4kfY6gCxiG3+8JXNuwd7iy8ZmUppmT1gZaFugumWjZg3lSfASU Vj5z8o4d9MhH02ZVZi7RO8cxl0wFPv6YdBLWOlVii1r1rdJHb/Iwrl9pBu+o4/aspQw3yM KPRBSBTsIhddhBT1f8dB+Cb0U6AJ8ZM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-362-PAtxtlmzPpSngjCyIYLpcw-1; Thu, 14 Jan 2021 14:41:31 -0500 X-MC-Unique: PAtxtlmzPpSngjCyIYLpcw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2711B10766BE; Thu, 14 Jan 2021 19:41:29 +0000 (UTC) Received: from treble.redhat.com (ovpn-120-156.rdu2.redhat.com [10.10.120.156]) by smtp.corp.redhat.com (Postfix) with ESMTP id A1A95100AE40; Thu, 14 Jan 2021 19:41:24 +0000 (UTC) From: Josh Poimboeuf To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Sami Tolvanen , Sedat Dilek , Kees Cook , Nick Desaulniers , clang-built-linux@googlegroups.com, Miroslav Benes , Boris Ostrovsky , Juergen Gross Subject: [PATCH 15/21] x86/xen/pvh: Convert indirect jump to retpoline Date: Thu, 14 Jan 2021 13:40:11 -0600 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It's kernel policy to not have (unannotated) indirect jumps because of Spectre v2. This one's probably harmless, but better safe than sorry. Convert it to a retpoline. Cc: Boris Ostrovsky Cc: Juergen Gross Signed-off-by: Josh Poimboeuf --- arch/x86/platform/pvh/head.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/platform/pvh/head.S b/arch/x86/platform/pvh/head.S index 43b4d864817e..d87cebd08d32 100644 --- a/arch/x86/platform/pvh/head.S +++ b/arch/x86/platform/pvh/head.S @@ -16,6 +16,7 @@ #include #include #include +#include #include __HEAD @@ -105,7 +106,7 @@ SYM_CODE_START_LOCAL(pvh_start_xen) /* startup_64 expects boot_params in %rsi. */ mov $_pa(pvh_bootparams), %rsi mov $_pa(startup_64), %rax - jmp *%rax + JMP_NOSPEC rax #else /* CONFIG_X86_64 */ -- 2.29.2