Received: by 10.213.65.68 with SMTP id h4csp429169imn; Tue, 13 Mar 2018 08:47:09 -0700 (PDT) X-Google-Smtp-Source: AG47ELvTm28Lp9kbm4WAVm0ZvbjIUnIfH+LxueVuftUBF7LPYj4epTfopdsrpy8Q+SJCthcC8yVY X-Received: by 2002:a17:902:5a0d:: with SMTP id q13-v6mr983205pli.152.1520956029540; Tue, 13 Mar 2018 08:47:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520956029; cv=none; d=google.com; s=arc-20160816; b=uUyuMC0plchUDs8iui0XlibYo0popcbowR3T77B3uf1wN2MG0SrkyJYdNtqloxZNCo NtFFr/Z/S5tKvGo0TGL1YzEK2s4HoM2vILPaBQYhrgJ/d7wYV0Scpb5LZK8e0edZ15yF k2fSmbJFdeKUylih0rh6ddX6haXIQ5VvS6jmO07k5biXW/aWC1HZzW2H6I4pz9zAophG rQehWIbgE5301xyDu+59AADLusd6F0BUlI7O9lgTx585wVFeZ+6JiVUgT8A7mycE7pUz VGvtZaNYxURufPvUG3szdgYbMEacy0E7ZgzuUOg2xs9coJWj1YrQw5iWCinZM899B0P2 snwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=rPm8jip4gnQ0eUUcHEEo3/f2ZZmtMnRFBBQg3QSuaQ8=; b=fZsLzwDjoaBchyT+gIyQJzSmIJNjayq5UgajOuldpWcZRu5mRsp1Kc81vpTYQskj9j AzX+Q7rYaCEhdhL4tUW2kdKxQRw3u2eZUR47e5ShM1ouujW0vFOWX8Z8S10RxpRVlGD1 Iw5zYh/ZOIqzE1bsVCGWRp4Jj1va/kPCnZQuHoIYTMBFPKFw8zhdU/h/CcevsQUGOBJw ENYiD7ljtprTZGmVo7wciqD5lo8lQhQbHR/+DHZvvq+4f/OW/7x604idypSyvvMqDLBb z90cc6HTxO809QwU+Z4nQ9Rjas9+LtA8RhXxi58NatvSczYInaKY/cbR03gSOgCC4xlZ bwww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h125si319394pfc.133.2018.03.13.08.46.55; Tue, 13 Mar 2018 08:47:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935072AbeCMPpL (ORCPT + 99 others); Tue, 13 Mar 2018 11:45:11 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:36986 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934313AbeCMPld (ORCPT ); Tue, 13 Mar 2018 11:41:33 -0400 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 76C5311FF; Tue, 13 Mar 2018 15:41:11 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Peter Zijlstra (Intel)" , Thomas Gleixner , Josh Poimboeuf , Andy Lutomirski , Arjan van de Ven , Borislav Petkov , Borislav Petkov , Dan Williams , Dave Hansen , David Woodhouse , Linus Torvalds , Tom Lendacky , Ingo Molnar Subject: [PATCH 4.14 130/140] x86/mm/sme, objtool: Annotate indirect call in sme_encrypt_execute() Date: Tue, 13 Mar 2018 16:25:33 +0100 Message-Id: <20180313152506.922403153@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180313152458.201155692@linuxfoundation.org> References: <20180313152458.201155692@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Peter Zijlstra commit 531bb52a869a9c6e08c8d17ba955fcbfc18037ad upstream. This is boot code and thus Spectre-safe: we run this _way_ before userspace comes along to have a chance to poison our branch predictor. Signed-off-by: Peter Zijlstra (Intel) Acked-by: Thomas Gleixner Acked-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Borislav Petkov Cc: Dan Williams Cc: Dave Hansen Cc: David Woodhouse Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Tom Lendacky Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman --- arch/x86/mm/mem_encrypt_boot.S | 2 ++ 1 file changed, 2 insertions(+) --- a/arch/x86/mm/mem_encrypt_boot.S +++ b/arch/x86/mm/mem_encrypt_boot.S @@ -15,6 +15,7 @@ #include #include #include +#include .text .code64 @@ -59,6 +60,7 @@ ENTRY(sme_encrypt_execute) movq %rax, %r8 /* Workarea encryption routine */ addq $PAGE_SIZE, %r8 /* Workarea intermediate copy buffer */ + ANNOTATE_RETPOLINE_SAFE call *%rax /* Call the encryption routine */ pop %r12