Received: by 10.223.176.5 with SMTP id f5csp723153wra; Fri, 9 Feb 2018 06:14:44 -0800 (PST) X-Google-Smtp-Source: AH8x2251aAtPZbe5riPLldJ04RiuqwyqFyhKXEdxg84LovmcD4/2srbfuySlltrzP5wcItXGR1nx X-Received: by 2002:a17:902:6001:: with SMTP id r1-v6mr1292843plj.391.1518185684755; Fri, 09 Feb 2018 06:14:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518185684; cv=none; d=google.com; s=arc-20160816; b=ToiW1vDNOeljsK4yKP6ebweowEQ+oUkRYyXZuGtKUL2oK3QtJiM3G3Du4Ke0odpjOI SWMF5beLuvkZz3fwgouht593O7P+oTz99V7L87gfy+NQYhM8+dywrkTRtNj+msxtPBBI LapL4ydRSgE1Vk9H0ByK1X3azPMLHYKLbVskxuRf58FGYi/5n4hTblbAix8V6qNwtuV7 Teve0ZubyepEMwDILdO1v85/FPmKEQGhdxzIELe4AP6d1MNcmTp+vCOLpYbF9KOTEe2n cl+lefux8AST7fSSm1/PiDnaCtEkdCnGUQ1GyK2xtohJ0qVQYZ6qR2oi+46cW+1AYgMm AuTw== 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=UYATGTTR27JjU6D6V1WhRTZtD8B4JyWoC67m8pYbRoU=; b=IU+01T6f5/XJyqHOL4gpwzCYXUaC78+mMB3tHBJbCIvTdGfqjvg35GMIdiPMYuTEXj 6V/hVvOxby0/hJvo2OPTpOsW91FRU4iO+dwimQO9790LT78sosrE4H9nY0rXJqGa43Jk H01xBIp9U2o/eBJbn+Qqst9pK+lhaopGmoQ/QJrMpzcPZGKwDZeRCo3xAnye0w7HQRD8 sGsUppZ9vqFSqxL70HtURpv97OhU6cMrRuwsmM8zIW67vFT4uFNtrNCByNmIPCtDqPcm nY3yKI7WMfXi6s9F4ecR/THyXJ20kvCvZsfMqgRZAoPgvI6z51qcAob+va+ZcWMKVw/a XZ3Q== 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 y96-v6si319928plh.796.2018.02.09.06.14.30; Fri, 09 Feb 2018 06:14:44 -0800 (PST) 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 S1752742AbeBINlw (ORCPT + 99 others); Fri, 9 Feb 2018 08:41:52 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:49406 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752641AbeBINlt (ORCPT ); Fri, 9 Feb 2018 08:41:49 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 17B31F24; Fri, 9 Feb 2018 13:41:49 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jeff Law , Waiman Long , Thomas Gleixner , David Woodhouse , Tom Lendacky , Kees Cook , Andi Kleen , Tim Chen , Peter Zijlstra , Linus Torvalds , Jiri Kosina , Andy Lutomirski , Dave Hansen , Josh Poimboeuf , Arjan van de Ven , Paul Turner , Greg Kroah-Hartman Subject: [PATCH 4.9 35/92] x86/retpoline: Remove the esp/rsp thunk Date: Fri, 9 Feb 2018 14:39:04 +0100 Message-Id: <20180209133933.717506516@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180209133931.211869118@linuxfoundation.org> References: <20180209133931.211869118@linuxfoundation.org> User-Agent: quilt/0.65 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.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Waiman Long (cherry picked from commit 1df37383a8aeabb9b418698f0bcdffea01f4b1b2) It doesn't make sense to have an indirect call thunk with esp/rsp as retpoline code won't work correctly with the stack pointer register. Removing it will help compiler writers to catch error in case such a thunk call is emitted incorrectly. Fixes: 76b043848fd2 ("x86/retpoline: Add initial retpoline support") Suggested-by: Jeff Law Signed-off-by: Waiman Long Signed-off-by: Thomas Gleixner Acked-by: David Woodhouse Cc: Tom Lendacky Cc: Kees Cook Cc: Andi Kleen Cc: Tim Chen Cc: Peter Zijlstra Cc: Linus Torvalds Cc: Jiri Kosina Cc: Andy Lutomirski Cc: Dave Hansen Cc: Josh Poimboeuf Cc: Arjan van de Ven Cc: Greg Kroah-Hartman Cc: Paul Turner Link: https://lkml.kernel.org/r/1516658974-27852-1-git-send-email-longman@redhat.com Signed-off-by: David Woodhouse Signed-off-by: Greg Kroah-Hartman --- arch/x86/include/asm/asm-prototypes.h | 1 - arch/x86/lib/retpoline.S | 1 - 2 files changed, 2 deletions(-) --- a/arch/x86/include/asm/asm-prototypes.h +++ b/arch/x86/include/asm/asm-prototypes.h @@ -37,5 +37,4 @@ INDIRECT_THUNK(dx) INDIRECT_THUNK(si) INDIRECT_THUNK(di) INDIRECT_THUNK(bp) -INDIRECT_THUNK(sp) #endif /* CONFIG_RETPOLINE */ --- a/arch/x86/lib/retpoline.S +++ b/arch/x86/lib/retpoline.S @@ -36,7 +36,6 @@ GENERATE_THUNK(_ASM_DX) GENERATE_THUNK(_ASM_SI) GENERATE_THUNK(_ASM_DI) GENERATE_THUNK(_ASM_BP) -GENERATE_THUNK(_ASM_SP) #ifdef CONFIG_64BIT GENERATE_THUNK(r8) GENERATE_THUNK(r9)