Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp612264imd; Thu, 1 Nov 2018 02:43:12 -0700 (PDT) X-Google-Smtp-Source: AJdET5cqTgYi4JoBGT5zVoaZql62NfPuqgL+S/8SwsGXVT32I+ZNDg7dkfbuLTIA8qLZSOsQItOJ X-Received: by 2002:a17:902:9a47:: with SMTP id x7-v6mr6991390plv.316.1541065392380; Thu, 01 Nov 2018 02:43:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541065392; cv=none; d=google.com; s=arc-20160816; b=PkV6Y7SsVMzTRsUqb3hTjJdQBSToSX6m+I5k50zRxdtXrq4xcYzfjGm06ml4yAPVJZ Ehlyz0msUjIsPQHXjSY8n2UZ2uVLkM4fxAva9YnCXk8DYj2EAMChHxmvdL1aiNzBk/Lh wfcD6Oi9aIolmkHR81j5y9DH3aGGS11prM5IMczofLy/Izs2rGHqQUGft7Xo4iaEarrC QLpoz4KQMYKmJuO4VQhBXJeOqCnh74K1dRAwehsN4DxSWyESewXElGs4P2Y95kvQbCYL 1Krm3kXxy0gVxM4Ch8IKrfLFhLs+eea4zpFQ0Qi7mz1YqDuw3t/DDYvWHvBCQ8KuZEv0 Sunw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:subject:cc:to:from:date:message-id :mime-version:dkim-signature; bh=pItNDgZFIe15JKymUX/BrGnulAnqKxz3iMke+9Sq0y4=; b=ZwRzJGXkCUiuPe5nUMsCYGC8M+OfK9AIbv1PuEE17iaSgty4xasMsBOXXzFIoHJ/2+ wmaX9v3/IT4wmgOq9lBpfBMdFetix8+h7vxgafpRZLFzjwfo+QRiW3YqJSTRK+vk6vFv 6zsohL7+EVb7Vx/UBBCJdsHmnO6cLbHIe+W/JiaqnBkSgyoyT0Lk0rZe17bBylPzzyN1 OR0732h42zd5XaGcZwdmjo2F9GMwbxcFFv3d5tKSnFNeFKsG455j4z8KCIOvHqe1lBYO 0rnpQ61q+PxHAApA+D1rf5gKxaOE6oauf5ax4QdeI8dQ7XDD9liXhdQh61eb+si4pdTt GZeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=fsro5ZD6; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v38-v6si29927075pgl.539.2018.11.01.02.42.57; Thu, 01 Nov 2018 02:43:12 -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; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=fsro5ZD6; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727976AbeKASeV (ORCPT + 99 others); Thu, 1 Nov 2018 14:34:21 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:55646 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727608AbeKASeV (ORCPT ); Thu, 1 Nov 2018 14:34:21 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wA19Nl38035120; Thu, 1 Nov 2018 09:31:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : to : cc : subject : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=pItNDgZFIe15JKymUX/BrGnulAnqKxz3iMke+9Sq0y4=; b=fsro5ZD6JdHP3kARz3hXJRng6U78KuFwcrHXRJpdyQBue2JrTNRaXEPUCvULBIve9IsV 64qn6d9i/ddaNg/TrdCsN9OOybOCCC/f3JJ6BoQwdkFrhG2LKvveDu7ZVcNe8ZbK/n3S 5SsQiXi0LsUoBVOaXHTXE2D27kXCJGRloSmP15XLzYckrPjMp9Dnkd5W6q8/q2ja577j 42Zy7yNTxo16yiYn8X5Fikvq18YOg6gGbvM8jsQZfsOMiT3eJ4yIC+uFavc3ULRKdsAD FH2r06UibQGpyGO0xOKk43z4mPx8J9mFVZesD+LZ7Rw4RSOZ+Fr3+MAnZOKVDL9aO6VB +A== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2120.oracle.com with ESMTP id 2ncfyq7tmw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 01 Nov 2018 09:31:50 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id wA19Vib3006305 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 1 Nov 2018 09:31:44 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id wA19VhgO024415; Thu, 1 Nov 2018 09:31:43 GMT MIME-Version: 1.0 Message-ID: Date: Thu, 1 Nov 2018 02:31:43 -0700 (PDT) From: Zhenzhong Duan To: Linux-Kernel Cc: Srinivas REDDY Eeda , , Peterz Subject: [PATCH v2 0/2] Enable retpoline only when compiler support X-Mailer: Zimbra on Oracle Beehive Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9063 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=589 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1811010083 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org According to Peter Zijlstra's suggestion in https://lkml.org/lkml/2018/9/18= /1016, hard bind retpoline with compiler support and remove minimal stuff. Tested with both CONFIG_RETPOLINE enabled and disabled. -v2: Add compiler support check in Kconfig [Masahiro] Drop 3rd patch as __insn_is_indirect_jump() may be used in some corner case= .[PeterZ] Zhenzhong Duan (2): retpolines: Only enable retpoline when compiler support it retpolines: Remove the minimal stuff of retpoline support arch/x86/Kconfig | 6 ++---- arch/x86/Makefile | 4 +--- arch/x86/include/asm/nospec-branch.h | 12 ++++++------ arch/x86/kernel/cpu/bugs.c | 13 ++----------- scripts/Makefile.build | 2 -- 5 files changed, 11 insertions(+), 26 deletions(-) --=20 1.8.3.1